Three tips for creating functions in AWS Lambda

Logic20/20
2 min readDec 11, 2019

--

AWS Lambda is a fantastic tool for saving time, energy, and money. With server management off your plate, you can focus on writing great code. Even though you’re charged only per 100ms your code runs, it’s important to work smart. Adhering to best practices will ensure you maximize what Lambda can do for you.

1. Work cleanly

AWS Architect George Mao discusses Lambda best practices on the official Amazon blog. One element covered is the importance of managing concurrency. Setting a function level concurrent execution limit requires you to be aware of your entire Lambda ecosystem, both upstream and downstream. Keeping your entire process in mind as you write your functions will encourage you to write succinctly and in a way that scales properly. The official AWS Lambda best practices documentation also recommends deleting Lambda functions you’re no longer using; keeping your repository clear of unused functions prevents accidental recycling.

2. Watch the clock

In a blog post on A Cloud Guru, Mitchell Harris of Fourthcast suggests careful management of your timing. In his article about using Lambda for Alexa skills, Harris details the value of keeping instances “warm,” letting processes finish properly, and restricting timeout length: they all reduce latency and result in faster function deployments. Mao also suggests running functions faster by using memory to your advantage via over-provisioning.

For the 3rd tip and to read more about AWS Lamba, view the full article here: https://www.logic2020.com/insight/tactical/tips-for-aws-lambda?utm_source=social&utm_medium=Medium&utm_campaign=AWS

--

--

Logic20/20
Logic20/20

Written by Logic20/20

Enabling clarity through business and technology solutions.

No responses yet