From 36306914cb7feacfacb07dc9408a805f8d0b48f8 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Fri, 19 Jan 2018 09:35:32 +0000 Subject: [PATCH] resource/aws_lambda_function: Retry creation on throttle error --- aws/resource_aws_lambda_function.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aws/resource_aws_lambda_function.go b/aws/resource_aws_lambda_function.go index efd3ee7c177..1f489768f1f 100644 --- a/aws/resource_aws_lambda_function.go +++ b/aws/resource_aws_lambda_function.go @@ -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) }