~/yogesh
Get in touch
← yogeshtiwari.com
Ongoing engagementJun 2026 – present · DevOps Lead: infrastructure, delivery, reliability and architecture

Architecture audit and multi-region feasibility for a US freight carrier's AWS platform

DevOps lead for a 15-repository serverless AWS platform that passed from an implementation partner. Audited it, corrected the documentation, documented it to one standard, analysed cost and an IAM-quota outage, and led the active/active feasibility study.

  • AWS
  • CDK
  • Lambda
  • Aurora PostgreSQL
  • DMS
  • Redshift
  • FinOps
  • Disaster recovery

Summary

The platform is the operations backbone of a US less-than-truckload freight carrier. Office staff use a micro-frontend web app, drivers use an Android app with face-recognition login, sales staff have their own tooling and customers use a self-service portal. Behind them sit serverless services on AWS and a data platform that replicates a legacy on-premises database into the cloud.

I lead DevOps for the platform, which passed to us from an external implementation partner. I audited it end to end, corrected documentation that contradicted the code, documented the services to one standard, and led the analysis behind a leadership question: can this run active/active across two AWS regions?

This is an anonymised case study. The client, partners, accounts, resource names and exact spend are left out on purpose. Figures are counts or percentages.

Scope: I am responsible for the platform's infrastructure, delivery and reliability. Application teams own the service code.

Status at a glance

WorkstreamStatus
Read-only audit of all 15 repositories, with corrections to the documentationDelivered
Platform master guide and a 15-section design for each of eight servicesDelivered
Active/active feasibility study and CTO briefing (analysis; decisions pending)Delivered
Cost review of the non-production account: 38 recommendationsDelivered
Root-cause analysis of the IAM-quota deploy outageDelivered
IAM role clean-up and quota fixOpen
Warm-standby second regionProposed
Web-app CI optimisation (on a branch, not merged, impact not measured)Proposed
Driver map-matching fix (designed, not implemented)Proposed

Nothing marked Proposed is running. The architecture diagram draws those items dashed.

Impact at a glance

15repos audited
8services documented to one standard
13active/active blockers ranked
38cost recommendations, ~30% of non-prod forecast
396unused IAM role candidates found
20scripts that regenerate the docs
  • Turned an open-ended request into a phased, costed recommendation and a list of eight decisions for leadership.
  • Corrected documentation errors, including a database documented as global with no replica attached.
  • Wrote documentation for engineers, new joiners and executives.
The platform
AspectDetails
UsersOperations and back-office staff, drivers, sales staff, external customers, BI and partner tools
CapabilitiesDispatch and live driver tracking, linehaul planning and load board, inbound planning and trips, quoting, rating, fuel surcharge, claims and billing exceptions, sales territories, customer tracking and documents
Codebase15 repositories: shared foundation, data platform, CDC ingestion, back-office, customer-portal, GraphQL and sales services, the driver mobile backend and app, three .NET services, the web host and shared engineering conventions
Environments6 stages (dev, demo, tst, qa, uat, prod) in 3 AWS accounts: one tooling account, one non-production, and one that holds both uat and prod. One live region (us-west-1) across 2 availability zones
ScaleAbout 146 Lambda definitions in infrastructure code (54 in the driver backend), 13 DynamoDB tables, 17 CDK pipelines and 77 GitHub workflow files, more than 1,300 SQL migrations in the data platform, and about 2.2M lines of code
LegacyAn on-premises DB2 system of record, replicated into AWS with DMS (20 replication tasks in production) while its functions move to the new services

Architecture highlights

  • Python FastAPI and .NET 8 APIs on Lambda behind API Gateway REST, HTTP and WebSocket endpoints, sharing Aurora PostgreSQL behind RDS Proxy with a read-only endpoint.
  • A shared Lambda authorizer that verifies JWTs against two Cognito pools and reads role permissions from PostgreSQL.
  • A React host shell that registers five micro-frontends at runtime through Vite Module Federation.
  • SNS FIFO to SQS fan-out filtered by event type, and a WebSocket path that lands driver locations in DynamoDB.
  • A strangler-pattern ingestion path: DMS replicates DB2, sixteen database triggers invoke a publisher Lambda, five entity queues feed processors, and the processors write the modern schema and back to DB2.
  • Three Cognito user pools: staff through SAML federation, drivers through a custom challenge with Rekognition face matching, customers with just-in-time password migration.
  • AWS CDK with self-mutating pipelines in a central tooling account, GitHub Actions for CI and over-the-air patching for the Android app.
What I did

Independent audit

  • Ran a read-only review of all 15 repositories, tracing each claim to a file and line instead of trusting existing documents.
  • Corrected documentation that was wrong. One service was documented as 42 Lambdas on SAM and is 54 on CDK. A database documented as a global cluster for disaster recovery had no secondary region attached, so nothing was replicating. The disaster-recovery pipeline in the data platform is dormant.
  • Mapped production approval across the repositories: four different models, and three repositories with no pipeline approval step that rely on a manual tag-dispatch workflow.
  • Found a half-finished SAM to CDK migration in three .NET repositories, where both stack sets deploy on every merge.
  • Produced a platform-wide risk register and a takeover roadmap covering DevOps practice, FinOps, security hygiene and disaster recovery.

Multi-region and active/active feasibility study

Leadership asked for very high availability against a full regional outage. I owned the analysis and the recommendation, and ranked 13 blockers. Findings I could confirm in the code:

  • Identity is a hard constraint. Cognito user pools are regional and hold local passwords, so they cannot simply be replicated.
  • The region is fixed in every repository's configuration, and there is no failover DNS or traffic layer.
  • Scheduled jobs change business data without locking or idempotency, so they would run twice in two regions.
  • Aurora has no secondary today: the global-cluster wrapper exists but no second region is attached, and Aurora backup retention is the default.
  • The study also flags that most tables use sequence-generated integer keys, which would collide under multi-region writes. That figure comes from the study's own analysis.

Recommendation: warm standby with automated, drill-tested failover rather than true multi-master. Proposed targets are RPO about 1 second and RTO 1–15 minutes, against an estimated analytics recovery time today of about 10 hours. These are design targets, not measurements.

  • Phase 0 is hygiene: deletion protection, explicit backup retention, rotating committed secrets, reconsidering full SQL statement logging and giving alarms a notification target.
  • Phases 1 to 5 then make failure detectable, decide authentication per user type, build the second region, add a traffic-failover layer and prove it with recurring drills.
  • The study proposes Global Accelerator for traffic failover; the API entry points would need a suitable endpoint type behind it, which is one of the open design questions.

I delivered it in three formats: a full feasibility report, a CTO briefing pack with the decisions needed, and a plain-English guide for non-technical stakeholders. I listed eight business decisions to settle before scoping could finish.

FinOps

  • Analysed six months of non-production spend with read-only Cost Explorer, Cost Optimization Hub and Cost Anomaly Detection.
  • Identified 38 recommendations worth about 30% of the account's forecast month-end cost. Reservations were about 73% of the savings (eight items, 37–62% each), deleting idle resources about 26% (eleven items), and Graviton and gp3 moves the rest.
  • Surfaced the drivers: relational database spend up about 22% over six months, and 91 cost anomalies in 90 days.
  • Wrote a 24-item optimisation backlog for the back-office service: 6 high, 15 medium and 3 low priority, all not started.
  • These are recommendations. I do not have confirmation that any were applied.

Incident analysis

  • IAM role quota: the shared non-production account sat at 999 of 1,000 IAM roles. The first merge of a new service triggered parallel deploys to dev, qa and tst, which failed on role creation and rolled back, while GitHub CI on the same commit passed in 35 seconds. My RCA names the root cause; the proposed fix is a quota increase or removing unused roles. A read-only audit found 142 roles never used and 254 unused for over a year, about 396 candidates in all. The RCA records the root cause as identified and not yet resolved, and both actions are still open.
  • Driver position drifting 5–50 m off the road: traced to raw phone GPS being stored and broadcast without road-snapping. I designed a fix that uses the navigation SDK's map-matched position and the existing WebSocket payload, with no backend change, estimated at 2–4 days of mobile work plus QA. It is designed, not implemented or measured.

Architecture documentation (docs-as-code)

  • Wrote the architecture documentation, with 20 Python scripts that generate the Word files and diagrams so they can be regenerated as the system changes.
  • A 15-section low-level design template applied to eight core services, a platform master infrastructure guide, a DevOps/SRE handbook, deployment and setup runbooks, a networking deep dive, a beginner's guide and a 100-question onboarding Q&A.
  • Each document records the real state of its repository, gaps included, such as missing CI gates, wildcard IAM and alarms with no notification target.

CI standard for the web app (proposed)

  • Five parallel jobs (lint, type-check, unit test, code quality and Playwright), ESLint caching, path filters so documentation-only changes skip CI, concurrency groups, and no duplicate Storybook build.
  • My design review of it: keep the production build step in CI, and key the cache on the lockfile hash instead of the commit SHA. This is on a branch and not yet merged, so the speed-up is not measured.
Today versus the enterprise standard

I track every gap against a target standard. Each row is on the roadmap, ordered by risk and cost.

AreaTodayEnterprise standard
Account isolationuat and prod share an AWS account and, in places, a VPC and security groupsProd in its own account and VPC, separate from every other stage
Disaster recoveryOne region; a global-cluster wrapper with no secondary; empty DR pipelineWarm standby in a second region with automated, drill-tested failover (targets RPO about 1 s, RTO 1–15 min)
BackupsAurora on the 1-day default, no restore test14–35 day retention, a Backup vault with cross-region copy, a timed restore drill each quarter
Production gatesFour different approval models; three repos rely on a manual tag dispatchOne model everywhere: protected environments with required reviewers on uat and prod
CI identityOne OIDC role has administrator access and trusts any repository in the organisationPer-repository, per-branch roles with least privilege
SecretsSome roles can read any secret; some values live in configPer-service scoped access, rotation, nothing in git
Edge protectionNo web application firewall defined in the infrastructure codeA regional WAF on API Gateway and CloudFront with managed rules and a rate-based rule
Observability27 alarm definitions, many with no action; no SLOs; no on-callEvery alarm has an action, SLOs on the key APIs, paging with an on-call rotation
MessagingSome queues lack dead-letter queues; one linehaul message group serialises all eventsA dead-letter queue and alarm on every queue; a message group per entity
Legacy ingestionProcessors write three stores without a shared transactionIdempotent processors, ordered replay and a reconciliation job
Delivery codeSAM and CDK stacks both deploy on every mergeFinish the move to CDK and retire the SAM stacks
RuntimesPython 3.8 and 3.9 and Node 18 still in useSupported runtimes only, upgraded on a schedule
NetworkOne VPC endpoint in totalGateway endpoints for S3 and DynamoDB, interface endpoints for Secrets Manager, egress reviewed per AZ
Stack
  • Compute and API Lambda, API Gateway, FastAPI, .NET 8, GraphQL
  • Data Aurora PostgreSQL, RDS Proxy, DMS, Redshift, Glue, DynamoDB, S3
  • Messaging SNS, SQS, EventBridge
  • Edge and identity CloudFront, Route 53, ACM, Cognito, Rekognition
  • Security and operations KMS, Secrets Manager, CloudWatch, X-Ray, cost tools
  • IaC and delivery AWS CDK (Python and TypeScript), CDK Pipelines, GitHub Actions with OIDC
  • Application React 18, TypeScript, Vite Module Federation, Playwright, Flutter