Closed AllanBenson001 closed 1 year ago
Looks good. Could you please resolve merge conflicts?
Conflicts resolved 👍
This PR is included in version 4.5.0 :tada:
Thanks for this @antonbabenko Thanks also for adding the fix to my example.
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
This PR replaces #360. The approach here requires fewer changes to package.py, making it far easier to maintain going forwards.
Motivation and Context
I want to build my lambdas in docker containers (because my build environment might not have the required pre-requisites installed) but I need access to packages in CodeArtifact. Differences in build environments make this slightly more difficult. On build machines builds are run within containers, so I have Docker in Docker issues. On developers machines, Terraform might be running within a container or it might not. Workarounds to cope with these different environments make for some very ugly code.
Therefore, the best option is to make these changes that allow me to pass AWS tokens in as environment variables and run a CodeArtifact login within the container (via the entrypoint) before doing a pip install. I see the need to be able to do things like pass tokens as environment variables or map local config files as volumes as being quite a common scenario for people wanting to get packages from private repositories (e.g. Artifactory), that's why I'm updating this module.
Breaking Changes
None
How Has This Been Tested?
[x] I have updated at least one of the
examples/*
to demonstrate and validate my change(s)[x] I have tested and validated these changes using one or more of the provided
examples/*
projects I've run existing examples under examples/build-package and have added a new example to show how the new feature can be used[x] I have executed
pre-commit run -a
on my pull request