Amazon Linux 2 with Python 3.8 installed.
Use this image for creating AWS Lambda Layers for runtime Python 3.8.
.
├── Dockerfile
├── dist
├── docker-compose.yml
└── requirements.txt
DockerfileFROM michimani/amzn2py38:latest
RUN mkdir /home/dist
docker-compose.ymlversion: "3"
services:
app:
build: .
volumes:
- ".:/home"
command: >
bash -c "
mkdir -p /home/tmp/python &&
pip3.8 install -r /home/requirements.txt -t /home/tmp/python --upgrade &&
cd /home/tmp &&
zip -r /home/dist/layer.zip ./python &&
cd /home &&
rm -rf /home/tmp"
Run following command to generate ZIP file for AWS Lambda Layers.
$ docker-compose up --build
And, run following AWS CLI command to publish layer.
$ aws lambda publish-layer-version --layer-name my_layer --zip-file fileb://dist/layer.zip
Content type
Image
Digest
Size
197.2 MB
Last updated
over 6 years ago
docker pull michimani/amzn2py38