|
|
|
|
|
by merty
2304 days ago
|
|
This isn’t actually one of those solutions where Lambda shines, pricing wise. I would simply trigger a Lambda function once a minute (or every X minutes) using CloudWatch to fetch the latest articles and save them to an S3 bucket which I would expose and cache using CloudFront or any other CDN service. This would lead to: - No Lambda costs as it would be covered by the monthly free tier of 1M requests. - No storage costs as the size of the stored data would be extremely small. - Really fast responses as the “response” would actually be a static file cached at the CDN. - The only parameter defining your cost would be your CDN of choice, which would cost somewhere between free and as low as $10/TB. For a project like the one in the article, that’s hundreds of millions of requests for just $10. |
|
Lambda generates static HTML in the background, puts it in S3, and the static HTML get served via CloudFront
The Lambda costs are a whopping 26 cents per month, for over 2 million Lambda invocations per month. If anyone is interested in the architecture, I've developed this website as an open source project here, for people to learn from: https://github.com/aws-samples/aws-cdk-changelogs-demo