Skip to content

fix(lambda-python-alpha): python function build args not being respected#37864

Draft
Don-Burns wants to merge 1 commit into
aws:mainfrom
Don-Burns:fix-lambda-python-alpha-build-args
Draft

fix(lambda-python-alpha): python function build args not being respected#37864
Don-Burns wants to merge 1 commit into
aws:mainfrom
Don-Burns:fix-lambda-python-alpha-build-args

Conversation

@Don-Burns
Copy link
Copy Markdown

Issue # (if applicable)

Closes #26920

Reason for this change

Current the build args that exist for PIP_INDEX_URL, PIP_EXTRA_INDEX_URL and HTTPS_PROXY are passed as build args, but the args are never exported to the environment or used directly for all the pip install commands when building the image. In environments where pypi may be locked down it will not work. Similarly, users are expecting all pip related installs to follow what they pass for args to be used in all steps of the build and the docs point to this exact use case with PIP_INDEX_URL as an example of what build args is used for
image

Description of changes

export the args so the pip install actually leverage the passed in values.

Describe any new or updated permissions being added

N/a

Description of how you validated changes

Manual validation using a work project. Could not think of way to have this correctly checked for in the absence of a private mirror that the current test cases are not trying.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions Bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label May 13, 2026
@github-actions github-actions Bot added bug This issue is a bug. p2 labels May 13, 2026
Copy link
Copy Markdown
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter fails with the following errors:

❌ Fixes must contain a change to a test file.
❌ Fixes must contain a change to an integration test file and the resulting snapshot.

If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@aws-cdk/aws-lambda-python-alpha: PIP_INDEX_URL in buildArgs is not applied

2 participants