---
title: "A Story of Delayed AWS Pipelines"
description: "Terraform's aws_organizations_organization data source silently calls DescribeOrganization plus the paginated ListAccounts and ListRoots APIs, and all of them share organization-wide rate limits of about 1 request per second with a burst of 2."
url: "https://swe.quest/articles/a-story-of-delayed-aws-pipelines-5cf6d8717da0bdca"
canonical: "https://medium.com/booking-com-development/a-story-of-delayed-aws-pipelines-382e4a1fede6"
source: "Booking.com Engineering"
published: "2026-05-08"
difficulty: "medium"
kind: "Case study"
reading_minutes: 6
tags: ["infrastructure-as-code","cloud","ci-cd","debugging","resilience"]
---

# A Story of Delayed AWS Pipelines

A post on [Booking.com Engineering](https://swe.quest/sources/booking.md), published 2026-05-08, 6 min read, Case study. Original: [https://medium.com/booking-com-development/a-story-of-delayed-aws-pipelines-382e4a1fede6](https://medium.com/booking-com-development/a-story-of-delayed-aws-pipelines-382e4a1fede6)

## Summary

Terraform's aws\_organizations\_organization data source silently calls DescribeOrganization plus the paginated ListAccounts and ListRoots APIs, and all of them share organization-wide rate limits of about 1 request per second with a burst of 2. At Booking.com this added 1–15 minute delays to roughly 1 in 10 Terraform pipelines and generated nearly 1M ListAccounts requests per week. CloudTrail showed that even IAM-denied calls burned tokens through retry and backoff, and that concurrent pipelines from other teams drained the shared bucket. The team cached the output centrally as a stopgap, then upstreamed a terraform-provider-aws change, available from v6.29.0, that skips ListAccounts and ListRoots when only the organization ID is needed.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md) (Infrastructure)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)
- [CI/CD](https://swe.quest/tags/ci-cd.md) (Reliability & operations)
- [Debugging](https://swe.quest/tags/debugging.md) (Engineering practices)
- [Resilience](https://swe.quest/tags/resilience.md) (Distributed systems)

## Prerequisites

- Terraform data sources ([easy posts on Infrastructure as code](https://swe.quest/tags/infrastructure-as-code.md?difficulty=easy))
- AWS Organizations ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))
- API rate limiting

## Keywords

Terraform, terraform-provider-aws, AWS Organizations, CloudTrail, ListAccounts, DescribeOrganization, AWS CDK

## Related posts

- [Service disruption on October 20, 2025](https://swe.quest/articles/service-disruption-on-october-20-2025-fe786fa7dabbc413.md): incident.io · 2025-10-22 · Medium · 12 min read · Incidents & postmortems, Resilience, PostgreSQL, CI/CD, Cloud platforms
  The October 20, 2025 AWS us-east-1 outage degraded incident.io through third-party dependencies even though it runs on Google Cloud: its transcription, SAML, telecom and status page providers were all affected.
- [Three Mighty Alerts Supporting Hugging Face’s Production Infrastructure](https://swe.quest/articles/three-mighty-alerts-supporting-hugging-face-s-production-infrastructure-66775538377e73af.md): Hugging Face · 2025-07-08 · Medium · 15 min read · Observability, SRE, Kubernetes, Cost optimization, Cloud platforms
  Hugging Face's infrastructure team relies on three alerts to catch problems early.
- [How We Use Terraform At Slack](https://swe.quest/articles/how-we-use-terraform-at-slack-a1596aae0a45b4a5.md): Slack Engineering · 2022-10-25 · Medium · 14 min read · Infrastructure as code, Cloud platforms, CI/CD, Developer tools
  Slack runs roughly 1,400 Terraform state files across AWS, GCP, DigitalOcean and NS1, split per account, region and large service so each change touches fewer resources.
- [Our Journey Migrating to AWS IMDSv2](https://swe.quest/articles/our-journey-migrating-to-aws-imdsv2-7a3bae8a33284213.md): Slack Engineering · 2023-12-12 · Medium · 10 min read · Cloud platforms, Security, Application security, Infrastructure as code, Identity & auth
  Slack enforced IMDSv2 across roughly 60,000 EC2 instances in hundreds of AWS accounts.
- [Onboarding yourself as an engineer at incident.io](https://swe.quest/articles/onboarding-yourself-as-an-engineer-at-incident-io-0fce0735d9296049.md): incident.io · 2024-07-05 · Medium · 4 min read · Infrastructure as code, Engineering culture, Developer productivity
  New engineers at incident.io onboard themselves by opening a PR to the infrastructure repo that adds them as a user, puts them on a team in a Jsonnet config, and defines a Spacelift dev stack.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
