Feature request: pre-populate Aws.config from environment
- Dominant language
- Ruby
- Stars
- 3.7k
- Forks
- 1.2k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 5
Description
### Issue description
Would it be feasible to pre-populate `Aws.config` from the runtime environment? For example, if `ENV["AWS_REGION"]` is set (and non-empty), then by default `Aws.config[:region] == ENV["AWS_REGION"]`. Likewise for any settings picked up from "~/.aws" or elsewhere.
This would enable in-app configuration code like the following:
```ruby
Aws.config[:region] ||= "us-east-1"
```
Where a reasonable default is provided, but can overridden from the outside, without code modification.
Additionally, it may be useful when one wants to test what config values are being picked up from the environment, for example, when debugging.
### Gem name ('aws-sdk', 'aws-sdk-resources' or service gems like 'aws-sdk-s3') and its version
`aws-sdk`
### Version of Ruby, OS environment
any
### Code snippets / steps to reproduce
N/A
Contributor guide
Assessment
This issue has not been assessed yet.