Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Barron committed Apr 4, 2020
1 parent c01a5ac commit efb644a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,20 @@ sls deploy --bucket bucket-where-you-store-data --cache-control "public,max-age=

## Pricing

Roughly ~$5.70 per 1M requests. Note this is for requests _that reach Lambda_.
By using Cloudflare and an appropriate cache control header, this could be
substantially reduced.

Lambda:

- $0.20 per 1M requests
- $0.0000166667 GB-second / * 192 / 1024 * .9 * 1M = $2.81
- Set to 192MB and if each invocation takes .9s, per 1M requests:

API Gateway:
$0.0000166667 GB-second / * 192 / 1024 * .9 * 1M = $2.81

Currently this uses the REST API instead of the HTTP API,
API Gateway:

- $3.50 per 1M requests
- $1.00 per 1M requests

Data Transfer:

Expand All @@ -53,7 +59,6 @@ Data Transfer:
### Ways to lower prices:

- Use Cloudflare to cache images with a long cache control header
- Use HTTP API instead of the REST API to save $2.50/1M requests. The HTTP API isn't currently supported by the underlying `lambda-proxy` package.

### Hosted comparison

Expand Down

0 comments on commit efb644a

Please sign in to comment.