The Beginners Guide to Positive Parenting

Prior to becoming a parent, I began learning about positive parenting. Everything I learned while earning my MA in early childhood education about how children develop and how they become emotionally…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How to control asynchronous invocations of your AWS Lambda functions

I have a serverless process that runs in a row — one Lambda runs and before it ends, it invokes another Lambda. Due to rate limits and other errors, I needed to know if the invocation was successful, but I didn’t want to wait until the new Lambda ended. This was challenging.

The other annoying thing was that the number of running Lambdas was increasing out of control, even though I should have one Lambda alive at a time (maybe two, because I start a new Lambda and only then close the current one — an overlap of few milliseconds).

There are two types of lambda invocations: Sync (“RequestResponse”) and Async (“Event”).

My next attempt was with the Sync invocation. In order to know if the Lambda invocation succeeded, I needed to wait for the new Lambda to end. So I used a little trick:

Other solutions that not discussed in this post:

Add a comment

Related posts:

Building a Multiplayer ARKit Game with Placenote SDK

We just released a new Unity package that will teach you how to build a multiplayer AR game in exactly 20 minutes. If you’re building (or want to build) a multiplayer AR game or app, this article is…

Microfinance Adapting To Changing Times

I n the financial year 2016, the Indian microfinance sector finally appeared to have shed the baggage of the 2010 crisis. The sector had faced a significant test of its existence in 2010 when the…

Death

Death is the final reveal birthed from a slow abandonment in a series of deaths across our lifetime. The last of our constructed truths is the relinquishment from our own physical confines. We are…