Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS_REGION is ignored => region is locked to us-east-1 #353

Closed
bbilger opened this issue Jan 9, 2024 · 3 comments
Closed

AWS_REGION is ignored => region is locked to us-east-1 #353

bbilger opened this issue Jan 9, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@bbilger
Copy link

bbilger commented Jan 9, 2024

It's currently not possible to change the region e.g. via AWS_REGION or whatever the provider chain would consider.
The problem is that Region.US_EAST is set on the builder when none is provided; and none can be provided currently in anyway. Thus it is locked to that region.

return (regionName == null || regionName.isBlank()) ? Region.US_EAST_1 : Region.of(regionName);

This problem happens primarily for 3rd party providers but it can also happen for AWS buckets when the region cannot be determined.

logger.warn("Unable to determine the region of bucket: '{}'. Generating a client for the profile region.",

bbilger added a commit to bbilger/aws-java-nio-spi-for-s3 that referenced this issue Jan 9, 2024
...and as such leave the decision to the provider chain (e.g. env var AWS_REGION)
@markjschreiber markjschreiber added the bug Something isn't working label Jan 10, 2024
@markjschreiber
Copy link
Contributor

Can you check if this is resolved by PR #400 ?

@markjschreiber
Copy link
Contributor

Closing as PR 400 removes the defaulting to region us-east-1.

@bbilger
Copy link
Author

bbilger commented May 25, 2024

Can you check if this is resolved by PR #400 ?

Looks good, thanks - sorry for the delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants