Win a copy of High Performance Python for Data Analytics this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Why is there a 15 minute limit for how long the AWS lambda code can execute?

 
Ranch Foreman
Posts: 2348
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
AWS lambda can run for a maximum of 15 minutes.  Reference : https://aws.amazon.com/lambda/faqs/#:~:text=Q%3A%20How%20long%20can%20an,1%20second%20and%2015%20minutes.

Why is there a 15 minute limit on how long the AWS lambda code can run?  I had also read about a limit in case of Azure Functions (the equivalent of AWS lambda on Azure). Why are those not allowed to run for long time?

Thanks.
 
Saloon Keeper
Posts: 12628
273
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two reasons I can think of.

If lambda's didn't have a known hard limit, when would Amazon be allowed to scale down their running servers?

Wouldn't you be upset if you accidentally wrote a lambda that executed indefinitely, and Amazon charged you for it?
 
Saloon Keeper
Posts: 6803
162
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Long running jobs likely have different execution properties than lambdas. AWS Batch is probably better suited for those than AWS Lambda.
 
Monica Shiralkar
Ranch Foreman
Posts: 2348
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:Long running jobs likely have different execution properties than lambdas. AWS Batch is probably better suited for those than AWS Lambda.



Thanks. Okay, AWS batch which is another PAAS (but not serverless and does not involve auto scaling). Yes, since AWS lambda does automatic scaling long running jobs is not an option.
 
Monica Shiralkar
Ranch Foreman
Posts: 2348
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stephan van Hulst wrote:

If lambda's didn't have a known hard limit, when would Amazon be allowed to scale down their running servers?

Wouldn't you be upset if you accidentally wrote a lambda that executed indefinitely, and Amazon charged you for it?



Thanks. I couldn't find the reasons on the AWS documentation but the ones you listed seems logical.
 
reply
    Bookmark Topic Watch Topic
  • New Topic