terraform-provider-aws: Lambda create timeout with large files
Community Note
- Please vote on this issue by adding a π reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave β+1β or βme tooβ comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version
Terraform v0.11.7
+ provider.aws v1.18.0
Affected Resource(s)
- aws_lambda_function
Expected Behavior
Creating a lambda function with a 16mb file on a slow connection should work, albeit slowly.
Actual Behavior
It quickly times out.
module.lambda.aws_lambda_function.lambda: Creating...
arn: "" => "<computed>"
description: "" => "..."
environment.#: "" => "1"
environment.0.variables.%: "" => "2"
environment.0.variables.DOMAINS: "" => "..."
environment.0.variables.EMAIL_ADDRESS: "" => "..."
filename: "" => "large-file.zip"
function_name: "" => "..."
handler: "" => "main.lambda_handler"
invoke_arn: "" => "<computed>"
last_modified: "" => "<computed>"
memory_size: "" => "128"
publish: "" => "false"
qualified_arn: "" => "<computed>"
reserved_concurrent_executions: "" => "0"
role: "" => "..."
runtime: "" => "python3.6"
source_code_hash: "" => "<computed>"
source_code_size: "" => "<computed>"
timeout: "" => "300"
tracing_config.#: "" => "<computed>"
version: "" => "<computed>"
module.lambda.aws_lambda_function.lambda: Still creating... (10s elapsed)
module.lambda.aws_lambda_function.lambda: Still creating... (20s elapsed)
module.lambda.aws_lambda_function.lambda: Still creating... (30s elapsed)
module.lambda.aws_lambda_function.lambda: Still creating... (40s elapsed)
module.lambda.aws_lambda_function.lambda: Still creating... (50s elapsed)
module.lambda.aws_lambda_function.lambda: Still creating... (1m0s elapsed)
module.lambda.aws_lambda_function.lambda: Still creating... (1m10s elapsed)
module.lambda.aws_lambda_function.lambda: Still creating... (1m20s elapsed)
module.lambda.aws_lambda_function.lambda: Still creating... (1m30s elapsed)
Error: Error applying plan:
1 error(s) occurred:
* module.lambda.aws_lambda_function.lambda: 1 error(s) occurred:
* aws_lambda_function.lambda: Error creating Lambda function: timeout while waiting for state to become 'success' (timeout: 1m0s)
Steps to Reproduce
Use aws_lambda_function with filename pointing to a large file, and try to apply it.
Important Factoids
A workaround is to first create the function with a small file and then modify it to use the big file, as per this comment in an unrelated issue.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 18
- Comments: 20 (5 by maintainers)
Pull request submitted to allow a configurable timeout (defaults to 10 minutes) for these slower uploads: #6409
+1
Same issue: run into Error creating Lambda function: Error creating Lambda function: timeout while waiting for state to become βsuccessβ (timeout: 1m0s) but when I look at the functions after terraform apply, the function exists and has been created. Also, my timeout = 300 seems to be ignored because terraform says: timeout 1m0s whereas it should be mins.
The fix for this has been merged and will release with version 1.43.1 of the AWS provider shortly (likely next hour or so). π Sorry for the previous troubles and happy to help!
Yay π
Thank you @bflad. This is hugely valuable when dealing with large deployment packages or slow Internet connections.
+1 The same problem here file with 4,6mb