Skip to content

Commit

Permalink
added session.Option: AssumeRoleTokenProvider (#21)
Browse files Browse the repository at this point in the history
when .aws/config uses mfa_serial
  • Loading branch information
0xdnL authored Jul 4, 2021
1 parent 36302a4 commit c535aa1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/apex/log/handlers/cli"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sqs"
"github.com/fatih/color"
Expand Down Expand Up @@ -47,8 +48,9 @@ func main() {
kingpin.Parse()

options := session.Options{
Profile: *profile,
SharedConfigState: session.SharedConfigEnable,
Profile: *profile,
SharedConfigState: session.SharedConfigEnable,
AssumeRoleTokenProvider: stscreds.StdinTokenProvider,
}

if region != nil {
Expand Down

0 comments on commit c535aa1

Please sign in to comment.