Skip to content

Commit

Permalink
update code check to validation error
Browse files Browse the repository at this point in the history
  • Loading branch information
catsby committed Aug 7, 2015
1 parent 77636bc commit 62cea2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion builtin/providers/aws/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ func (c *Config) ValidateCredentials(iamconn *iam.IAM) error {
_, err := iamconn.GetUser(nil)

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

if awsErr.Code() == "ValidationError" {
log.Printf("[WARN] Validation 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
return nil
Expand Down

0 comments on commit 62cea2d

Please sign in to comment.