- Newest
- Most votes
- Most comments
So, How do I get the long running process running using lambda?
Lambda cannot be used for processes that run for more than 15 minutes.
So I think we need to consider other AWS services.
Examples include AWS Batch and ECS.
We could also consider AWS Glue, which is suited for ETL and other processes.
https://docs.aws.amazon.com/batch/latest/userguide/what-is-batch.html
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html
https://docs.aws.amazon.com/glue/latest/dg/what-is-glue.html
I would like to increase the timeout of lambda function to 5Hrs. Can I get help from AWS team and get the timeout increased to 5Hrs?
Unfortunately, contacting AWS support will not create a Lambda that will run for more than 15 minutes.
Or is there any other ways to achieve this?
Please consider services other than Lambda here as explained above.
In this case, you may want to use AWS Glue since you already have the Python code.
https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python.html
As stated, Lambda functions can only run for up to 15 minutes. There is no way to extend that.
Your options are:
- Use a different service such as ECS Fargate.
- Break the processing into multiple, smaller chunks (not always possible), e.g., take the large file, break it into a few smaller files. Then a Lambda function can processes each chunk. You will use Step Functions to orchestrate the entire process.
Relevant content
- Accepted Answerasked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated a year ago
Hi Riku Kobayashi, Thank you for your input.
Need two clarifications regarding using custom libraries in Glue.
Context: I am currently exploring Glue and how best would it fit my requirement. For the data transformation logic I mentioned earlier, I need four python packages
issue with pandas libary:
Question: Could you please guide me how can I handle this scenario?
issue with ffmpeg-python libary: Unable to import ffmpeg-python into glue code even after linking the package from s3.
steps I did to link package to glue:
question: Is there any steps I missed to take?
I believe AWS Glue 4.0 can use pandas. https://aws.amazon.com/about-aws/whats-new/2022/11/introducing-aws-glue-4-0/?nc1=h_ls
It appears to be a problem as it appears to follow the procedure in this document. https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-python-libraries.html#aws-glue-programming-python-libraries-zipping
By the way, what command did you use to zip it?