Skip to content

Feature request: pre-populate Aws.config from environment #2112

Open
@jonathanhefner

Description

@jonathanhefner

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.needs-major-versionCan only be considered for the next major releasep3This is a minor priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions