-
Notifications
You must be signed in to change notification settings - Fork 49
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
Create a StaticRegionProvider #1005
Comments
Is this just a "nice to have" request or is this blocking something for you? As far as I understand the request you can get this now by wrapping client creation in a way that you consult your own region provider and pass that to client construction. e.g. val resolvedRegion = regionProvider.getRegion()
val s3 = S3Client.fromEnvironment{
region = resolvedRegion
}
|
Not blocking anything atm, have done as noted above, creating our own StaticRegionProvider driven by configuration. Q: what are RegionProviders used for in Kotlin SDK? They aren't symmetrical with CredentialsProvider behaviour (provider set at construction time, queried for each API call). Kotlin SDK clients look to use a stringly-typed region parameter at construction time. |
They're used in |
Hi @cloudshiftchris, After reviewing this thread with the team, we need more clarification about your use case. Since region is static and can be directly set during client construction (e.g. region = "us-east-1"), could you explain why a StaticRegionProvider would be necessary? What specific scenario requires this that can't be handled by the current region parameter? This would help us better understand if there's a gap in functionality that needs to be addressed. Thanks. |
@RanVaknin this came from some configuration code we have to create/configure SDK clients; for the region stuff one can specify where (in order) to pull the region from:
...that is then used in this code snippet to create a
...ultimately we boil this down to setting the region on SDK client creation:
|
Thanks for the additional info @cloudshiftchris. I can see now how a |
Thanks @ianbotsf . If it helps here's our implementation:
|
Describe the feature
Create a
StaticRegionProvider
class to explicitly set a region to use.Is your Feature Request related to a problem?
Currently Kotlin SDK does not have a mechanism to explicitly set the region via a RegionProvider; this is useful for say development environments (outside of AWS) where the region can't be directly inferred and configuration is integrated with other application configuration (i.e. no using system properties or environment variables)
Proposed Solution
Describe alternative solutions or features you've considered
See proposed solution.
Acknowledge
AWS Kotlin SDK version used
029.0-beta
Platform (JVM/JS/Native)
JVM
Operating System and version
MacOS
The text was updated successfully, but these errors were encountered: