Skip to content
This repository was archived by the owner on Mar 25, 2020. It is now read-only.

Cost estimate

Kishin Yagami edited this page Oct 28, 2017 · 12 revisions

We estimate the LambStatus system takes just $1 to handle 30,000 visitors. This page explains how we calculated the cost.

Assumptions

We assume that the details of the 30,000 visitors are like this:

  • 30,000 unique users visit your status page for 5 minutes. A status page usually gets very low traffic and occasionally huge traffic.
  • They visit only the top page. The top page usually gives them enough information to know the service status.
  • 10,000 visitors from US, 10,000 visitors from Europe and 10,000 visitors from Asia.

Also, when 1 user visits the status page, the client sends these requests:

  • 8 requests to load assets like html and js. The data transfer size is 100KB in total.
  • 10 API requests to load dynamic data like an incident status. The data transfer size is 5KB in total.

Finally, there are some assumptions about the infrastructure and AWS:

  • The region is us-west-2.
  • Free tier offers that expire 12 months are expired. API Gateway, S3 and CloudFront fall under this category.
  • For free tier offers that never expire, free requests and capacities are still remaining. DynamoDB and Lambda fall under this category.

Related AWS services

We consider the costs of AWS Lambda, Amazon API Gateway, Amazon DynamoDB, Amazon CloudFront and Amazon S3. Other services like Amazon Cognito and Amazon SNS are used slightly, but their costs are too small to consider.

AWS Lambda

Pricing page

The cost of Lambda is based on the number of requests for functions and the time the code executes.

Requests

There are CloudFront and API Gateway in front of Lambda functions, and all requests to the public APIs are cached in the CloudFront for 10 seconds. So, the total number of requests is:

10 (APIs) * 6 (requests/1 minute) * 5 (minutes) = 3000 (requests)

Since it takes $0.0000002 per request, the total cost is:

3000 (requests) * 0.0000002 (USD/request) = 0.0006 (USD)

Duration

Amazon API Gateway

Amazon DynamoDB

Amazon S3

Amazon CloudFront

Clone this wiki locally