File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -108,11 +108,11 @@ func main() {
108
108
return
109
109
}
110
110
111
- err = execWithCredentials (args , creds )
111
+ err = execWithCredentials (role , args , creds )
112
112
must (err )
113
113
}
114
114
115
- func execWithCredentials (argv []string , creds * credentials.Value ) error {
115
+ func execWithCredentials (role string , argv []string , creds * credentials.Value ) error {
116
116
argv0 , err := exec .LookPath (argv [0 ])
117
117
if err != nil {
118
118
return err
@@ -122,6 +122,7 @@ func execWithCredentials(argv []string, creds *credentials.Value) error {
122
122
os .Setenv ("AWS_SECRET_ACCESS_KEY" , creds .SecretAccessKey )
123
123
os .Setenv ("AWS_SESSION_TOKEN" , creds .SessionToken )
124
124
os .Setenv ("AWS_SECURITY_TOKEN" , creds .SessionToken )
125
+ os .Setenv ("ASSUMED_ROLE" , role )
125
126
126
127
env := os .Environ ()
127
128
return syscall .Exec (argv0 , argv , env )
You can’t perform that action at this time.
0 commit comments