return nil and exit out of the function for IAM instance profiles

This commit is contained in:
Sargurunathan Mohan 2015-09-23 16:40:46 -07:00
parent e7f33bf523
commit 803b33bcae
1 changed files with 1 additions and 0 deletions

View File

@ -221,6 +221,7 @@ func (c *Config) ValidateAccountId(iamconn *iam.IAM) error {
// User may be an IAM instance profile, so fail silently.
// If it is an IAM instance profile
// validating account might be superfluous
return nil
} else {
return fmt.Errorf("Failed getting account ID from IAM: %s", err)
// return error if the account id is explicitly not authorised