- AWS Account
-
Create a bucket over s3
-
Copy
index.html
,css/
,img/
,vendor/
-
Under permission tab, select Block public access and Turn off Block all public access
-
Now go to Bucket Policy and the following policies. Note: Replace the Bucket-name against the Resource key
{ "Version":"2012-10-17", "Statement":[ { "Sid":"AddPerm", "Effect":"Allow", "Principal": "*", "Action":["s3:GetObject"], "Resource":["arn:aws:s3:::<bucket-name>/*"] } ] }
-
Under properties, Select Static website hosting. Check the option to use this bucket.
-
Put index.html as Index and Error document.
-
Now, Go to CloudFront and Create Distribution.
-
Under Select delivery method, Click Get Started.
-
Under Origin setting, set the origin name as bucket-name and domain path as / and then create Distribution
-
Now wait for the status to become Deployed from InProgress
-
Now hit the Domain name to access the index.html
All screenshots are under screen-shots/
directory