diff --git a/builtin/providers/aws/config.go b/builtin/providers/aws/config.go index b0afbb65b9..711362a691 100644 --- a/builtin/providers/aws/config.go +++ b/builtin/providers/aws/config.go @@ -217,11 +217,11 @@ func (c *Config) Client() (interface{}, error) { if err == nil { client.accountid = accountId } + } - authErr := c.ValidateAccountId(client.accountid) - if authErr != nil { - errs = append(errs, authErr) - } + authErr := c.ValidateAccountId(client.accountid) + if authErr != nil { + errs = append(errs, authErr) } client.apigateway = apigateway.New(sess)