Skip to content

Commit 30beb10

Browse files
authored
chore(cdk-assets): disable JS SDKv2 warning message (#24613)
The JS SDKv2 is starting to emit a warning message to scare people away: ``` (node:25530) NOTE: We are formalizing our plans to enter AWS SDK for JavaScript (v2) into maintenance mode in 2023. Please migrate your code to use AWS SDK for JavaScript (v3). For more information, check the migration guide at https://a.co/7PzMCcy (Use `node --trace-warnings ...` to show where the warning was created) ``` We are aware, and will migrate eventually. In the mean time, let's not bother our users with this warning. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 97797c4 commit 30beb10

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/cdk-assets/lib/aws.ts

+4
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ export class DefaultAwsClient implements IAws {
5353
if (profile) {
5454
process.env.AWS_PROFILE = profile;
5555
}
56+
// Stop SDKv2 from displaying a warning for now. We are aware and will migrate at some point,
57+
// our customer don't need to be bothered with this.
58+
process.env.AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE = '1';
59+
5660

5761
// We need to set the environment before we load this library for the first time.
5862
// eslint-disable-next-line @typescript-eslint/no-require-imports

0 commit comments

Comments
 (0)