aws / aws-sam-cli

CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
https://aws.amazon.com/serverless/sam/
Apache License 2.0
6.48k stars 1.16k forks source link

Support running lambdas build from a docker image #6802

Open willm opened 5 months ago

willm commented 5 months ago

I was very excited to see some cross compatibility between sam and terraform. However when I tried to run my lambda locally with sam, I was greeted with this message.

sam local invoke --hook-name terraform
Skipped prepare hook. Current application is already prepared.
The resource AWS::Lambda::Function 'AwsLambdaFunctionXXLambda234C177D' has specified ECR registry image for Code. It will not be built and SAM CLI does not support invoking it locally.
Error: You must provide a function logical ID when there are more than one functions in your template. Possible options in your template: []

I'm using lambda to run an ML model so I need to use the docker functionality. The infrastructure team uses terraform. It would be great to be able to run serverless applications with sam that are built from a docker image.

hnnasit commented 5 months ago

Hi @willm thanks for the feature request, I will bring it up with the team.