Giter Club home page Giter Club logo

Comments (12)

manasshukla avatar manasshukla commented on July 1, 2024 10

Is there an update on when this feature would be shipped out ?

from aws-sdk-java-v2.

millems avatar millems commented on July 1, 2024

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.

byF avatar byF commented on July 1, 2024

If anyone thinks using ARNs like arn:aws:s3:::mybucket will work, they won't #2244

from aws-sdk-java-v2.

pkgonan avatar pkgonan commented on July 1, 2024

@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.

millems avatar millems commented on July 1, 2024

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.

pkgonan avatar pkgonan commented on July 1, 2024

@millems
Oh. That's good news. When are you expecting?

from aws-sdk-java-v2.

millems avatar millems commented on July 1, 2024

@pkgonan Unfortunately we have no expected date to report at this time.

from aws-sdk-java-v2.

pkgonan avatar pkgonan commented on July 1, 2024

@millems Thanks for your reply. :)

from aws-sdk-java-v2.

maciejwalkowiak avatar maciejwalkowiak commented on July 1, 2024

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:

from aws-sdk-java-v2.

zoewangg avatar zoewangg commented on July 1, 2024

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.

github-actions avatar github-actions commented on July 1, 2024

⚠️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.

dasmowenator avatar dasmowenator commented on July 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.