Top things you should avoid when building with AWS Lambda

George Mao
3 min readMar 7, 2023
Photo by Nick Wright on Unsplash

Don’t set Provisioned Concurrency == Reserved Concurrency

Reserved Concurrency (RC) is a configuration that places a max cap on concurrency available to the entire function family (all versions/alias). Provisioned Concurrency (PC) is set on a specific function version. If PC == RC, guess what happens?

You you can’t execute any other versions of the function INCLUDING any spillover that your PC allocation cannot handle. If you’re looking to cap your concurrency as a safety mechanism, just pick a buffer and add that to the RC value.

Don’t set maxed out Lambda configurations (Duration → 15 mins and Memory 10 GB)

In my experience dev teams use maxed out settings because they don’t understand Lambda billing/performance details or have not to optimized the function. In most cases its better to break up a large workload into small pieces that run in parallel. If you can’t shard up your workload then make sure you’re using the right memory for your workload.

Lambda Power Tuner is an excellent tool to help you choose the right memory.

Don’t set Batch Size == 1 when using a poll based event source

--

--

George Mao

Head of Specialist Architects @ Google Cloud. I lead a team of experts responsible for helping customers solve their toughest challenges and adopt GCP at scale