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

SDK RegionProviders are internal, preventing external composition #1002

Closed
cloudshiftchris opened this issue Jul 28, 2023 · 1 comment · Fixed by #1123
Closed

SDK RegionProviders are internal, preventing external composition #1002

cloudshiftchris opened this issue Jul 28, 2023 · 1 comment · Fixed by #1123
Assignees
Labels
bug This issue is a bug.

Comments

@cloudshiftchris
Copy link

Describe the bug

Working through converting code from Java SDK to Kotlin SDK; where we have configurability for region providers, such as:

  region:
    static: # default: null; region name, e.g. ca-central-1
    system-settings: # default: false; use environment variable or JVM property AWS_REGION
    instance-profile: # default: true; region from IMDS
    profile: # default: null; region from the specified profile name

...the equivalent is not directly possible with Kotlin SDK as all the RegionProviders are internal, preventing using them in alternate ways.

Specifically:

  • JvmSystemPropRegionProvider
  • EnvironmentRegionProvider
  • ProfileRegionProvider
  • ImdsRegionProvider
  • DefaultRegionProviderChain

The only public class is RegionProviderChain, which is odd given that no concrete providers are available to use in that chain.

Expected behavior

Much like CredentialsProviders one can compose a custom RegionProviderChain to satisfy various use cases.

Current behavior

All the concrete implementations of RegionProvider are marked as internal and not available to use.

Steps to Reproduce

n/a

Possible Solution

Expose the noted internal classes as public

Context

Prevents direct migration from Java SDK; unclear at this time how to proceed, given that some of the RegionProvider implementations are non-trivial (imds & profile).

AWS Kotlin SDK version used

0.29.0-beta

Platform (JVM/JS/Native)

JVM

Operating System and version

MacOS

@cloudshiftchris cloudshiftchris added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 28, 2023
@aajtodd aajtodd removed the needs-triage This issue or PR still needs to be triaged. label Jul 31, 2023
@aajtodd aajtodd self-assigned this Nov 20, 2023
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants