Linux server uploads files to S3 via AWS Command line

Source: Internet
Author: User
Tags awscli aws console

Objective
Linux server uploads files to S3 via AWS Command line

Configuration
Open your AWS console;

To connect to your Linux server, follow the steps below:

# install PIP
Yum-y Install Python-pip

# Install AWSCLI
Pip Install Awscli

# Initialize Configuration
AWS Configure
# This step will require you to enter "access key ID", "Private access Key", "Default zone Name", "Default output format", the first two will be generated automatically when IAM user is created, "Default zone name" is best to choose the area 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.

AWS Access Key ID [None]: XXX

AWS Secret Access Key [None]: XXX

Default region name [none]:xxx

Efault output format [None]: Default


# Create Buckets
AWS S3 MB S3://test

# Upload files to a bucket
AWS S3 CP/ETC/MY.CNF S3://test/

The above steps will complete the purpose of uploading files to S3 through the AWS command line.


Linux server uploads files to S3 via AWS Command line

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.