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
When you run sam build --use-container and your Docker build fails, you get something like the following
Building image for EmploymentTimeEmployeeCachingFunction function
Setting DockerBuildArgs for EmploymentTimeEmployeeCachingFunction function
Failed building function EmploymentTimeEmployeeCachingFunction
Build Failed
Error: The command '/bin/sh -c exit 1' returned a non-zero code: 1
This isn't very useful, as I've got no idea what the build logs actually look like that caused this.
Proposal
Dump the docker build logs on failure. So, for the above example, instead I would like something like
Building image for EmploymentTimeEmployeeCachingFunction function
Setting DockerBuildArgs for EmploymentTimeEmployeeCachingFunction function
Failed building function EmploymentTimeEmployeeCachingFunction
Step 1/19 : FROM public.ecr.aws/lambda/python:3.11 AS base
---> 37318d609dfb
Step 2/19 : RUN exit 1
---> [Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
---> Running in 6420d9378807
The command '/bin/sh -c exit 1' returned a non-zero code: 1
Build Failed
Error: The command '/bin/sh -c exit 1' returned a non-zero code: 1
Additional Details
The demo log was generated with the following extra code in the BuildError handler in app_builder.py
This makes sense from our side, and it should improve the user experience in general. Since you already find the point which needs the update, would like to raise a pull request with the change?
Describe your idea/feature/enhancement
When you run
sam build --use-container
and your Docker build fails, you get something like the followingThis isn't very useful, as I've got no idea what the build logs actually look like that caused this.
Proposal
Dump the docker build logs on failure. So, for the above example, instead I would like something like
Additional Details
The demo log was generated with the following extra code in the
BuildError
handler in app_builder.pyThe text was updated successfully, but these errors were encountered: