Integrating with SAM
Last updated
Was this helpful?
Last updated
Was this helpful?
In order to use in a CloudFormation Stack you'll need to do two things: create a Docker image with SAM included and invoke SAM in before_init
hooks.
The first one can be done using a Dockerfile akin to this one:
You should build it, push it to a repository and set it as the of your Stack.
You'll also have to invoke SAM in order to generate raw CloudFormation files and upload Lambda artifacts to S3. You can do this by adding the following to your before initialization hooks:
sam package --region ${CF_METADATA_REGION} --s3-bucket ${CF_METADATA_TEMPLATE_BUCKET} --s3-prefix sam-artifacts --output-template-file ${CF_METADATA_ENTRY_TEMPLATE_FILE}