Configure aws-cli using the Bundled Installer

Configure aws:-

To communicate to s3 we need these things ready.

  1. IAM user credentials who has read-write access to s3 bucket.
  2. A client like aws-cli for bash, boto library for python etc.

Once you get the credentials lets install aws-cli on server.
First check if python is installed

python --version


if python not install go to here to install.

To install the aws-cli using bundle installer

curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
$ unzip awscli-bundle.zip
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

Test the AWS CLI Installation

aws help

configure AWS credentials

aws configure

#fill up the following details
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]: 

To sync all files in a folder

aws s3 sync source_folder  s3://your_bucket_name/destination_folder/

to copy one file to s3

aws s3 cp source_file s3://your_bucket_name/destination_folder/