How Diaflow Built Active-Active AWS and SOC 2 Readiness in 4 Weeks
Every enterprise security questionnaire asks two things early: show us your SOC 2 report, and tell us how you fail over between regions. For a fast-growing SaaS platform, those two answers are the gate between today's customers and the next tier of contracts.
Diaflow needed both at once, and the usual route does them in sequence: build the multi-region architecture, then audit it, then reopen whatever the audit finds. With CloudThinker, Diaflow ran architecture and compliance in parallel against one Terraform codebase and stood up three-region infrastructure with SOC 2, HIPAA and GDPR readiness in 4 weeks. Day 2 then went to CloudThinker agents, with Resolve investigating incidents across the stack.
The customer
Diaflow is an AI-native automation platform on AWS. To close enterprise deals, three requirements landed at the same time:
- Global latency. An active-active deployment across three AWS regions (US, EU and APAC), with no downtime during the move.
- Regulatory readiness. SOC 2, HIPAA and GDPR controls in place to unblock the enterprise pipeline.
- Velocity. None of it could slow down feature shipping.
Why the traditional route takes months
The usual answer is to hire specialized cloud architects and security engineers, and the hiring alone takes longer than the market will wait. The work itself is also structured to be slow:
Architecture and compliance run in sequence. A team designs the multi-region topology, builds it, and then a compliance effort audits what was built. Every finding (encryption at rest, IAM least privilege, logging) means reopening infrastructure that's already live.
State is the hard part, and it comes late. Moving stateless services between regions is routine. Replicating databases with acceptable lag and clean failover is where projects stall, and it's usually discovered after the easy wins are done.
Compliance evidence is a spreadsheet exercise. Controls get documented once for the audit and drift the week after. The next audit starts from scratch.
Day 2 isn't planned. A multi-region footprint doubles the surface to monitor and the bill to watch. Without automation, that load lands on the developers who are supposed to be shipping features.
Where CloudThinker fits
Diaflow worked with CloudThinker instead of adding contractors. The work ran as four workstreams against the same architecture, so compliance shaped the design instead of auditing it afterwards.
01Migration
Active-active
Cloud-native topology across three regions, moved without downtime.
02Optimization
Right-sized
Right-sizing, resource scheduling and Savings Plan recommendations for the new footprint.
03Security
Continuous
Vulnerability scanning and misconfiguration detection with automated remediation.
04Compliance
SOC 2, HIPAA, GDPR
Monitoring, evidence and policy enforcement running in the background.
The phases overlapped on purpose, so each workstream could inform the others instead of producing rework.
01Weeks 1 to 2
Design and map
Topology designed, compliance gaps fixed in Terraform before anything was provisioned.
02Week 3
Distribute state
Multi-region databases and EKS tuned for failover and rolling updates.
03Week 4
Operate
Observability, routine remediation and cost governance handed over.
Weeks 1 to 2: design and compliance mapping. The topology was designed for low-latency traffic between regions. At the same time, the proposed architecture was scanned while it was still code. Gaps in encryption at rest and IAM least privilege were found and fixed in the Terraform definitions before a single resource was provisioned. That's where the traditional route loses most of its time. A finding in a Terraform plan is a review comment:
resource "aws_rds_cluster" "workflows" {
cluster_identifier = "workflows-primary"
engine = "aurora-postgresql"
storage_encrypted = true
kms_key_id = aws_kms_key.data.arn
# ...
}
The same finding in a running account is a migration.
Week 3: distribute the state. Multi-region database clusters got automated failover, with replication lag tuned for consistency across regions. EKS got node scaling policies and rolling update strategies to meet the no-downtime requirement.
Week 4: operate and hand over. Observability that sorts incidents by severity, routine remediation for issues like hung pods and resource exhaustion, and cost governance with Savings Plan recommendations and resource scheduling to keep the new footprint on budget.
Automated remediation only works if the team knows exactly what runs on its own. CloudThinker acts within Auto Mode, so Diaflow decides what runs on its own (restarting a hung pod) and what waits for approval (a scaling change). Every action lands in the record, which a SOC 2 program uses twice: once for operations, and again as evidence.
One incident, end to end
In a distributed architecture, a symptom can start in the application layer (Kubernetes), the data layer (Postgres), the edge or the network. CloudThinker reads the monitoring Diaflow already has and correlates across all of them.
01Signals
Diaflow stack
Grafana and PrometheusMetrics and alert rules
DatadogMonitors and logs
Kubernetes (EKS)Pods, nodes, rollouts
AWSCloudFront, S3, databases, CloudTrail
GitHub and GitLabRecent changes and pipelines
Alerts arrive by webhook
02Investigation
CloudThinker
- CorrelateAll layers at once, one timeline
- Test hypothesesEach reading checked against data
- Root causeWith the evidence cited
Changes through Auto Mode
03Outcome
In the thread
- Key findingsWhat fired and what it means
- Recommended actionsFix plus prevention, with snippets
- ResolutionApplied, verified, recorded
Fix and prevention together
This incident is real. The values below are illustrative.
01Report
Broken images
PNG assets served as text/xml instead of image/png.
02Readings
Three suspects
Wrong S3 metadata, a header rewrite at the edge, or a stale cache.
03Evidence
S3 vs edge
S3 says image/png. The edge serves an old cached copy.
04Fix
Invalidate
Cache invalidation created and confirmed complete.
05Prevent
Upload rule
Content-Type set at upload, with code snippets.
The report. Users saw broken image assets. PNG files failed to render because they arrived with Content-Type: text/xml instead of image/png.
The readings. A wrong header at the browser has three plausible sources, and each predicts something different:
- The object in S3 has the wrong metadata. Then S3 itself returns
text/xml. - Something at the edge rewrites the header. Then every object behind that cache behavior gets the wrong header, PNG or not.
- CloudFront is serving a stale cached copy. Then the edge response is old (a high
Age, a cache hit) and differs from what S3 returns now.
The checks. Compare what the edge serves with what the origin holds. The edge response:
curl -sI https://assets.example.com/img/workflow-card.png
# content-type: text/xml
# x-cache: Hit from cloudfront
# age: 172800
The object in S3:
aws s3api head-object --bucket example-assets --key img/workflow-card.png
# "ContentType": "image/png"
The finding. S3 had the correct metadata, but CloudFront was serving cached responses with the wrong header. Files had been uploaded without a Content-Type, fixed later in S3, and the cache stayed stale. CloudThinker named the distribution and tied the errors to those stale responses.
The fix. Create a cache invalidation and confirm it completed:
aws cloudfront create-invalidation \
--distribution-id E2EXAMPLE123 \
--paths "/img/*"
aws cloudfront get-invalidation \
--distribution-id E2EXAMPLE123 \
--id I2J0I21PCUYOIK
# "Status": "Completed"
The prevention. Set the Content-Type at upload time instead of fixing it afterwards:
aws s3 cp workflow-card.png s3://example-assets/img/workflow-card.png \
--content-type image/png
An engineer working alone checks S3, then CloudFront, then the cache policies, then the upload pipeline, and only learns which layer mattered at the end. Here the comparison between S3 and the edge, which is the whole answer, came first.
Results
The figures below are from the Diaflow case study.
| Measure | Result |
|---|---|
| Three-region infrastructure | 4 weeks |
| SOC 2, HIPAA and GDPR readiness | 3 weeks of those 4 |
| Manual operations work | Down 80% |
| Uptime | 99.9% |
The longer-term change is who does the work. In a traditional model, the DevOps team grows with the platform. With the day-to-day infrastructure load handed to CloudThinker, Diaflow's conversations moved from "can the database handle this load?" to "how fast can we ingest this new dataset?"
"When we started, I honestly didn't believe this timeline was achievable. We were incredibly impressed by the flexibility and professional ability of the CloudThinker team to dive deep into our specific architecture. They didn't just resolve our technical debt; they helped us achieve the highest security standards and compliance in a very short time. It was a seamless experience from start to finish."
Jonathan Pham, Founder & CEO, Diaflow
Why this beats the traditional approach
| Traditional route | Diaflow's route | |
|---|---|---|
| Order of work | Build, then audit, then reopen | Architecture and compliance in parallel |
| Compliance gaps | Found in live infrastructure | Fixed in Terraform before provisioning |
| Stateful services | Discovered late, where projects stall | Planned as its own week, with failover tuned |
| Day 2 | Lands on the developers | Routine remediation and cost governance |
| Incident debugging | One layer at a time across consoles | Edge and origin compared in one pass |
The deeper difference is the order of the work. Compliance checked against code is a review comment, while compliance checked against live infrastructure is a migration. Running both in parallel against one codebase is what turned a months-long roadmap into a 4-week sprint.
Getting started
If you're facing the same mix of multi-region and compliance work, connect AWS with a read-only role and ask from chat:
"Users report images rendering broken from our CDN. Compare what CloudFront serves with what S3 holds for the affected objects and tell me which layer is wrong."
"Review our Terraform for the production account against SOC 2 controls. List encryption, IAM and logging gaps with the exact resource and the change that fixes it. Propose only, change nothing."
"Show me which resources in our second region are oversized compared with their last 30 days of use."
Next step: connect your AWS account and run the first prompt the next time an asset or header looks wrong. Resolve explains how an investigation runs from alert to verified fix.
Steve Tran, CTO, CloudThinker



