Interview Prep/Python for DevOps/AWS automation with boto3

Your audit script hits `ThrottlingException` / `RequestLimitExceeded` when scanning large accounts. What do you change?

AdvancedScenarioAWS automation with boto3
Answer

Situation read → Too many calls too fast, probably from parallelism or per-resource describe calls.

What I'd do →

  1. Configure Config(retries={"mode": "adaptive", "max_attempts": 10}) so botocore backs off and rate-limits client-side.
  2. Reduce call volume: filter server-side, batch IDs into one describe call, use get_metric_data instead of per-instance get_metric_statistics.
  3. Lower max_workers or add a per-service semaphore.
  4. Consider AWS Config advanced queries or Resource Explorer for inventory.

Why → Fewer calls beats faster retries.

Interview tip → Say you would check whether another tool in the same account is consuming the same quota.

All Python for DevOps questions Roadmap: Python for automation

More on AWS automation with boto3