Open kuhe opened 1 year ago
September 25th, 2023: a warning is now emitted when the @aws-sdk/signature-v4-crt
package is loaded dynamically by the SDK when executing an operation that requires it. The warning instructs the user to explicitly import the package instead.
This warning will become an error going forward from the date the announced change is finalized.
We're expecting to finalize this change on or soon after October 25, 2023.
Could this be added to the documentation? Ideally at least in the readme for the eventbridge client and the eventbridge docs (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-global-endpoints.html#eb-ge-sdk-update). It's mentioned very briefly there, but nothing actually explains how you have to import this.
This change has been merged and will be in the next release.
Is it posible to use an MRAP endpoint with amplify-js?
Amplify.configure({
Storage: {
S3: {
bucket: 'arn:aws:s3::<Account-ID>:accesspoint/<MY_MRAP_ID>.mrap)',
region: 'us-east-1'
}
}
});
https://docs.amplify.aws/javascript/tools/libraries/configure-categories/#storage-amazon-s3
aws-crt
is currently not available in the browser, so I do not expect MRAP to work in that case.
Announcement
In an upcoming release for the AWS SDK for JavaScript v3, version TBD, the usage of the
@aws-sdk/signature-v4-crt
package will change.*** this has been merged will be released on Oct 26, 2023.
See PR: https://github.com/aws/aws-sdk-js-v3/pull/5225
Who is affected?
Users of
@aws-sdk/signature-v4-crt
. This is an optional package used by the S3 MRAP feature and EventBridge clients. https://www.npmjs.com/package/@aws-sdk/signature-v4-crtWhat is changing and why?
Currently, this package is imported dynamically by SDK code calling the Node.js
require
global function. Because this is disruptive to bundlers both in the browser and server-side, and because it is difficult to analyze statically, the dynamic import is being removed.Users will need to make an explicit call or import statement to register the functionality of the optional package. Instructions from the PR are duplicated here:
Code example (ESM):
Code example (CJS):
You can make this change to your code in any SDK version, ahead of time, to prepare for the change.
After it is released, an error will be thrown if the import is missing. It will say:
and the docs in our readme will be updated to the same.