Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lambda-python): poetry bundling is broken after Aug 20 #26823

Merged
merged 3 commits into from
Aug 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions packages/@aws-cdk/aws-lambda-python-alpha/lib/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The correct AWS SAM build image based on the runtime of the function will be
# passed as build arg. The default allows to do `docker build .` when testing.
ARG IMAGE=public.ecr.aws/sam/build-python3.7
ARG IMAGE=public.ecr.aws/sam/build-python3.9
FROM $IMAGE

ARG PIP_INDEX_URL
Expand All @@ -17,7 +17,7 @@ ENV PIP_CACHE_DIR=/tmp/pip-cache
ENV POETRY_CACHE_DIR=/tmp/poetry-cache

RUN \
# create a new virtualenv for python to use
# create a new virtualenv for python to use
# so that it isn't using root
python -m venv /usr/app/venv && \
# Create a new location for the pip cache
Expand All @@ -30,8 +30,7 @@ RUN \
mkdir /tmp/poetry-cache && \
# Ensure all users can write to poetry cache
chmod -R 777 /tmp/poetry-cache && \
# pipenv 2022.4.8 is the last version with Python 3.6 support
pip install pipenv==2022.4.8 poetry && \
pip install pipenv==2023.8.20 poetry==1.6.0 && \
# Ensure no temporary files remain in the caches
rm -rf /tmp/pip-cache/* /tmp/poetry-cache/*

Expand Down
Loading