Skip to content

Commit

Permalink
Merge pull request #1 from remind101/security-token
Browse files Browse the repository at this point in the history
Set AWS_SECURITY_TOKEN.
  • Loading branch information
ejholmes committed Jan 26, 2016
2 parents 5ab7e89 + 4690335 commit 25dfc34
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 @@ -60,6 +60,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 @@ -75,6 +76,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 25dfc34

Please sign in to comment.