-
Notifications
You must be signed in to change notification settings - Fork 4k
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] Identify lambda@edge does not support environment variables #9328
Comments
I can confirm that the issue existed for me, as well, when upgrading. Adding |
@jogold |
…@edge (#9562) Check version and function compatibility when a Lambda is used for Lambda@Edge. Environment variables can be marked as "removable" when used for Lambda@Edge. Closes #9328 Closes #9453 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…@edge (aws#9562) Check version and function compatibility when a Lambda is used for Lambda@Edge. Environment variables can be marked as "removable" when used for Lambda@Edge. Closes aws#9328 Closes aws#9453 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Hello. Can you pleas link me to documentation on how to specify the NodejsFunction in CDK v2 for Lambda@Edge since this PR is closed and I couldn't find anything here documented. |
aws-cdk v1.53.0 or above update causes 400 error when deploying lambda@edge.
With message "The function cannot have environment variables".
My proposal is add
new NodejsFunction
props to such asdisableAdditionalEnv
.Use Case
I want to deploy lambda@edge code by following cdk code.
and when I executed
cdk deploy
and I got an error:The error reason is following commit in aws-cdk v1.53.0.
And, environment variables cannot be added to lambda@edge as of July 2020.
44c0400
awsSdkConnectionReuse is default
true
, and so lambda@edge developers must set the propsfalse
following code:The solution is not intuitive for me. And aws-cdk will add props and add environment in the future. Then developers must be set these props false each.
Proposed Solution
false
This method is the clearest. I would like you to adopt this policy if possible.
disableAdditionalEnv
props and if the prop set true,addEnvironment
methods will not work.This method requires additional development, but it makes development easier until environment variables can be added to Lambda@edge.
Other
I think I can implement two choices, so I would like to hear your opinion and decide. Or I'd like to know if there is another clear solution.
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: