Using ImageConfig Causes SUPERNOVA Launch, Runtime.InvalidEntrypoint Errors
See original GitHub issueWhile using the latest version of AWS SAM with sam init
for a Ruby 2.7 container project I noticed that SAM’s template.yaml
file has this section commented out and mentions how you can override the CMD
in the Dockerfile. This option was attractive for me for reasons.
ImageConfig:
Command: ['app.lambda_handler']
However, I have found that once you do this in our your AWS::Serverless::Function
and deploy, your entire function is pretty much broken. Errors will be shown like this in CloudWatch.
SUPERNOVA Launch error: Couldn't find valid bootstrap(s): [app.lambda_handler] Entrypoint: [] Cmd: [app.lambda_handler] WorkingDir: [/var/task]
{
"errorMessage": "RequestId: 68c820b5-b141-4d00-bdda-91acda1c74cf Error: Couldn't find valid bootstrap(s): [app.lambda_handler]",
"errorType": "Runtime.InvalidEntrypoint"
}
Removing ImageConfig
from template.yaml
and redeploying will not help!!! The configuration is sticky.

However, I did learn after a lot of trial and error that I can use the Lambda GUI to remove the CMD override
and the function will start to work again. So unless I did some really wrong, the ImageConfig
Command
option looks to be completely broken, at least for me in Ruby 2.7 runtime. Might be for all runtimes tho? I have not checked.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:14 (7 by maintainers)
Hi, I’m facing the same issue as @metaskills, but I’m using .net 5.0. In my CloudFormation yaml script I have this:
When I hit “Test” button on GUI, I receive this error in return:
I don’t want to remove the CMD, I need the CMD I put to work.
When I edit the CMD (not changing anything, just clicking Edit and then saving), the test work.
I also tried not to pass EntryPoint or leave it empty like
[ "" ]
or like this:[ ]
Can someone help me, please?
@berkcent This is a bug within Lambda’s CloudFormation. I will bring it back up with their team but it is not something we can directly handle.
Closing this as this is an issue with CloudFormation and not SAM. The workaround is to provide the Entrypoint and Cmd in the template.