0 votes
by (139 points)
Hi, I need basic operations like reading, writing, removing, copying a file on the s3 bucket. Can anyone provide those commands?

1 Answer

0 votes
by (172 points)

Af first you need to install AWS Command Line Interface https://aws.amazon.com/cli/

and configure using AWS Access Key ID & AWS Secret Access Key from your AWS console https://console.aws.amazon.com

Lets the s3 bucket name 

codeshikari.com

To see the list of all files in the bucket with the command in the terminal.

aws s3 ls s3://codeshikari.com

Now copy a local file to the bucket with the command in the terminal

aws s3 cp test.txt s3://codeshikari.com

Also, you can copy the file from the bucket using this command

aws s3 cp s3://codeshikari.com/test.txt ./

And can remove a file from the bucket using this command.

aws s3 rm s3://codeshikari.com/test.txt

Welcome to Codeshikari Q&A, where you can ask any vulnerability related questions and receive answers from the experts of the community. Screenshot-from-2019-03-15-23-08-47
...