Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Booking.com Engineering 6 min read Case study mediumAdept

A Story of Delayed AWS Pipelines

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.

Assumes: Terraform data sourcesAWS OrganizationsAPI rate limiting

Related posts

  • Service disruption on October 20, 2025

    incident.io mediumAdept

    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. Delayed SMS and phone notifications cascaded because notification queues shared worker capacity, and slow retries stretched jobs to 30s. Fixes were blocked by a hidden Docker Hub base-image dependency in the deploy pipeline. Scaling escalation workers made things worse because dead tuples in a Postgres index made queue acquisition consume about 50% of worker capacity, and a rate-limiter bug applied limits only to the top 10 organisations. Remediations include a self-contained GCP build pipeline, region failover for Scribe, aggressive autovacuum, reworked acquisition logic, and per-provider isolated notification workers.

  • Three Mighty Alerts Supporting Hugging Face’s Production Infrastructure

    Hugging Face mediumAdept

    Hugging Face's infrastructure team relies on three alerts to catch problems early. A static-threshold alert on NAT gateway throughput flags cost-relevant egress changes, such as misrouted traffic that skips cheap private paths to object storage; the fix uses Route53 Resolver DNS overrides managed with CDKTF. An end-to-end alert compares ALB request counts with logs archived through a Filebeat → Logstash → Elasticsearch → Parquet/S3 → Glue/Athena pipeline, catching log loss caused by backpressure, schema-detection failures, OOMs and failed archive jobs. The third alert tracks Kubernetes API error rates and rate limiting, which matter because kube-rs controllers manage certificates, node draining and billing.

  • How We Use Terraform At Slack

    Slack Engineering mediumAdept

    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. State lives in a versioned S3 backend with DynamoDB locking and is deployed by Jenkins plan/apply pipelines chained through sandbox and dev before production, while engineers plan safely from read-only "Ops" boxes. After a painful quarter-long 0.11→0.12 upgrade, the team built a wrapper that installs multiple Terraform and provider versions and picks one per state file from versions.tf. They also wrote a Go-based upgrade tool that checks remote-state dependencies and plans after upgrading. Modules moved from relative paths and git refs to an internal S3-backed catalog of versioned tarballs, which state files pin via vendored_modules.

  • Our Journey Migrating to AWS IMDSv2

    Slack Engineering mediumAdept

    Slack enforced IMDSv2 across roughly 60,000 EC2 instances in hundreds of AWS accounts. IMDSv2's session tokens, obtained by PUT and sent as a header, blunt SSRF-based credential theft. The team found IMDSv1 callers with the MetadataNoToken CloudWatch metric, a Prometheus dashboard and ImdsPacketAnalyzer, then made shared Terraform modules require tokens via an exclusion-list module and denied IMDSv1 launches with SCPs. Because SCPs don't cover the root account or service-linked roles such as AutoScaling, they added EventBridge/CloudTrail alerts routed to Slack and an EKS-hosted "IMDSv1 Terminator" that continuously forces IMDSv2 on any instance still allowing v1.

  • Onboarding yourself as an engineer at incident.io

    incident.io mediumAdept

    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. Once merged, Terraform provisions their dev environment, grants Google Cloud access based on user tags, and syncs Google Group memberships from the same config. The Catalog Importer then maps that team data into incident.io's Team catalog type, so the company's own product is configured as code alongside GCP, Sentry and Spacelift.

The quest for software engineering knowledge.

Look:
Layout: