A containerized enterprise platform, delivered as code.

Demand Chain AI is an Enterprise IT SaaS organization running containerized web applications for enterprise workloads. Ampity designed and delivered the production platform on Amazon ECS with AWS Fargate, with every resource provisioned through Terraform.

Results

MeasureResultBefore / target
Release time5 to 7 min per releaseDown from 30 to 45 minutes of manual deployment
Application availability~99.9%Target 99.5%; no deployment downtime since go-live

What had to change, and what success meant.

  • Downtime risk during failures and traffic spikes, affecting enterprise users
  • Manual infrastructure changes and inconsistent deployment practices
  • Non-standard network and access controls, raising security exposure
  • Limited room to scale with business growth

Goals and objectives

  • Run services across multiple Availability Zones behind a managed load balancer
  • Provision every environment from Terraform, repeatable and auditable
  • Release through automated CI/CD pipelines
  • Centralize logging, monitoring and alerting
  • Segment the network and apply least privilege
  • Adopt a container platform that scales with demand

Services chosen for the workload, and why.

ServiceWhy it was chosen
Amazon ECS on AWS FargateRuns the containers without servers to manage; services scale and heal behind the load balancer
Application Load BalancerSpreads traffic across services and Availability Zones with health checks
Amazon VPCPublic and private subnets isolate the application tiers
Amazon RDS, Single-AZManaged database with automated backups; Single-AZ chosen for cost, as a documented trade-off
Amazon ECRImage registry with scan on push and versioned image tags
Terraform and GitHub ActionsEvery resource as code; builds, image pushes and ECS updates are automated

Alternatives considered

AlternativeDecision
Self-managed containers on Amazon EC2Not chosen: capacity, patching and scaling would stay manual
Kubernetes orchestrationNot chosen: more operational complexity than the workload needed

Architecture diagram

Demand Chain AI architecture in us-east-1: public load balancing and NAT gateways, private ECS Fargate application tiers across two Availability Zones, private PostgreSQL, shared security and operations services, and GitHub Actions with Terraform.
ResponsibilityImplementation
EntryAmazon Route 53 to an Application Load Balancer across multiple Availability Zones
ComputeECS tasks in private subnets across zones, scaled on demand and health metrics
DataAmazon RDS, Single-AZ, with automated backups; an intentional cost trade-off
SupportingAWS Secrets Manager, Amazon CloudWatch, Amazon S3, Amazon ECR
FootprintNo on-premises or external infrastructure components

How a change reaches production, every time.

StepWork
Pull requestterraform fmt and validate, peer review
PlanChanged layers only, OIDC role per account
Apply on mainThe saved, reviewed plan is applied
VerifyALB health checks and CloudWatch; roll back to the previous task definition

Claude Code reads a layer, proposes a plan and edits on a branch after approval; engineers commit and push, the pipeline applies

Task definitions, IAM roles, networking and secrets validated before promotion; images scanned before ECR

Two pipelines, one security model.

Application changes pass peer review, build validation, ECR scanning and pre-deploy checks before ECS deployment. Infrastructure changes follow Terraform validation, reviewed plans and apply on main. Both pipelines use OIDC.
Users reach application services through Route 53 and a load balancer. Authentication, identity, product APIs, front ends, data loaders and exporters have distinct task roles and scaling policies, with PostgreSQL, ECR and CloudWatch support.

Operated and secured to one standard.

AreaControls
Account governanceRoot user for setup tasks only, MFA enabled; corporate-owned account contacts; CloudTrail in all regions, logs in a protected S3 bucket
Identity securityRole assumption with temporary credentials; GitHub Actions uses an OIDC role per account; no AWS keys in GitHub; a dedicated task IAM role for every ECS service
Workload health KPIsECS running versus desired tasks; ALB requests, latency, 4xx and 5xx errors; task CPU and memory, RDS metrics in CloudWatch
RunbookDay-to-day operations and incident response; steps mapped to each health KPI and alarm; rollback to the previous task definition and image
Network securityInternet traffic reaches only the ALB, over HTTPS; no direct access to services or the database; security groups limit traffic between ALB, services and database
Data encryptionTLS 1.2 or higher at the ALB, certificates from ACM; S3 buckets encrypted, versioned, public access blocked; RDS passwords managed and rotated by Secrets Manager

Measured results, against the baseline.

KPIBaselineTargetResultMeasurement source
Application deployment time30 to 45 minutes, manual stepsUnder 10 minutes5 to 7 minutes per releaseGitHub Actions run logs and ECS deployment events
Application availabilityFrequent interruptions during deployments99.5% or betterAbout 99.9%, no deployment downtimeCloudWatch, ALB target health, ECS service monitoring

Recovery targets

ComponentRTORPO
ECS application services~30 minNear-zero
Application Load Balancer<15 minN/A
Amazon RDS, Single-AZ1 to 2 hoursLast automated backup
ECR, CloudWatch, Secrets Manager<30 minN/A

Recommended from business impact and cost, and discussed with the customer during design.

Cost modelling and continuous improvement

  • Single-AZ RDS and right-sized ECS tasks chosen to balance cost and availability
  • Common tags on every resource; tag compliance checks add missing ownership and cost tags
LessonImprovement
Pipeline stabilizationVersioned task definitions, mandatory image tags, rollback and pre-deployment validation are now standard
Single-AZ database trade-offAcceptable for this workload; availability trade-offs are documented and agreed with the customer

Explore Ampity’s cloud engineering services.