Skip to content

Commit

Permalink
chore(lambda-nodejs): clean up sdk v2 references and warn about runti…
Browse files Browse the repository at this point in the history
…me updates related to sdk bundling (#30099)

Closes #29836.

While sdk v2 was not being used directly in the construct, we had some remnants of its use. Added a warning for users of Node 16 who do not bundle the sdk on what it will take to update to newer node versions. Also updated integ tests to make actual sdk v3 calls as well as clean up false references to v2.

----

*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 May 8, 2024
1 parent 3928eae commit e9e800f
Show file tree
Hide file tree
Showing 46 changed files with 28,156 additions and 40,813 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
/* eslint-disable no-console */
// @ts-ignore
import { S3Client } from '@aws-sdk/client-s3'; // eslint-disable-line import/no-extraneous-dependencies, import/no-unresolved

const s3 = new S3Client({});
import { DynamoDBClient, DescribeTableCommand } from '@aws-sdk/client-dynamodb'; // eslint-disable-line import/no-extraneous-dependencies

export async function handler() {
console.log(s3);
}
const client = new DynamoDBClient();
const input = {
TableName: process.env.TABLE_NAME,
};
const command = new DescribeTableCommand(input);
const response = await client.send(command);
console.log(response);
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/* eslint-disable no-console */
import { S3 } from '@aws-sdk/client-s3'; // eslint-disable-line import/no-extraneous-dependencies
// @ts-ignore
import delay from 'delay';

const s3 = new S3();

export async function handler() {
console.log(s3);
await delay(5);
}
console.log('log after delay');
}

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 e9e800f

Please sign in to comment.