简体   繁体   中英

How to upload local system files in my Linux server to Amazon S3 Bucket using ssh?

I am trying to upload a file which I have on my Linux server onto my AWS S3 bucket. Can anyone please advise on how to do so as I only find documentations which is related to upload the files to EC2 instead.

I do have the.pem certificate present on my server directory.

I tried to run the following command but it doesn't solve the issue

scp -i My_PEM_FILE.pem "MY_FILE_TO_BE_UPLOADED.txt" MY_USER@S3-INSTANCE.IP.ADDRESS.0.compute.amazonaws.com

It is not possible to upload to Amazon S3 by using SSH.

The easiest way to upload from anywhere to an Amazon S3 bucket is to use the AWS Command-Line Interface (CLI) :

aws s3 cp MY_FILE_TO_BE_UPLOADED.txt s3://my-bucket/

This will require an Access Key and a Secret Key to be stored via the aws configure command. You can obtain these keys from your IAM User in the IAM management console (Security Credentials tab).

See: aws s3 cp — AWS CLI Command Reference

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM