provider/aws: Retry Lambda func creation on IAM error (#15067)

This commit is contained in:
Radek Simko 2017-06-05 09:49:29 +01:00 committed by GitHub
parent 3136600e8f
commit b14b81f27d
1 changed files with 4 additions and 0 deletions

View File

@ -342,6 +342,10 @@ func resourceAwsLambdaFunctionCreate(d *schema.ResourceData, meta interface{}) e
log.Printf("[DEBUG] Received %s, retrying CreateFunction", err)
return resource.RetryableError(err)
}
if isAWSErr(err, "InvalidParameterValueException", "The provided execution role does not have permissions") {
log.Printf("[DEBUG] Received %s, retrying CreateFunction", err)
return resource.RetryableError(err)
}
return resource.NonRetryableError(err)
}