rasta-rocket opened a new pull request, #1320:
URL: https://github.com/apache/iceberg-go/pull/1320

   ## Problem
   
   When using the Glue catalog, the CLI always resolves AWS credentials through 
the SDK default chain.
   Users working with multiple AWS accounts or roles had to fall back to 
environment variables (`AWS_PROFILE`) or profile-switching wrappers instead of 
expressing the profile in their iceberg-go config (1 catalog = 1 account = 1 
profile).
   
   ## Fix
   
   Add an `aws-profile` field to `CatalogConfig` in `config/config.go`.
   When the Glue catalog is initialised in `initCatalog`, the profile is passed 
to `awsconfig.LoadDefaultConfig` via `WithSharedConfigProfile`.
   A matching `--aws-profile` CLI flag is also wired up and takes precedence 
over the config file value (following the same merge pattern used by the other 
catalog flags).
   
   ## How to test
   
   Add an entry to `~/.iceberg-go.yaml`:
   
   ```yaml
   catalog:
     default:
       type: glue
       aws-profile: my-aws-profile
   ```
   
   Run any Glue command and confirm it authenticates with the named profile:
   ```
   iceberg list
   ```
   
   Alternatively, supply it on the command line:
   ```
   iceberg --catalog glue --aws-profile my-aws-profile list
   ```
   
   Unit test:
   ```
   go test ./config/...
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to