Sunday, October 14, 2018

Upload a file in S3 bucket using awscli command


Upload files in S3 bucket using awscli command line utility

Steps:
1.   Install awscli command utility in windows OS

AWSCLI64PY3.msi  (windows_64bit os)

2.   You must mention the path of the aws bin folder in %PATH% variable set

C:\Program Files\Amazon\AWSCLI\bin;

3.   Now check the aws version

C:\>AWS --version
aws-cli/1.16.33 Python/3.6.0 Windows/7 botocore/1.12.23

C:\Users\mkumar8>aws s3 ls
2018-10-15 16:06:50 ashokbc
Directory of C:\Users\mkumar8\Documents\aws work
10/15/2018  04:11 PM    <DIR>          .
10/15/2018  04:11 PM    <DIR>          ..
03/07/2018  05:17 PM           150,621 car1.jpeg
10/15/2018  04:11 PM                90 rootkey.csv
               2 File(s)        150,711 bytes
               2 Dir(s)  52,962,304,000 bytes free

C:\Users\mkumar8\Documents\aws work>aws s3 cp car1.jpeg s3://ashokbc/
upload: .\car1.jpeg to s3://ashokbc/car1.jpeg
C:\Users\mkumar8\Documents\aws work>

4.   List the uploaded files from s3 bucket:

C:\Users\mkumar8\Documents\aws work>aws s3 ls s3://ashokbc/
2018-10-15 16:20:42     150621 car1.jpeg
2018-10-15 16:22:48         90 rootkey.csv

C:\Users\mkumar8\Documents\aws work>

5.   Delete the rootkey.csv file from bucket
C:\Users\mkumar8\Documents\aws work>aws s3 rm s3://ashokbc/rootkey.csv
delete: s3://ashokbc/rootkey.csv

C:\Users\mkumar8\Documents\aws work>

6.   Synchronization the local folder with aws s3 bucket : ashokbc

C:\Users\mkumar8\Documents\aws work>aws s3 sync . s3://ashokbc/
upload: .\mountain.jpg to s3://ashokbc/mountain.jpg
C:\Users\mkumar8\Documents\aws work>


















Step by Step YugabyteDB 2.11 (Open Source) Distributed DB - Multi-node Cluster Setup on RHEL

Scope - ·        Infrastructure planning and requirement for installation of the multi-node cluster database ·        Prerequisites Software...