Skip to content

Commit

Permalink
Set AWS_SECURITY_TOKEN.
Browse files Browse the repository at this point in the history
  • Loading branch information
ejholmes committed Jan 26, 2016
1 parent 8eecbfc commit 4690335
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func execWithCredentials(argv []string, creds *credentials) error {
env = append(env, fmt.Sprintf("AWS_ACCESS_KEY_ID=%s", creds.AccessKeyId))
env = append(env, fmt.Sprintf("AWS_SECRET_ACCESS_KEY=%s", creds.SecretAccessKey))
env = append(env, fmt.Sprintf("AWS_SESSION_TOKEN=%s", creds.SessionToken))
env = append(env, fmt.Sprintf("AWS_SECURITY_TOKEN=%s", creds.SessionToken))
return syscall.Exec(argv0, argv, env)
}

Expand All @@ -65,6 +66,7 @@ func printCredentials(creds *credentials) {
fmt.Printf("export AWS_ACCESS_KEY_ID=\"%s\"\n", creds.AccessKeyId)
fmt.Printf("export AWS_SECRET_ACCESS_KEY=\"%s\"\n", creds.SecretAccessKey)
fmt.Printf("export AWS_SESSION_TOKEN=\"%s\"\n", creds.SessionToken)
fmt.Printf("export AWS_SECURITY_TOKEN=\"%s\"\n", creds.SessionToken)
fmt.Printf("# Run this to configure your shell:\n")
fmt.Printf("# eval $(%s)\n", strings.Join(os.Args, " "))
}
Expand Down

0 comments on commit 4690335

Please sign in to comment.