Skip to content

Instantly share code, notes, and snippets.

@richardhboyd
Created September 3, 2021 22:14
Show Gist options
  • Save richardhboyd/5e5a70bbaed6030025c7e112f1bd57af to your computer and use it in GitHub Desktop.
Save richardhboyd/5e5a70bbaed6030025c7e112f1bd57af to your computer and use it in GitHub Desktop.
Dockerfile for running the AWS SAM translator locally
FROM python:3.7.9
ENV AWS_DEFAULT_REGION=us-west-2
RUN git clone https://github.com/aws/serverless-application-model.git
COPY sample-template.yaml /serverless-application-model/sample-template.yaml
WORKDIR serverless-application-model
RUN pip install boto3
RUN pip install -e '.[dev]'
RUN python ./bin/sam-translate.py --template-file=sample-template.yaml
RUN cat transformed-template.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment