-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use same image for multiple lambda functions #2576
Comments
Hi @tuliocasagrande, Thanks for bringing this to our attention. This is a bug on our side. During build optimization project we are treating Metadata as a way to decide if a function should be built or not. Since We are working on fixing this issue, however, as a workaround you can add a dummy field with different value to each Function and that'll work. Sample:
|
#2624 should address this issue. |
Description:
I'd like to build a single image and deploy to different lambda functions by overriding the CMD.
More precisely, I'm copying multiple modules to my container:
And would like to set up accordingly:
However,
sam build
is addingImageUri
for the first lambda, but not the second. Resulting in the following error forsam deploy
:samcli.commands.package.exceptions.ImageNotFoundError: Image not found for ImageUri parameter of rSecondLambdaFunction resource.
If I manually add
ImageUri
to the second lambda,sam deploy
runs smoothly:Steps to reproduce:
Use the minimal template above, run
sam build
andsam deploy
.Observed result:
Expected result:
I expected to have a single image published to ECR, but with different CMDs.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: SAM CLI, version 1.15.0The text was updated successfully, but these errors were encountered: