Skip to content

Commit e2b9012

Browse files
authoredJan 23, 2024
docs(upgrading): add section for S3 global client (#5714)
1 parent 5abf7c9 commit e2b9012

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎UPGRADING.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,10 @@ In v3, [`@aws-sdk/s3-request-presigner` package](https://github.com/aws/aws-sdk-
452452
is available. You don't have to differentiate `getSignedUrl()` and `getSignedUrlPromise()` any more. We also have [a blog](https://aws.amazon.com/blogs/developer/generate-presigned-url-modular-aws-sdk-javascript/)
453453
discussing the details of this package.
454454

455+
## S3 Global Client (Region Redirects)
456+
457+
S3 client in v3 supports S3 global client, or following region redirects, if an incorrect region is passed and a subsequent `PermanentRedirect` (status 301) error is thrown. You can use the [`followRegionRedirects`](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-middleware-sdk-s3/Interface/S3InputConfig/) flag in the client config to make the S3 client follow region redirects and support its function as a global client. Note that this can result in additional latency as failed requests are retried with a corrected region when receiving a `PermanentRedirect` error with status 301. This feature should only be used as a last resort if you do not know the region of your bucket(s) ahead of time.
458+
455459
## DynamoDB Document Client
456460

457461
In v2, you can use the [`AWS.DynamoDB.DocumentClient` class](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html)
@@ -576,4 +580,3 @@ const region = "...";
576580
console.log("Invoke response object", payloadObject);
577581
}
578582
```
579-

0 commit comments

Comments
 (0)
Please sign in to comment.