[BUG] - AWS_REGION mandatory - AWS STS client instantiated inside PolarisService not in PolarisCore
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 522
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 137
Description
### Is this a possible security vulnerability?
- [X] This is NOT a possible security vulnerability
### Describe the bug
Hello,
Maybe I am wrong and this is an expected behavior.
If there is no AWS_REGION setted in the environnement where Polaris is running (inMemory), the action of creating a catalog throw an error during the initialization of the STS Client.
### To Reproduce
- Do not have AWS_REGION setted in environnement running Polaris
- start Polaris in mode "InMemory" (metaStoreManagerFactory == InMemoryPolarisMetaStoreManagerFactory)
- after Polaris is started with success
- create a catalog (with curl by example)
- STSClient fail during instantiation in polaris-service/src/main/java/org/apache/polaris/service/PolarisApplication.java line 160 (metaStoreManagerFactory)
### Actual Behavior
- In polaris-service/src/main/java/org/apache/polaris/service/PolarisApplication.java
- line 160 the PolarisStorageIntegrationProviderImpl will try to intantiate by default a AWS stsClient
- without AWS_REGION setted, it's failing
### Expected Behavior
- Maybe let the "Polaris Core" storage implementation fully manage this STS client (why is it instantiated in the "Polaris Service" ?)
- Maybe set a default Region in the STSbuilder to avoid an error ?
### Additional context
In case of a GCP or Azure deployment, AWS_REGION should not be mandatory.
### System information
Dev mode
Contributor guide
Research direction
Start in polaris-service/src/main/java/org/apache/polaris/service/PolarisApplication.java around line 160 and reproduce the catalog-creation flow in InMemory mode without AWS_REGION. Trace why PolarisStorageIntegrationProviderImpl instantiates an AWS STS client during initialization. Done means catalog creation works without AWS_REGION for InMemory deployments, including non-AWS environments, with the relevant behavior verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, java
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100