In this post, I am going to list a set of links to solve the problems in using AWS S3 Bucket(Amazon Simple Storage Service)

Generate your access key

Go to your IAM page: , generate an access key in your "Security Credentials" tab.

Save your Access key ID and Secret access key

Install awscli

pip install --upgrade awscli


wget ''
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

Reading this doc to configure your aws client

Basic usage of s3 in awscli

$ aws s3 ?
usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]
To see help text, you can run:

  aws help
  aws <command> help
  aws <command> <subcommand> help
aws: error: argument subcommand: Invalid choice, valid choices are:

ls                                       | website
cp                                       | mv
rm                                       | sync
mb                                       | rb

"Rename" your bucket

It is impossible to "rename" the bucket. You should create a new one, sync it and destroy the origin one

aws s3 mb s3://[new-bucket]
aws s3 sync s3://[origin-bucket] s3://[new-bucket]
aws s3 rb --force s3://[origin-bucket]

Please refer to this Q&A for more answers

Make s3 public

Go to s3 bucket -> properties -> Static website hosting, enable website hosting. Please refer to this page for more detail.

If we wanna to make all files (include future updates) public, you'd better create a policy as follow:

  "Version": "2012-10-17",
  "Statement": [
      "Sid": "PublicReadGetObject",
      "Effect": "Allow",
      "Principal": "*",
      "Action": [
      "Resource": [

Please refer to this document for further instruction.

Categories: Code


Ideals are like the stars: we never reach them, but like the mariners of the sea, we chart our course by them.


xqiushi · September 1, 2017 at 11:29

Google Chrome 60.0.3112.113 Google Chrome 60.0.3112.113 Mac OS X  10.13.0 Mac OS X 10.13.0


    yu · September 1, 2017 at 14:29

    Google Chrome 60.0.3112.113 Google Chrome 60.0.3112.113 Mac OS X  10.12.6 Mac OS X 10.12.6

    @xqiushi 我北京时候学校教育网用起来还挺好的, 联通似乎不太好…

Leave a Reply

Your email address will not be published. Required fields are marked *