You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not able to get the sam build command to parse correctly the values for different --build-image values using specific images for certain functions using their logical IDs and providing a default image.
The documentation from sam build --help describes that this is possible, but does not provide an example.
I try to use the following commands without success to get Function1 and Function2 builds to use nodejs18.x images and all other remaining functions to use the build-python3.8 image with specific versions of the images:
sam build --use-container --parallel --template template.yaml --build-image "public.ecr.aws/sam/build-python3.8:1.113,Function1=public.ecr.aws/sam/build-nodejs18.x:1.113,Function2=public.ecr.aws/sam/build-nodejs18.x:1.113"
sam build --use-container --parallel --template template.yaml --build-image "public.ecr.aws/sam/build-python3.8:1.113 Function1=public.ecr.aws/sam/build-nodejs18.x:1.113 Function2=public.ecr.aws/sam/build-nodejs18.x:1.113"
I've also tried to configure the build_image option in samconfig.toml with these variations without success.
Can you provide information what is the expected syntax for the CLI option & in samconfig.toml?
The text was updated successfully, but these errors were encountered:
Hi @hanninen, thanks for reporting the issue. You can try running the following commands:
sam build --use-container --parallel --template template.yaml --build-image Function1=public.ecr.aws/sam/build-nodejs18.x:1.113 --build-image Function2=public.ecr.aws/sam/build-nodejs18.x:1.113
sam build --use-container --parallel --template template.yaml --build-image public.ecr.aws/sam/build-nodejs18.x:1.113
Save the following line in the samconfig.toml file under [default.build.parameters]: build_image = ["Function1=public.ecr.aws/sam/build-nodejs18.x:1.113", "Function2=public.ecr.aws/sam/build-nodejs18.x:1.113"]
I have tested these commands on my machine and it was working fine. Let me know if you still face issues after trying the above commands.
Thanks @hnnasit , that helped a lot. The docs refer the build_image value as String and that confused me, thinking that I need to pass it as one (similar to AWS CLI).
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
I am not able to get the
sam build
command to parse correctly the values for different--build-image
values using specific images for certain functions using their logical IDs and providing a default image.The documentation from
sam build --help
describes that this is possible, but does not provide an example.I try to use the following commands without success to get
Function1
andFunction2
builds to use nodejs18.x images and all other remaining functions to use the build-python3.8 image with specific versions of the images:sam build --use-container --parallel --template template.yaml --build-image "public.ecr.aws/sam/build-python3.8:1.113,Function1=public.ecr.aws/sam/build-nodejs18.x:1.113,Function2=public.ecr.aws/sam/build-nodejs18.x:1.113"
sam build --use-container --parallel --template template.yaml --build-image "public.ecr.aws/sam/build-python3.8:1.113 Function1=public.ecr.aws/sam/build-nodejs18.x:1.113 Function2=public.ecr.aws/sam/build-nodejs18.x:1.113"
I've also tried to configure the
build_image
option insamconfig.toml
with these variations without success.Can you provide information what is the expected syntax for the CLI option & in
samconfig.toml
?The text was updated successfully, but these errors were encountered: