From c535aa13819aef74b15fe45ab6ece2acb85c5727 Mon Sep 17 00:00:00 2001 From: Daniel Tinney <71640104+dnltinney@users.noreply.github.com> Date: Mon, 5 Jul 2021 01:34:46 +0200 Subject: [PATCH] added session.Option: AssumeRoleTokenProvider (#21) when .aws/config uses mfa_serial --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 0a2352f..077caf8 100644 --- a/main.go +++ b/main.go @@ -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" @@ -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 {