Serverless costs calculator

Estimate AWS costs when running serverless applications on AWS Lambda.

Small API Large API Small website Large website

Backend (assets excluded)

HTTP requests per month

Average execution time (ms)

Average response size (Kb)

Lambda size 128M 256M 512M 1024M (recommended) 1792M 2048M

Assets

Average number of assets (CSS, JS, images…) per page

Total assets size per page (Kb)

Database

Database prices can vary based on many factors, which is why we do not include it in this calculator.

For small applications, the cheapest option starts at $9.40/month (MySQL db.t3.micro reserved instance).

Monthly cost

AWS Lambda ${{ lambdaTotal.toFixed(2) }}

API Gateway ${{ apiGatewayTotal.toFixed(2) }}

AWS S3 ${{ s3Total.toFixed(2) }}

CloudFront ${{ cloudFrontTotal.toFixed(2) }}

Total ${{ total.toFixed(2) }}

The AWS free tier is ignored to avoid any surprise. The cost estimated above is just that: an estimation. Plan a safety margin of 50% or even 100%. Also be aware that AWS ALB is a much cheaper alternative to API Gateway at scale. It is not included in the calculator yet, that is for another rainy day ;)

Serverless costs calculator by bref.

Want training? Join our Serverless PHP workshops.

Need help getting started with serverless? Get in touch!