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.
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.
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"
Never tried this. But the following CLI is what you need:
aws rds wait db-instance-available --db-instance-identifier <value>
Wait until JMESPath query DBInstances[].DBInstanceStatus returns available for all elements when polling with describe-db-instances. It will poll every 30 seconds until a successful state has been reached. This will exit with a return code of 255 after 60 failed checks.
These days, you should use the AWS Command-Line Interface (CLI) to call AWS.
The command would be:
aws rds create-db-instance ...
Then, you could call a waiter:
aws rds wait db-instance-available ...
See: