Reputation: 339
I have lambda function that take more than 5 min to run. How can I increase the execution time of lambda function more than 5 min so my program can keep going?
END RequestId: 5b676871-1eef-1xex-bxxa-47xxxxad8d63
The last line show this in cloudwatch. It automatically end the request.
Upvotes: 32
Views: 72585
Reputation: 1
You can increase lambda run time by going into configuration > time-out > update the time max 900 seconds / 15 minutes.
Upvotes: 0
Reputation: 219
Of course you can. My solution is:
Keep in mind lambda's original purpose is to run short task so it's better to keep your lambda function run within 15 mins.
Upvotes: 6
Reputation: 12548
You cannot increase the runtime to more than 15 minutes.
The AWS Lambda limit
page states the Function timeout
is 900 seconds (15 minutes)
. If you need more than 15 minutes of execution time you have to look at other services. You could have a look if AWS Batch would suit your needs.
Updated: The limit was changed from 5 minutes to 15 minutes.
Upvotes: 60
Reputation: 11926
You can set Timeout
properties of AWS lambda function up to maximum 15 minute.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html
Upvotes: 0
Reputation: 11
You cannot. If you need longer time then you need to spin-up an EC2 server instead.
Upvotes: 1