question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[rds] Add waiter for cluster actions

See original GitHub issue

Waiters are only implemented for single instance RDS actions, not actions that target Aurora clusters. Can you pleased add them for the following equivalent cluster actions?

db_cluster_available
db_cluster_deleted
db_cluster_snapshot_available
db_cluster_snapshot_completed
db_cluster_snapshot_deleted

Of these we most care about the snapshots, but it would be nice to have all of them implemented.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
tbastoscommented, Jan 4, 2019

+1 ! In our case we need db_cluster_available

4reactions
edvegascommented, Jan 20, 2021

I had to implement my own waiter to solve this (example for 200 attempts with 30 seconds timeout):

def wait_until_db_cluster_ready(db_cluster_name):

    try:
        rds_client = boto3.client('rds')

        time.sleep(30) # this is added because sometimes cluster status not updated immediately when you modify it

        for cycles in range(0, 200):
            cluster_status_request = rds_client.describe_db_clusters(
                DBClusterIdentifier=db_cluster_name,
            )
            if (cluster_status_request['DBClusters'][0]['Status'] == 'available'):
                break
            else:
                cycles = cycles + 1
                time.sleep(30)

    except Exception as e:
        log(
            f"An error occurred trying to get db cluster status, exiting the script. Error: { e }")
        sys.exit(1)

and then call it when necessary wait_until_db_cluster_ready('my_cluster')

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multi-AZ DB cluster deployments - AWS Documentation
With a Multi-AZ DB cluster, Amazon RDS replicates data from the writer DB instance to both of the reader DB instances using the...
Read more >
RDS — Boto3 Docs 1.26.33 documentation - AWS
Amazon RDS gives you access to the capabilities of a MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, Oracle, or Amazon Aurora database server.
Read more >
How to use boto3 waiters to take snapshot from big RDS ...
Waiters have configuration parameters'delay' and 'max_attempts' like this : waiter = rds_client.get_waiter('db_instance_available') print( ...
Read more >
AWS restore_db_cluster_from_snapshot yet no instances
This action only restores the DB cluster, not the DB instances for that DB ... Now, you might have to add a waiter...
Read more >
Create a PostgreSQL DB Instance on AWS Relational ...
Tableau Server on Windows Help · Requirements and Recommendations · Create a PostgreSQL DB instance on Amazon RDS · Step 1: Create a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found