Is this possible to deploy AWS Lambda Containers without using SAM. Every article I found on internet is suggesting to use SAM to deploy. As SAM is a wrapper on AWS cloud formation I want to use only cloud formation YAML to deploy lambda containers.
0
votes
I don't think CloudFormation will handle building the Docker image and pushing it to ECR, but once you have pushed your image to ECR you should be able to deploy it as a Lambda function using any tool you want, like CloudFormation, Terraform, AWS CLI, whatever....
- Mark B
Please provide enough code so others can better understand or reproduce the problem.
- Community
1 Answers
0
votes
As you already know, you need to create a docker image of your lambda application and then push to AWS docker registry which is ECR, now there are several ways to deploy your lambda:
1- use AWS console, go into lambda in GUI choose "container image" in the options and provide ECR link (No cloudformation will be used this way)
2- create a SAM template and then use AWS CLI or AWS Console again to setup a cloudformation and SAM will be compiled to cloudformation later in the process.
3- directly create a cloudformation template and then use CLI or AWS console to deploy your lambda
4- use CDK to do your deployment
And maybe many other choices and methods. now depending on what exactly you want to do, ask for more specific detail.