
Create AWS CloudFront on Pay-as-You-Go (not the Free Plan)
The AWS Free plan is not working for me and Pay-as-you-go is hidden for new CloudFront Distributions on AWS Console . When you host Hugo-based sites on AWS , you typically put the bucket behind CloudFront and attach a Lambda@Edge function so that requests to directory paths (e.g. /blog/ ) are rewritten to /blog/index.html for S3 website-style origins. You can then use hugo deploy or deploy with the AWS CLI to sync the built site. The catch: you need a CloudFront distribution that uses that Lambda and, if you want to avoid flat-rate plan commitments, pay-as-you-go pricing. The console no longer lets you choose that-only Free or Pro plans. This post shows how to create a pay-as-you-go distribution by reusing an existing distribution’s config via the AWS CLI and the scripts in this article’s scripts folder. When the console only offers Free or Pro Amazon introduced CloudFront flat-rate pricing plans (Free, Pro, Business, Premium) that bundle the CDN with WAF, DDoS protection, Route 53, an
Continue reading on Dev.to
Opens in a new tab



