You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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, getRegionmethod, by replacing the DefaultAwsProviderChain with the new one.
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:
org.carlspring.cloud.storage.s3fs.S3AwsRegionProviderChain
.software.amazon.awssdk.regions.providers.AwsRegionProviderChain
.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.org.carlspring.cloud.storage.s3fs.S3Factory
class,getRegion
method, by replacing theDefaultAwsProviderChain
with the new one.Task Relationships
This task:
Useful Links
Help
The text was updated successfully, but these errors were encountered: