Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

How can I build image for python3.9 runtime? #349

Closed
mhihasan opened this issue Sep 16, 2021 · 4 comments
Closed

How can I build image for python3.9 runtime? #349

mhihasan opened this issue Sep 16, 2021 · 4 comments

Comments

@mhihasan
Copy link

mhihasan commented Sep 16, 2021

I am using python3.9 runtime, and that's why I need lambci/lambda:build-python3.9 image. As currently it is not available, I would like to build from myself and use this until any officail release for python3.9.

How could I do that?
Thanks

@senor-coder
Copy link

AWS has a docker image for python 3.9 -> public.ecr.aws/lambda/python:3.9 . Does this solve your problem ?

@mhihasan
Copy link
Author

This image requires requires the handler name to be the first argument of entrypoint, but I want to build lambda layer using that,

docker run --rm  --volume "$PWD:/var/task" --workdir /var/task  public.ecr.aws/lambda/python:3.9 pip install -Ur requirements.txt --target .layers/demo/python

This command throws error,

entrypoint requires the handler name to be the first argument

@senor-coder
Copy link

@mhihasan You can try out the images that I have published for python 3.9 in the meantime.

docker run --rm --volume "$PWD:/var/task" --workdir /var/task senorcoder/aws-lambda-env:python3.9_build pip install -Ur requirements.txt --target .layers/demo/python

Runtime: senorcoder/aws-lambda-env:python3.9
Build  : senorcoder/aws-lambda-env:python3.9_build

Repository Reference:
https://github.com/senor-coder/aws-lambda-pyruntime

@mhihasan
Copy link
Author

Thanks a lot, it works. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants