Skip to content

Instantly share code, notes, and snippets.

@gotraveltoworld
Last active April 1, 2019 21:17
Show Gist options
  • Save gotraveltoworld/06e71b49123f5c4b8a791d520c914dc3 to your computer and use it in GitHub Desktop.
Save gotraveltoworld/06e71b49123f5c4b8a791d520c914dc3 to your computer and use it in GitHub Desktop.
The basic example of AWS Lambda(Python 3.6).
FROM lambci/lambda:build-python3.6
WORKDIR /var/task
ENV WORKDIR /var/task
# Make the dir and to install all packages into packages/
RUN mkdir -p packages/ && \
pip install uuid -t packages/
# Copy initial source codes into container.
COPY lambda_function.py "$WORKDIR/lambda_function.py"
# Compress all source codes.
# RUN zip -r9 $WORKDIR/lambda.zip packages/ lambda_function.py
# CMD ["/bin/bash"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment