まずはこれだけ!
sync
aws s3 sync /var/www/tmp/[dir] s3://[backet]/[dir]/
参考にしたページ
CLIで公開する
aws s3 mb s3://[backet-name]
aws s3api put-public-access-block --bucket [backet-name] --public-access-block-configuration "BlockPublicAcls=false,IgnorePublicAcls=false,BlockPublicPolicy=false,RestrictPublicBuckets=false"
aws s3api get-public-access-block --bucket [backet-name]
{
"PublicAccessBlockConfiguration": {
"BlockPublicAcls": false,
"IgnorePublicAcls": false,
"BlockPublicPolicy": false,
"RestrictPublicBuckets": false
}
}
参考にしたページ
https://dev.classmethod.jp/articles/amazon-s3-website-hosting-with-aws-cli/