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/external: Add Support for setting a default fallback region and resolving region from EC2 IMDS #523

Merged
merged 2 commits into from
Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
PR Feedback
  • Loading branch information
skmcgrail committed Apr 3, 2020
commit 92a87b1ca8585fef40847b7f25315cac71dd73d5
8 changes: 7 additions & 1 deletion CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ SDK Features
* `SignHTTP` replaces `Sign`, and usage of `Sign` should be migrated before it's removal at a later date
* `PresignHTTP` replaces `Presign`, and usage of `Presign` should be migrated before it's removal at a later date
* `DisableRequestBodyOverwrite` and `UnsignedPayload` are now deprecated options and have no effect on `SignHTTP` or `PresignHTTP`. These options will be removed at a later date.

* `aws/external`: Add Support for setting a default fallback region and resolving region from EC2 IMDS ([#523](https://github.com/aws/aws-sdk-go-v2/pull/523))
* `WithDefaultRegion` helper has been added which can be passed to `LoadDefaultAWSConfig`
* This helper can be used to configure a default fallback region in the event a region fails to be resolved from other sources
* Support has been added to resolve region using EC2 IMDS when available
* The IMDS region will be used if region as not found configured in either the shared config or the process environment.
* Fixes [#244](https://github.com/aws/aws-sdk-go-v2/issues/244)
* Fixes [#515](https://github.com/aws/aws-sdk-go-v2/issues/515)
SDK Enhancements
---
* `internal/ini`: Normalize Section keys to lowercase ([#495](https://github.com/aws/aws-sdk-go-v2/pull/495))
Expand Down
2 changes: 1 addition & 1 deletion aws/external/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func ResolveDefaultRegion(cfg *aws.Config, configs Configs) error {

region, found, err := GetDefaultRegion(configs)
if err != nil {
return nil
return err
}
if !found {
return nil
Expand Down