Skip to content
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

aws/session: Add support for shared config (~/.aws/config) file #761

Merged
merged 3 commits into from
Aug 2, 2016

Commits on Jul 29, 2016

  1. aws/session: Add support for shared config (~/.aws/config) file

    Adds opt-in support for loading the SDK's configuration from the shared
    config file (~/.aws/config) in addition to the current shared configuration
    file (~/.aws/credentials). This option can be enabled with the env var
    `AWS_SDK_LOAD_CONFIG` set to a truthy value, or creating a session with the
    `session.NewFromSharedConfig()` helper instead of `session.New()`.
    
    In addition to loading from the shared config file the SDK will also now
    load region from the shared credentials file when the share config is
    enabled. This changes also treats the syntax of both shared config and
    credentials as the same.
    
    See the session package for more information and examples.
    
    Adds shared config support for aws#384
    jasdel committed Jul 29, 2016
    Configuration menu
    Copy the full SHA
    8b8ad5b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9231276 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2016

  1. aws/session: Add load session with Assume Role creds from shared config

    Updates the SDK to take advantage of the new `AWS_SDK_LOAD_CONFIG`
    environment variable. When set to a truthy value, as defined in
    strconv.ParseBool, the SDK will load both shared config file
    (~/.aws/config), and the shared credentials file (~/.aws/credentials).
    The shared credentials file has precedence over the shared config.
    
    Both config files share the same format. Both `[name]` and `[profile name]`
    are accepted as section names. The first, `[name]` will be looked for
    first before falling back to `[profile name]` per config file.
    
    See the [session](http://docs.aws.amazon.com/sdk-for-go/api/aws/session/) package docs for more information.
    
    Deprecates the `session.New` method since it cannot return an error
    when the session fails to load until a request is made.
    `session.NewSession` corrects this by returning an error when creating
    the session.
    jasdel committed Aug 1, 2016
    Configuration menu
    Copy the full SHA
    f23263f View commit details
    Browse the repository at this point in the history