This repository was archived by the owner on Apr 5, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
feat(python)!: add v2 layer and drop python 3.6 support #4
Merged
rubenfonseca
merged 12 commits into
aws-powertools:main
from
rubenfonseca:feat/python-v2
Oct 3, 2022
Merged
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
7aa2f4a
feat(python)!: add support for v2 layer
rubenfonseca 50bde69
feat: add architecture option to generate layers for ARM64
rubenfonseca 43b53cc
chore(docs): update API
rubenfonseca d69fb03
chore: apply suggestions from code review
rubenfonseca 898cae5
chore: document python Dockerfile
rubenfonseca 3e11dbc
chore: rename extras poetry group to all
rubenfonseca a3a0f17
fix: tests
rubenfonseca f2b8803
chore: apply feedback from code review
rubenfonseca 907939d
chore: addressed code review feedback
rubenfonseca 0fbd446
chore: add documentation to getDockerPlatformNameFromArchitectures
rubenfonseca 96839c0
chore: remove more dependencies from the python layer
rubenfonseca 4bc80e8
chore(deps): remove six boto dep
heitorlessa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
FROM public.ecr.aws/lambda/python:3.8 | ||
|
||
|
||
|
||
ARG PACKAGE_SUFFIX='' | ||
|
||
USER root | ||
WORKDIR /tmp | ||
|
||
|
||
# PACKAGE_SUFFIX = '[pydantic]==1.23.0' | ||
# PACKAGE_SUFFIX = '[pydantic]' | ||
# PACKAGE_SUFFIX = '=='1.23.0' | ||
# PACKAGE_SUFFIX = '[all]==2.0.0' | ||
# PACKAGE_SUFFIX = '[all]' | ||
# PACKAGE_SUFFIX = '=='2.0.0' | ||
# PACKAGE_SUFFIX = '' | ||
|
||
RUN yum update -y && yum install -y zip unzip wget tar gzip binutils | ||
|
||
RUN yum update -y && yum install -y zip unzip wget tar gzip | ||
RUN pip install -t /asset/python aws-lambda-powertools$PACKAGE_SUFFIX | ||
|
||
RUN pip install -t /asset/python aws-lambda-powertools$PACKAGE_SUFFIX | ||
# Removing nonessential files | ||
RUN cd /asset && \ | ||
# remove boto3 and botocore (already available in Lambda Runtime) | ||
rm -rf python/boto* && \ | ||
# remove debugging symbols | ||
find python -name '*.so' -type f -exec strip "{}" \; && \ | ||
rubenfonseca marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# remove tests | ||
find python -wholename "*/tests/*" -type f -delete && \ | ||
# remove python bytecode | ||
find python -regex '^.*\(__pycache__\|\.py[co]\)$' -delete |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.