Interview Prep/Python for DevOps/AWS automation with boto3

You need to wait until a newly created RDS instance is available before running migrations. How?

IntermediateScenarioAWS automation with boto3
Answer

Situation read → Use a waiter instead of a sleep loop.

What I'd do →

  1. rds.get_waiter("db_instance_available").wait(DBInstanceIdentifier=name, WaiterConfig={"Delay": 30, "MaxAttempts": 60}).
  2. Catch botocore.exceptions.WaiterError and report the last status.
  3. Then fetch the endpoint from describe_db_instances and check TCP connectivity before migrating.

Why → Waiters handle polling, intervals and failure states consistently.

Interview tip → Mention that "available" in the API does not guarantee your network path works; check connectivity too.

All Python for DevOps questions Roadmap: Python for automation

More on AWS automation with boto3