Skip to content

Commit

Permalink
guard on both accessdenied (no IAM policy) and validationerror (no us…
Browse files Browse the repository at this point in the history
…ername specified)
  • Loading branch information
catsby committed Aug 7, 2015
1 parent 31fab62 commit eb90457
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/providers/aws/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (c *Config) ValidateCredentials(iamconn *iam.IAM) error {

if awsErr, ok := err.(awserr.Error); ok {

if awsErr.Code() == "AccessDenied" {
if awsErr.Code() == "AccessDenied" || awsErr.Code() == "ValidationError" {
log.Printf("[WARN] AccessDenied Error with iam.GetUser, assuming IAM profile")
// User may be an IAM instance profile, or otherwise IAM role without the
// GetUser permissions, so fail silently
Expand Down

0 comments on commit eb90457

Please sign in to comment.