Quick tips to save costs in your serverless apps

Save costs in your serverless apps by using HTTP APIs and power tuning your lambda functions.

AWS
October 28th, 2020
1 min read

Here are 2 points that you can read today to start thinking about ways to reduce cost, increase performance and optimise latencies.

1- Reducing costs by switching to HTTP APIs instead of REST

If you are using REST APIs in your API Gateway, have you thought whether your application can use HTTP APIs instead? Most likely it can (unless you are using API Caching, API Keys, and/or request transformation or validation).

HTTP APIs are actually much cheaper ($1 per million HTTP API calls compared to $3.5 per million REST API calls).

Read More.

2- Reducing cost by increasing the lambda memory allocation.

There are different ways to optimise a Lambda function, but one way is choosing their memory allocation. You can choose between 128 MB and 3008 MB, but this also impacts the amount of virtual CPU as memory increases. Since total cost is a combination of memory and duration, choosing more memory can often reduce duration and lower overall cost.

You don't need to manually optimise it, you can use a tool called the AWS Lambda Power Tuning Tool

Read More.