diff --git a/packages/signature-v4-multi-region/src/load-crt.ts b/packages/signature-v4-multi-region/src/load-crt.ts index 1b0c93c74637..a96f46fbf7a5 100644 --- a/packages/signature-v4-multi-region/src/load-crt.ts +++ b/packages/signature-v4-multi-region/src/load-crt.ts @@ -13,6 +13,20 @@ export function loadCrt(): void { const __require = require; const moduleName = "@aws-sdk/signature-v4-crt"; __require.call(null, moduleName); + + process.emitWarning( + `The package @aws-sdk/signature-v4-crt has been loaded dynamically. +To avoid this warning, please explicitly import the package in your application with: + +import "@aws-sdk/signature-v4-crt"; // ESM +require("@aws-sdk/signature-v4-crt"); // CJS + +In a future version of the AWS SDK for JavaScript (v3), this warning +will become an error and dynamic loading will not be available. + +See https://github.com/aws/aws-sdk-js-v3/issues/5229. +` + ); } } catch (e) { // ignored.