##general resources
s3 create bucket from cli
http://docs.aws.amazon.com/cli/latest/reference/s3api/create-bucket.html
s3 commands
http://docs.aws.amazon.com/cli/latest/reference/s3/index.html
create a website
http://docs.aws.amazon.com/AmazonS3/latest/dev/HostingWebsiteOnS3Setup.html
http://docs.aws.amazon.com/cli/latest/reference/s3/website.html
upload content via web gui
http://docs.aws.amazon.com/AmazonS3/latest/UG/UploadingObjectsintoAmazonS3.html
copy paste json to make website work http://docs.aws.amazon.com/AmazonS3/latest/dev/HostingWebsiteOnS3Setup.html
create a bucket from aws cli
$ aws s3api create-bucket --bucket MyBucket --region us-west-1 --create-bucket-configuration LocationConstraint=us-west-1
configure static website
$ aws s3 website s3://MyBucket/ --index-document index.html --error-document error.html
upload your stuff and exclude things
$ aws s3 sync . s3://MyBucket/ --exclude ".git/*" --exclude "*.idea/*" --exclude "*.DS_Store" --exclude "\node_modules/*"
json to make website work
$aws s3api put-bucket-policy --bucket MyBucket --policy file://policy.json
policy.json
{
"Version":"2012-10-17",
"Statement":[{
"Sid":"PublicReadForGetBucketObjects",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::MyBucket/*"
]
}
]
}
note: just replace MyBucket with the name of your actual bucket