Skip to content

Commit

Permalink
provider/aws: Retry Lambda func creation on IAM error (#15067)
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko authored Jun 5, 2017
1 parent 3136600 commit b14b81f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions builtin/providers/aws/resource_aws_lambda_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit b14b81f

Please sign in to comment.