08-09-2019, 12:05 AM
A Cloud Guru AWS Lambda at Edge-ViGOROUS
English | Size: 740.39 MB
Category: Tutorial
Static hosting a website on AWS used to be a major hassle. The service lacked many of the key features expected for managed static hosting - solutions that were readily available from companies like Netlify and Surge.
Setting up a static website on AWS required hours of fighting with policies and configs to get things up and running - and offered limited redirect functionality, no pushState routing, and wacky CloudFront setups.
Those days are now behind us with the witchcraft of Lambda@Edge.
Lambda@Edge is an extension of AWS Lambda, a compute service that lets you execute functions that customize the content delivered through CloudFront.
To demonstrate the power of Lambda@Edge, I'll walk-through how to implement an actual edge function to rewrite the request for pushState routing and clean URLs.
And the best part - it costs next to nothing with infinite scalability and no restrictions or limitations. You only pay minimal AWS rates for file storage, data transfers, and occasionally running a cloud function. If your account is on the free tier, it will literally cost you nothing - unless you get really popular really fast.
How to Get Started
For the purpose of this tutorial, I'll be using Create React App to generate a single page application and will define the infrastructure as code using Terraform. Feel free to use whatever front-end framework you want, as well as create everything in the AWS console if that's your thing.
Dependencies:
Terraform - using v0.9.11 in this tutorial
AWS CLI - make sure it's configured for your AWS account
Create React App
To get started, create and build a production-ready version of your app.
DOWNLOAD
Code:
http://nitroflare.com/view/AC2F11D03F0E933/j76a8.A.Cloud.Guru..AWS.Lambda.at.Edge.part1.rar
http://nitroflare.com/view/BBCDA11B6C58ABF/j76a8.A.Cloud.Guru..AWS.Lambda.at.Edge.part2.rar
Code:
https://rapidgator.net/file/da111b4136a140bcf5fb773f8160e87e/j76a8.A.Cloud.Guru..AWS.Lambda.at.Edge.part1.rar
https://rapidgator.net/file/3ec1bc9a469b33f326710b819f188e51/j76a8.A.Cloud.Guru..AWS.Lambda.at.Edge.part2.rar