Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress AWS SDK v2 deprecation message

I am seeing an awful lot of this message:

NOTE: The AWS SDK for JavaScript (v2) will be put 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)

Is it possible to suppress it?

(It's not my code base, so out of my control to upgrade to v3).

like image 749
Steve Bennett Avatar asked Sep 04 '25 04:09

Steve Bennett


1 Answers

The best way to suppress this warning (as documented by AWS) is to use an environment variable like so:

process.env.AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE = '1';

OR

AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE=1 node my_program.js

Source: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/

like image 149
Anjul Garg Avatar answered Sep 05 '25 18:09

Anjul Garg