- Open your AWS console;
- Create a new user (such as test) in Iam, which automatically creates a user security credential when created, consists of an access key ID and a private access key, remembers it and downloads it, and uses it later;
- Select the user you just created, under the "Permissions" tab there is an "additional permission", click on it, find a permission named "Amazons3fullaccess" in the list, tick it, and click "Additional Permissions";
- Connect to your Linux server;
- Install Pip (refer to here, please ignore the installed);
- Installing AWSCLI
Install AWSCLI
- Initialize the configuration (only need to be configured on first upload)
AWS Configure
Note: In this step, you will be asked to enter "access key ID", "Private access Key", "Default zone Name", "Default output format", the first two are automatically generated when IAM user is created, "Default zone name" is best to choose the region where you EC2, If you do not know your EC2 area corresponding to the string is what, you can refer to the link I provided below, if you really do not want to fill out the problem, it will automatically select the area closest to you, "default output format" can be filled in JSON and text format, the default is JSON format.
- Creating buckets
AWS S3 MB S3://test20160307
- Uploading files to a bucket
CP /ETC/MY.CNF S3://test20160307/
Linux system uploads files to S3 via AWS Command line