Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
setting AWS_PROFILE as part of exec leads to errors in some apps:
Browse files Browse the repository at this point in the history
- Some apps (for example, packer) use the AWS_PROFILE setting to
  determine which profile to load out of ~/.aws/config shared config.
  The problem is that these profiles don't have associated
  credentials, so those applications fail.  Instead, don't set
  profile, and the applications just use the AWS_ACCESS_KEY_ID and
  AWS_SECRET_ACCESS_KEY vars.
  • Loading branch information
Daniel Fuentes committed Mar 22, 2018
1 parent 4f26eaa commit ce53cb8
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion cmd/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ func execRun(cmd *cobra.Command, args []string) error {

env.Set("AWS_ACCESS_KEY_ID", creds.AccessKeyID)
env.Set("AWS_SECRET_ACCESS_KEY", creds.SecretAccessKey)
env.Set("AWS_PROFILE", profile)

if creds.SessionToken != "" {
env.Set("AWS_SESSION_TOKEN", creds.SessionToken)
Expand Down

0 comments on commit ce53cb8

Please sign in to comment.