-
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
fix(lambda-nodejs): remove smithy models from bundling for AWS SDK v3 runtimes (under feature flag) #31639
Conversation
… runtimes (under feature flag)
The code LGTM. Just curious what will customers see when there's version mismatch? |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
One quick example I can think of if there's a mismatch in version and customer used a newer method in a newer @aws-sdk/* library but with an older @smithy/* library would be |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #31610
Reason for this change
for Node 18+ runtimes, since AWS Lambda includes AWS SDK v3 by default, and CDK excludes all the
@aws-sdk/*
packages because they’re expected to already be present. However, the CDK currently removes only the@aws-sdk/*
packages when bundling for Node 18+ runtimes, but it does not remove the@smithy/*
packages. This can cause a mismatch in versions between the@smithy/*
packages and the AWS SDK packages that AWS Lambda provides.The mismatch can happen in the following scenarios. This is a pretty edge case but customers did encounter this issue.
Description of changes
Add a feature flag. When feature flag is set to true, we will also remove smithy models.
Description of how you validated changes
Added unit tests and integration tests.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license