How to setup AWS RDS CLI

AWS provides the its CLI tools but few of RDS functionalities don't work on them so in order to make them work AWS RDS CLI is very helpful.

Download the RDS CLI:
[root@server downloads]# wget http://s3.amazonaws.com/rds-downloads/RDSCli.zip

Unzip the downloaded file and copy it in desired location:
[root@server downloads]# unzip RDSCli.zip
[root@server downloads]# cp -r RDSCli-1.19.004 /opt/aws/apitools/rds
[root@server downloads]# cd /opt/aws/apitools/rds/bin

Check RDS CLI version:
[root@server bin]# ./rds-version 
Relational Database Service CLI version 1.19.004 (API 2014-10-31)

These commands can be added in system environment so you can run them from anywhere:
[root@server bin]# export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/apitools/rds/bin:/usr/local/bin

The credential file is also need to be created so that these commands can be run taking permissions in to consideration from that file and file can be added in system environment so we don't need to pass every time in command.
[root@server  rds]# cat credential
AWSAccessKeyId=AKIXXXXXXXXXXXXXXXSYA
AWSSecretKey=FeIXXXXXXXXXXXXXXXXXXXXXXXX06BB
[root@server  rds]# export AWS_CREDENTIAL_FILE=/opt/aws/apitools/rds/credential

If you don't want to add credentials in environment variable than can be passed in command it self with following parameter followed by the path of credentials file: --aws-credential-file.

Comments

Popular posts from this blog

Script to create daily AMI of AWS server and delete AMI older than n no of days..

How to delete multiple user in linux

How to create users from ansible with public key and password.