Created
February 14, 2016 16:53
-
-
Save ryanthegiantlion/d685fa2913fb8252f6a4 to your computer and use it in GitHub Desktop.
create static website on s3 with awscli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws s3 mb s3://test-website | |
aws s3 website s3://test-website --index-document index.html --error-document error.html | |
echo '{"Version":"2012-10-17", "Statement": [{ "Sid": "Allow Public Access to All Objects", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::test-website/*"}]}' > policy.json | |
aws s3api put-bucket-policy --bucket test-website --policy file://policy.json | |
aws s3 sync website-source-folder s3://test-website |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment