Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS RDS status while creating the RDS via CLI

I am creating the RDS via AWS CLI using

create-db-instance

RDS is getting created but I want to wait until the RDS comes to "available" state so that I can execute the remaining part of the script. I am not sure how can I achieve that.

like image 385
Nirbhay Singh Avatar asked Oct 06 '17 22:10

Nirbhay Singh


People also ask

How do I check my RDS status?

Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/ . In the navigation pane, choose Databases. The Databases page appears with the list of DB instances. For each DB instance , the status value is displayed.

How long does RDS take to create?

It takes 15-20 minutes for a database instance creation. Once the new RDS instance is available, open the instance properties. Note down the endpoint from connectivity and security. Connect the instance using the endpoint.

How do I create AWS RDS database?

To create a DB instanceIn the upper-right corner of the Amazon RDS console, choose the AWS Region in which you want to create the DB instance. In the navigation pane, choose Databases. Choose Create database. In Choose a database creation method, select Standard Create.

How do I check my active connections on RDS?

You can also view all actives and disconnected local and remote session by using RDMS (Server Manager > Remote Desktop Services) > Select your Session Collection > right pane "CONNECTIONS".


1 Answers

Use the waiters as provided by the AWS SDK in its CLI. Specifically, you want to wait until RDS DB instance becomes available. Look at db-instance-available.

aws rds wait \
    db-instance-available \
    --db-instance-identifier "your-rds-instnace-id"
like image 84
hjpotter92 Avatar answered Sep 20 '22 11:09

hjpotter92