diff --git a/builtin/providers/aws/config.go b/builtin/providers/aws/config.go index 7cc29b285d70..fc301cd0483b 100644 --- a/builtin/providers/aws/config.go +++ b/builtin/providers/aws/config.go @@ -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