-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
chore(lambda-nodejs): set default value of awsSdkConnectionReuse
to false (under feature flag)
#29538
Conversation
650836d
to
82e62a4
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
We will actually be removing v2 altogether in the next few weeks or so. Given that, I don't think we should add an additional feature flag or update the default here. ETA: sdk v2, not cdk v2 |
@TheRealAmazonKendra Does this mean that CDK v3 will be launched in a few weeks?! |
Sdk v3, not cdk. I should have specified more clearly. |
@TheRealAmazonKendra I see. I'm sorry for the misunderstanding. I think the current default values are for SDK v2, and this PR will optimize the default settings for SDK v3. |
Hi @badmintoncryer , |
Hi @shikha372. Therefore, I think it is necessary to update the default value of I might be misunderstanding various things. Please don't hesitate to point out any issues. |
When we move from sdk v2 to v3, we'll probably just deprecate this field as it will no longer have any relevance to this construct. I'm not precisely sure of what the path forward on this construct library as a whole will be but, in contrast to our normal practice of not pushing breaking changes or forcing upgrades, we will have to. Anyone still on sdkv2 will also still be on the node16 Lambda runtime (this is the most recent it supports). On July 15th, no new Lambda functions will be able to be created with this runtime and then on August 15th, all updates to existing Lambda functions will be blocked. See: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html Since the consequences of still being on that runtime are pretty major, this might be a case where we do use a breaking change and force an update. THAT BEING SAID, we haven't settled on an exact plan here so don't take this as the absolute path forward. Just my thoughts as we begin to plan this upgrade. |
@TheRealAmazonKendra For now, I'll leave this PR as it is. I would appreciate it if you could reply here once a decision has been made. |
…lt for sdk v3 lambda runtimes (#30117) Closes #29497 Related to #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*
Hey @badmintoncryer, wanted to give you an update on the path we took with this. Along the lines of what Kendra was saying, we want to keep some of the decisions that straddle the breaking change line to be made by the team itself. In that vein, I made this change in #30117 in a similar manner without the feature flag at all. There is also the possibility that when we deprecate the Node 16 runtime, we will deprecate the prop altogether. I think we will want to take that approach for most of the Node 16 / SDK v2 upgrades. I don't want you to feel like we took this PR from you, and I certainly consulted it when making mine, but we wanted to have full control on this type of change. Again, greatly appreciate you taking the time to submit this PR. |
…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*
…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*
Issue # (if applicable)
Closes #29497 .
Reason for this change
Reference to #29497
Description of changes
Change default value of
awsSdkConnectionReuse
from true to falseDescription of how you validated changes
I have added both unit and integ tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license