aws / aws/aws-sam-cli

Multiple functions being deployed, even without code changes (PackageType: Image)

Open
#3,236 3 comments 2 reactions 0 assignees View on GitHub
area/build maintainer/need-followup stage/bug-repro
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Description:

SAM model with two or more functions. Always deploying all functions, including those that don't have any code modifications.

### Steps to reproduce:

- SAM template that has two more functions
- PackageType: Image
- Different docker contexts and docker tags per function => DockerContext: ./folder_function1 and DockerContext: ./folder_function1
- Modified code only for the lambda inside of /folder_function1.
- Both get the modified status during deployment:
484 | -------------------------------------------------------------------------------------------------
485 | Operation LogicalResourceId ResourceType Replacement
486 | -------------------------------------------------------------------------------------------------
487 | * Modify Function1 AWS::Lambda::Function False
488 | * Modify Function2 AWS::Lambda::Function False
489 | -------------------------------------------------------------------------------------------------

### Expected result:

If you update the code ONLY for Function1 the changeset should not have a modified status for Function2.

### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

1. `sam --version`:
SAM CLI, version 1.29.0

`Add --debug flag to command you are running`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.