0% found this document useful (0 votes)
4 views

Aws Cli DB

Uploaded by

Roshan Patil
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Aws Cli DB

Uploaded by

Roshan Patil
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

psql -h mydbinstance.cr4s8qqy0y6v.eu-west-3.rds.amazonaws.

com -U roshan -d
mydatabase_postgres

SELECT User, Host FROM mysql.user;

aws rds create-db-instance \


--db-instance-identifier mydbinstance \
--db-instance-class db.t3.micro \
--engine postgres \
--allocated-storage 20 \
--master-username roshan \
--master-user-password password \
--availability-zone eu-west-3a \
--db-name mydb\
--publicly-accessible

aws rds create-db-instance `


-db-instance-identifier mydbinstance `
-db-instance-class db.t3.micro `
-engine postgres `
-allocated-storage 20 `
-master-username roshan `
-master-user-password "password" `
-availability-zone eu-west-3a `
-db-name mydb `
-publicly-accessible

aws rds describe-db-instances -db-instance-identifier mydbinstance `


-query 'DBInstances[0].Endpoint.Address' `
-output text

To check available rds instance


aws rds describe-db-instances --query "DBInstances[?DBInstanceStatus=='available'].
[DBInstanceIdentifier,DBInstanceStatus]" --output table

To get the rds endpoint


aws rds describe-db-instances --db-instance-identifier mydbinstance --query
"DBInstances[0].Endpoint.Address" --output text

You might also like