Skip to content

Commit

Permalink
Merge pull request #3062 from terraform-providers/b-lambda-retry-on-t…
Browse files Browse the repository at this point in the history
…hrottle

resource/aws_lambda_function: Retry creation on throttle error
  • Loading branch information
radeksimko authored Jan 19, 2018
2 parents 5a91910 + 3630691 commit 979cd13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aws/resource_aws_lambda_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,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", "Your request has been throttled by EC2") {
log.Printf("[DEBUG] Received %s, retrying CreateFunction", err)
return resource.RetryableError(err)
}

return resource.NonRetryableError(err)
}
Expand Down

0 comments on commit 979cd13

Please sign in to comment.