AWS Lambda Reserved Concurrency vs Retry

Creating a test lambda

{
"name": "Some name",
"numberOfSecondsToWait": 5
}
  1. Log the value of the name property.
  2. Waits for numberOfSecondsToWait seconds.

Invoking the lambda

  • Both requests (Long 1, and Long 2) were executed one after the other.
  • It took some time (about 5 minutes) for Long 2 to start once Long 1 was completed.

Warning: retry of errors raised by your code

Conclusion

  • With InvocationType=RequestResponse, I will receive an error. I have to retry the operation myself.
  • With InvocationType=Event, my request will succeed. It will be retried by AWS (for up to 6 hours).
  • create a lambda with ReserveConcurrency=1
  • put my heavy processing in that lambda
  • start that lambda with InvocationType=Event whenever the big operation is needed

--

--

--

Back end developer at LANDR Music

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to animate and move a simple player with Mixamo and Unity/C#

The Benefits of Using Firebase in Mobile App Development Projects: Cloud Messaging, Remote…

Cloud Firestore vs. Realtime Database — Which & When to Choose

Be happy with Data Flow Integration Technology

HackTheBox Knife Walkthrough

Install Python3.7 on Jetson TK1 From Source

How to upgrade October CMS to Laravel 6?

Bokeh Interactive Plots: Part 1

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Maxime Beaudry

Maxime Beaudry

Back end developer at LANDR Music

More from Medium

Serverless on AWS with CDK #1: App Runner with VPC Integration

Why small companies and startups should use serverless architecture

Simple Ways of Optimizing Your AWS Cost & Workload

How to use, and NOT use, AWS Step Functions