Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The Linux server uploads files to S3 through the aws command line

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Purpose

The Linux server uploads files to S3 through the AWS command line

Configuration

Open your AWS console

To connect to your Linux server, follow these steps

# install pip

Yum-y install python-pip

# install awscli

Pip install awscli

# initialize configuration

Aws configure

# when doing this step, the system will ask you to enter "access key ID", "private access key", "default zone name" and "default output format". The first two will be generated automatically when creating IAM users. "default zone name" is best to choose the region where your EC2 is located. If you are not sure what the string corresponding to your EC2 region is, please refer to the link provided below. If you really don't want to fill it out, it will automatically select the area closest to you. The "default output format" can be in json and text format, and 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 a bucket

Aws s3 mb s3://test

# upload files to the bucket

Aws s3 cp / etc/my.cnf s3://test/

The goal of uploading files to S3 through the AWS command line can be accomplished by using the above steps.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report