Comments (12)
Is there an update on when this feature would be shipped out ?
from aws-sdk-java-v2.
Sorry, no update.
It's not our #1 priority, because with access points and other arn-based ways of accessing buckets/objects plus the use-arn-region flag, the SDK will automatically route the request to the correct region without the overhead of an extra call to AWS to find out where the bucket actually is.
I understand there's still value in this feature request, since the caller may not have a full bucket ARN.
from aws-sdk-java-v2.
If anyone thinks using ARNs like arn:aws:s3:::mybucket
will work, they won't #2244
from aws-sdk-java-v2.
@millems Hi. Any plan of supporting this feature ? A lot of people think they need this feature from the perspective of customers using AWS S3 products.
from aws-sdk-java-v2.
At some point, probably, but in the meantime you could try using access points which automatically support cross-region request routing.
from aws-sdk-java-v2.
@millems
Oh. That's good news. When are you expecting?
from aws-sdk-java-v2.
@pkgonan Unfortunately we have no expected date to report at this time.
from aws-sdk-java-v2.
@millems Thanks for your reply. :)
from aws-sdk-java-v2.
FYI we are working on adding cross-region S3 client to Spring Cloud AWS. It's early stage but looks promising so far: https://github.com/awspring/spring-cloud-aws/blob/3.0.x-s3/spring-cloud-aws-s3-parent/spring-cloud-aws-s3/src/main/java/io/awspring/cloud/s3/CrossRegionS3Client.java
Basic idea is that every region-specific method is wrapped in a try catch that on http status 301 uses client created for the region where the bucket got created. Clients are cached both by region and also by bucket name (to speed up subsequent calls for the same bucket). Implementation is a bit Spring specific as we use LRU cache from spring-core
, but if needed this can be replaced with something else or abstracted out.
Repetitive chunk of this class is generated with JavaParser. If you're interested this is a very sketchy implementation:
- https://github.com/awspring/spring-cloud-aws/blob/3.0.x-s3/spring-cloud-aws-s3-parent/spring-cloud-aws-s3-codegen/src/main/java/io/awspring/cloud/s3/codegen/CrossRegionS3ClientGenerator.java
- https://github.com/awspring/spring-cloud-aws/blob/3.0.x-s3/spring-cloud-aws-s3-parent/spring-cloud-aws-s3-codegen/src/main/java/io/awspring/cloud/s3/codegen/CrossRegionS3ClientTemplate.java
from aws-sdk-java-v2.
This feature has been released in 2.20.99
. You can enable it by setting crossRegionAccessEnabled
to true on the S3 client builder.
Example:
S3AsyncClient client = S3AsyncClient.builder()
.crossRegionAccessEnabled(true)
.build();
I'll go ahead and close this issue. As always, feedback is welcome! :)
from aws-sdk-java-v2.
⚠️ COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
from aws-sdk-java-v2.
So the addition of .crossRegionAccessEnabled(true)
is nice... but it still doesn't work with opt-in regions, even if your account is opted into the given region. For example, if I create an S3 client in the us-east-1
region and then try to head an object in an af-south-1
bucket that I own, it will result in a 400 error. Or if I create an S3 client in the af-south-1
region and then try to head an object in an us-east-1
bucket that I own, it will also result in a 400 error. The SDKv1 client didn't have this problem...
from aws-sdk-java-v2.
Related Issues (20)
- S3 TransferManger CRT Client OOM on large file upload HOT 4
- jackson-jr or third-party-jackson-core - which is it?
- dom4j dependency needs to be updated to 2.x to run on Java 11+ HOT 2
- Fluent Setters Not working with EnhancedClient HOT 3
- CloudFrontUtilities clobbers port number if present when signing URLs HOT 3
- S3 timing out on CI (tests using LocalStack) HOT 9
- Metadata will be lost when using s3TransferManager to copy large file HOT 3
- MIgration to Dynamodb V2 Is Really Rough HOT 4
- Auth doesn't work if SSO Session Name contains a space HOT 1
- S3CrtAsyncClientBuilder.build() should return S3CrtAsyncClient HOT 3
- Shared S3Client doesn't shutdown gracefully
- DynamoDbAutoGeneratedTimestampAttribute custom date format and time zone HOT 4
- Provide an example for using ErrorType metrics
- Empty Content-Encoding header with S3 CRT client HOT 4
- S3Client.builder() without credentials provider behaves differently than if set explicitly to DefaultCredentialsProvider.create() HOT 3
- S3 HeadBucket 301 Error HOT 3
- S3 CRT client is almost an order of magnitude slower than the Netty client HOT 5
- Polly: DescribeVoices does not return long-form in supported engines HOT 2
- EC2 Waiter `waitUntilInstanceRunning` Hanging When `DescribeInstancesRequest` Empty HOT 5
- sigv4 for Lattice unsigned-payload not supported for http requests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-java-v2.