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

lambda-python: Allow passing build args to Docker in PythonFunction #12949

Closed
2 tasks
jamesTait-jt opened this issue Feb 9, 2021 · 8 comments
Closed
2 tasks
Labels
@aws-cdk/aws-lambda-python effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p2

Comments

@jamesTait-jt
Copy link

Ability to pass args to docker when using aws_lambda_python.PythonFunction

Use Case

I am trying to deploy a stack from behind a proxy. I want to be able to pass --network host to the PythonLambda docker command so that the container is able to access the internet through the proxy.

Proposed Solution

This seems to have been solved for aws_lambda_nodejs here:
#8117

So perhaps a similar solution?

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@jamesTait-jt jamesTait-jt added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 9, 2021
@eladb
Copy link
Contributor

eladb commented Feb 15, 2021

Happy to accept contributions

@eladb eladb added effort/small Small work item – less than a day of effort good first issue Related to contributions. See CONTRIBUTING.md p2 labels Feb 15, 2021
@eladb eladb removed their assignment Feb 25, 2021
@rirze
Copy link

rirze commented Mar 31, 2021

Looking at this to pass ssh agent inside Docker. Would help in getting access to private repositories.

I'm going to try to implement this and make a PR, but I'm not fluent in typescript or CDK internals.

@ryparker ryparker removed the needs-triage This issue or PR still needs to be triaged. label Jun 1, 2021
@jia2
Copy link

jia2 commented Sep 1, 2021

When will this feature be added?

@rirze
Copy link

rirze commented Sep 1, 2021

Sorry, I've been procrastinating this for a while now-- mostly because I'm not super comfortable with TypseScript and not knowing how to implement this feature properly.

I'll try to reopen the PR sometime this week or next week and move this forward.

@setu4993
Copy link
Contributor

setu4993 commented Oct 5, 2021

I have #15324 open which would resolve this.

setu4993 added a commit to setu4993/aws-cdk that referenced this issue Dec 30, 2021
mergify bot pushed a commit that referenced this issue Dec 30, 2021
…mage (#18082)

This refactors the bundling process to match the NodeJs and Go Lambda functions and allows providing a custom bundling docker image.

Changes:
- refactor bundling to use `cdk.BundlingOptions`
- Use updated `Bundling` class
- Update tests to use updated `Bundling` class


Fixes #10298, #12949, #15391, #16234, #15306

BREAKING CHANGE: `assetHashType` and `assetHash` properties moved to new `bundling` property.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@setu4993
Copy link
Contributor

Not 100% sure what the desired solution was since the OP mentions:

...I want to be able to pass --network host to the PythonLambda docker command so that the container is able to access the internet through the proxy.

Going from #13938, if the goal was to only expose HTTPS_PROXY as a build arg that is used while bundling, #18082 added support for that.

@corymhall
Copy link
Contributor

This should be fixed in #18082

@github-actions
Copy link

github-actions bot commented Jan 5, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this issue Feb 21, 2022
…mage (aws#18082)

This refactors the bundling process to match the NodeJs and Go Lambda functions and allows providing a custom bundling docker image.

Changes:
- refactor bundling to use `cdk.BundlingOptions`
- Use updated `Bundling` class
- Update tests to use updated `Bundling` class


Fixes aws#10298, aws#12949, aws#15391, aws#16234, aws#15306

BREAKING CHANGE: `assetHashType` and `assetHash` properties moved to new `bundling` property.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-python effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants