-
Notifications
You must be signed in to change notification settings - Fork 25
Closed
Labels
hacktoberfestPre-selected issues for HacktoberfestPre-selected issues for Hacktoberfesthelp wantedExtra attention is neededExtra attention is needed
Milestone
Description
Task Description
The S3Factory
class manages the build of a new Amazon S3 instance, which needs a region. This is provided by getting it from a properties file, and, in the case there's no property defined, the region is obtained by using a default region provider chain.
As specified in this Pull Request discussion, although it's highly unlikely, there could be a different region provider chain needed by a consumer of the API (this would have to be custom, as the SDK only has Default). Might want to provide a customization option for this, rather than hard coding new DefaultAwsRegionProviderChain
.
Tasks
The following tasks will need to be carried out:
- Create a custom provider class
org.carlspring.cloud.storage.s3fs.S3AwsRegionProviderChain
. - This class must extend from
software.amazon.awssdk.regions.providers.AwsRegionProviderChain
. - This class must have a constructor which will call its parent constructor to define a list of region providers, which will be (for the moment), in this order:
software.amazon.awssdk.regions.providers.SystemSettingsRegionProvider
software.amazon.awssdk.regions.providers.AwsProfileRegionProvider
-
getRegion
method should not be overridden, so method from parent will be used. - Use this new provider chain in
org.carlspring.cloud.storage.s3fs.S3Factory
class,getRegion
method, by replacing theDefaultAwsProviderChain
with the new one.
Task Relationships
This task:
- Is a follow-up of: Upgrade to aws-sdk-java-v2 #63
Useful Links
Help
- Our chat channel
- Points of contact:
Metadata
Metadata
Assignees
Labels
hacktoberfestPre-selected issues for HacktoberfestPre-selected issues for Hacktoberfesthelp wantedExtra attention is neededExtra attention is needed