back home

AWS CLi

December 2, 2016

Install Python-pip

$ apt-get install python-pip

Install AWS Cli from PIP

$ pip install awscli

Configure your fresh AWS credentials

$ aws configure

copy paste your Key and Secret Key

Listing files

$ aws s3 ls s3://mybucket
        LastWriteTime            Length Name
        ------------             ------ ----
                                PRE myfolder/

2013-09-03 10:00:00           1234 myfile.txt

Copy Files from Server to S3

$ aws s3 cp myfolder s3://mybucket/myfolder --recursive

Sync Folder

$ aws s3 sync myfolder s3://mybucket/myfolder --exclude *.tmp

upload: myfolder/newfile.txt to s3://mybucket/myfolder/newfile.txt

Delete Folder

$ aws s3 rm s3://mybucket/test2.txt