3 ms·
This isn't written by me but this looks like a nice step by step tutorial about the same (the reason it's so long because he covers everything including signin
by superasn 7y ago
This isn't written by me but this looks like a nice step by step tutorial about the same (the reason it's so long because he covers everything including signin up for an amazon account, but the process is very easy and quick):
https://medium.com/tensult/creating-aws-cloudfront-distribution-with-s3-origin-ee47b8122727 https://medium.com/tensult/creating-aws-cloudfront-distribut...
Another additional benefit of this is that you get a free SSL certificate from Amazon that virtually never expires. The price is also on-demand and very less (only pay for the bandwidth you use which is pretty cheap too)
These commands to re-deploy your site would be following (assuming aws-cli is installed)
aws s3 cp ~/your-site/* s3://bucket-name
aws cloudfront create-invalidation --distribution-id ID --paths /*
(sorry these commands are just from the top of my head, I couldn't double check)