This project started with a copy of the v0.11 of https://github.com/aws-samples/amazon-cloudfront-secure-static-site.
The Sliderule specific web client code is located in the ./web-client/dist directory.
The following diagram shows an overview of how the solution works:
- The viewer requests the website at e.g. client.slideruleearth.io
- If the requested object is cached, CloudFront returns the object from its cache to the viewer.
- If the object is not in CloudFront’s cache, CloudFront requests the object from the origin (an S3 bucket).
- S3 returns the object to CloudFront
- CloudFront caches the object.
- The object is returned to the viewer. Subsequent responses for the object are served from the CloudFront cache.
This was used to create our sliderule-web-client for the first time (ONE TIME ONLY) to create helper functions in witch:
make cold-start-sliderule-web-client
This was used to build and deploy changes to web-client (our single page app) :
make deploy
To update trivial changes to the website for development (Not for production)
make live-update