Daniel Gato
01/05/2022, 4:03 PMAWS SAM template
The second set of required data is in the Metadata section that helps AWS SAM manage the container images. When a container is created, a new tag is added to help identify that image. By default, Docker uses the tag, latest. However, AWS SAM passes an explicit tag name to help differentiate between functions. That tag name is a combination of the Lambda function resource name, and the DockerTag value found in the Metadata. Additionally, the DockerContext points to the folder containing the function code and Dockerfile identifies the name of the Dockerfile used in building the container image.
In addition to changes in the template.yaml file, AWS SAM also uses the Docker CLI to build container images. Each Lambda function has a Dockerfile that instructs Docker how to construct the container image for that function. The Dockerfile for the HelloWorldFunction is at hello-world/Dockerfile.
Source: https://aws.amazon.com/blogs/compute/using-container-image-support-for-aws-lambda-with-aws-sam/
thdxr
01/07/2022, 7:26 PMthdxr
01/07/2022, 7:27 PMDaniel Gato
01/07/2022, 8:11 PM