From ece6f30a21ee841f26bf88a66c77a704943ada42 Mon Sep 17 00:00:00 2001 From: Jeremy Asher Date: Mon, 14 Nov 2016 15:43:22 -0800 Subject: [PATCH] increase aws_lambda_function timeout Since the Lambda CreateFunction call may include an up to 50MB payload, the request can easily take more than a minute. This increases the timeout to 10 minutes. --- builtin/providers/aws/resource_aws_lambda_function.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/providers/aws/resource_aws_lambda_function.go b/builtin/providers/aws/resource_aws_lambda_function.go index 03db70170..50587ac86 100644 --- a/builtin/providers/aws/resource_aws_lambda_function.go +++ b/builtin/providers/aws/resource_aws_lambda_function.go @@ -223,7 +223,7 @@ func resourceAwsLambdaFunctionCreate(d *schema.ResourceData, meta interface{}) e // IAM profiles can take ~10 seconds to propagate in AWS: // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#launch-instance-with-role-console // Error creating Lambda function: InvalidParameterValueException: The role defined for the task cannot be assumed by Lambda. - err := resource.Retry(1*time.Minute, func() *resource.RetryError { + err := resource.Retry(10*time.Minute, func() *resource.RetryError { _, err := conn.CreateFunction(params) if err != nil { log.Printf("[ERROR] Received %q, retrying CreateFunction", err)