Skip to content

Commit

Permalink
chore(lambda-nodejs): do not add unused environment variable by defau…
Browse files Browse the repository at this point in the history
…lt for sdk v3 lambda runtimes (aws#30117)

Closes aws#29497
Related to aws#29538

### Reason for this change

The `AWS_NODEJS_CONNECTION_REUSE_ENABLED` does not exist in SDK v3. Including it in the environment can add to cold start times.

### Description of changes

For Lambda runtimes >= Node 18, do not set the variable by default. If set explicitly, give the user a warning.

We can plan to simplify this logic & deprecate the property after we deprecate Node 16 and remove it as the default runtime for this construct.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
scanlonp authored and atanaspam committed Jun 3, 2024
1 parent 6cde919 commit 75aa95d
Show file tree
Hide file tree
Showing 383 changed files with 88,561 additions and 15,377 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@
},
"S3Key": "2344c8450ec3c069ed98fedf1714f33c31b9f3c8e0d295ea361224732e1fef37.zip"
},
"Environment": {
"Variables": {
"AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
}
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
Expand Down Expand Up @@ -98,11 +93,6 @@
},
"S3Key": "112c693f98d7e411850f8d441167216bdfe392567d99a11e03b6cd921e36398b.zip"
},
"Environment": {
"Variables": {
"AWS_NODEJS_CONNECTION_REUSE_ENABLED": "1"
}
},
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 75aa95d

Please sign in to comment.