Skip to content

Commit

Permalink
Update SDK and document NewSession
Browse files Browse the repository at this point in the history
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
  • Loading branch information
mikkeloscar committed Dec 15, 2018
1 parent d685cc0 commit 4a715d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion docs/sdk-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Configuration is the same as for the [Python AWS SDK](#python-aws-sdk-boto3).

| SDK | Tested version |
|-----| -------------- |
| [aws-sdk-go](https://github.com/aws/aws-sdk-go) | `>=`[89ebd3a5f70a416b84e65ad55d9935b7ba72e2dc](https://github.com/aws/aws-sdk-go/commit/89ebd3a5f70a416b84e65ad55d9935b7ba72e2dc) (No release yet) |
| [aws-sdk-go](https://github.com/aws/aws-sdk-go) | `>=v1.16.2` |

Here's a minimal example of how to configure a deployment so each pod will get
the AWS credentials.
Expand Down Expand Up @@ -180,4 +180,10 @@ Also note that for this to work the docker image you use **MUST** contain the
program `cat`. [`cat` is called by the SDK to read the credentials from a
file](https://docs.aws.amazon.com/cli/latest/topic/config-vars.html#sourcing-credentials-from-external-processes).

Additionally it's important that your application initializes the AWS session
using the
[`session.NewSession()`](https://docs.aws.amazon.com/sdk-for-go/api/aws/session/#NewSession)
function which correctly initializes the credentials chain. Using the
DEPRECATED `session.New()` will **NOT** work!

See full [Golang example project](https://github.com/mikkeloscar/kube-aws-iam-controller-golang-example).
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/mikkeloscar/kube-aws-iam-controller
require (
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc // indirect
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf // indirect
github.com/aws/aws-sdk-go v1.15.31-0.20181207175608-cab8bf908aef
github.com/aws/aws-sdk-go v1.16.6
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.4.7 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5Vpd
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/aws/aws-sdk-go v1.15.31-0.20181207175608-cab8bf908aef h1:qBvoH4XVxBInRzqY+UbKSNn61BvlbbOwulXCAc2Ubh0=
github.com/aws/aws-sdk-go v1.15.31-0.20181207175608-cab8bf908aef/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.16.6 h1:pig/KdfESvIv4gUu1B8nVAJAURxbPCTt6e5u79Nqxqc=
github.com/aws/aws-sdk-go v1.16.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
Expand Down

0 comments on commit 4a715d1

Please sign in to comment.