-
Notifications
You must be signed in to change notification settings - Fork 23
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
Upgrade to AWS SDK for Go v2 #1034
Conversation
cfg, err := config.LoadDefaultConfig(context.TODO()) | ||
if err != nil { | ||
log.Fatal("failed to load aws config", err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the v2 behaviour of config.LoadDefaultConfig
is identical to our previous setting of explicitly setting session.SharedConfigEnable
, as in it'll look into ~/.aws/config and ~/.aws/credentials. At least at I can confirm it works on my machine, correctly picking up config from ~/.aws/config (grabbing creds via a credential_process
so not the most straightforward config!).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nit, otherwise LGTM
go.mod
Outdated
require ( | ||
github.com/aws/aws-sdk-go-v2/credentials v1.17.28 // indirect | ||
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.12 // indirect | ||
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.16 // indirect | ||
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.16 // indirect | ||
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect | ||
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 // indirect | ||
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.18 // indirect | ||
github.com/aws/aws-sdk-go-v2/service/sso v1.22.5 // indirect | ||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.5 // indirect | ||
github.com/aws/aws-sdk-go-v2/service/sts v1.30.4 // indirect | ||
github.com/aws/smithy-go v1.20.4 // indirect | ||
) | ||
|
||
require ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we merge those require
blocks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally, on it 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with direct dependencies in the first block and indirect deps in the second block to match the current setup 👍
cd402d7
to
85fcf5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Pluies, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Bump AWS SDK for Go v2 as v1 is deprecated and soon to be unmaintained.
Which issue(s) this PR fixes:
Fixes #1019
Special notes for your reviewer:
See inline comment on instantiation of the aws client
Does this PR introduce a user-facing change?
No