Post Syndicated from Aman Sharma original https://aws.amazon.com/blogs/architecture/how-country-road-group-built-a-pattern-driven-integration-solution-on-aws/
Are you an integration architect, platform lead, or engineering manager spending a considerable amount on middleware licenses only to move data between systems? This post shows how Country Road Group replaced that middleware with a pattern-driven integration solution on AWS.
Enterprise integration solutions like BizTalk, MuleSoft, TIBCO and Boomi solved the right problem when they emerged. But they also tightly coupled applications to the middleware itself, through proprietary adapters, orchestrations, and message formats. That coupling has become a major source of cost and pain. Many organizations now pay hundreds of thousands per year in licensing, hosting, and maintenance for middleware that delivers no new capability. Meanwhile, the talent to maintain it disappears from the market. The interfaces themselves haven’t changed: publish-subscribe, content-based routing, request-reply, scatter-gather. Cloud-native services now implement them directly, without requiring a middleware runtime in between.
Country Road Group (CRG) is a major Australian fashion retailer operating five brands (Country Road, Mimco, Witchery, Politix, and Trenery) across more than 600 stores. CRG faced exactly this problem. Their 21 integration interfaces ran on Microsoft BizTalk Server hosted on VMware, connecting point-of-sale systems, Oracle RMS databases, and ecommerce platforms. BizTalk was approaching end-of-support. VMware costs were escalating post-Broadcom acquisition. And the team couldn’t hire BizTalk developers anymore.
In this post, we walk through CRG’s Strategic Integration Platform (SIP) and the declarative, pattern-led approach behind it. Rather than writing orchestration code for each interface, CRG’s teams declare which integration pattern an interface uses, and pre-built Terraform modules provision the infrastructure behind it. We cover the four processing lanes that replaced BizTalk and the custom Error Management System that handles failures across them.
The approach doesn’t depend on any one infrastructure-as-code tool. To help your team adopt it, we’re also releasing a starter kit: the Enterprise Integration Patterns AWS Cloud Development Kit (AWS CDK) Library. It’s an open-source set of 29 constructs that implement the same patterns as reusable infrastructure. Teams using Terraform can use it as a reference implementation. The kit includes an agent skill that helps AI coding assistants such as Kiro and Claude Code select, configure, and compose the right pattern.
Why CRG built SIP
CRG’s existing integration ecosystem suffered from tool sprawl and the presence of end-of-life middleware (BizTalk 2013), leading to increased production instability and operational overhead.
SIP addressed four key value drivers
Legacy debt: Decommission BizTalk 2013 and its unsupported VMware/Broadcom infrastructure.
Tool sprawl: Consolidate BizTalk, Workato, Apollo, and Kafka into a single integration solution with one engineering skillset.
Low velocity: Adopt API-first and continuous integration and continuous delivery (CI/CD) patterns to accelerate new partner integrations.
Security and resiliency risk: Standardize authentication and authorization across every interface and treat dead-letter queues (DLQs) as data stores. Failed messages hold full copies of customer payloads, so DLQs need the same encryption, retention, and access controls as the primary channel to stay within data residency and retention requirements.
SIP architecture overview
The SIP follows a “Compose on Cloud-Native” strategy. It combines AWS serverless compute (Spring Boot on AWS Lambda, AWS Step Functions, Amazon EventBridge) with Apache Camel on Amazon Elastic Container Service (Amazon ECS) with AWS Fargate for long-running and stateful flows.
The architecture is organized into three layers as shown in Figure 1: a pattern layer where each interface is composed from standardized integration patterns, an AWS service layer where Terraform and CI/CD templates provision and govern infrastructure, and a source-and-target connectivity layer bridging on-premises, cloud, and B2B endpoints.
Traffic flows through a four-lane, pattern-led service bus (batch, API, JDBC, and event), as shown in Figure 2. Each lane routes to the appropriate compute runtime based on payload characteristics and processing duration.
- Pattern layer: Each of the 21 interfaces is expressed as a composition of standardized integration patterns (publish-subscribe, content-based routing, and others). This layer contains the business-specific logic: Lambda handlers that validate, transform, and route payloads, orchestrated by Step Functions for multi-step workflows and triggered by Amazon EventBridge rules or Automic. The patterns act as a shared vocabulary across the engineering team. Deployment of an interface starts by selecting a declarative pattern or Terraform code, not by writing infrastructure from scratch.
- AWS service layer: The solution provisions its integration surface from AWS managed services, grouped by role. Amazon API Gateway is the entry point, with AWS WAF shielding and rate limiting in front. AWS Lambda handles stateless event processing, and AWS Step Functions orchestrates multi-step workflows with standardized retry and catch logic. Amazon EventBridge is the canonical event bus, with Amazon Simple Queue Service (Amazon SQS) and Amazon Simple Notification Service (Amazon SNS) providing asynchronous buffering and fan-out. Amazon Simple Storage Service (Amazon S3) persists messages, using S3 Intelligent-Tiering and archival to Amazon S3 Glacier storage classes. AWS Transfer Family provides managed SFTP and FTP endpoints. Amazon ECS with AWS Fargate runs Apache Camel routes for long-running flows, and Amazon DynamoDB holds metadata and the error index. Terraform is the authoritative provisioning engine for every AWS resource.
- Source and target connectivity layer: On the source side, SIP integrates with on-premises, OCI, legacy core applications (Oracle RMS, Manhattan WMS, Magenta Retail), cloud and digital platforms (Salesforce Service Cloud, eStar Online), and B2B partner portals. On the target side, flows deliver to Oracle databases, eStar (ecommerce), file systems, and partner endpoints.
Note: SIP pulls. Sources don’t push. SIP retrieves data from source systems on its own schedule rather than accepting unbounded pushes. The consumer, not the producer, controls the rate. Where pull doesn’t fit: Some sources can only push, such as SaaS webhooks. In those cases, SIP accepts the push into a queue and processes it at its own pace, so the same principle holds.
Figure 2: CRG Strategic Integration Platform — multi-lane service bus architecture showing four processing paths (batch, API, JDBC, event) with transformation routing and error management
SIP routes traffic through four pattern-led lanes
- Lane 1 (MFT/Batch) handles file-based ingestion: Automic or Amazon EventBridge triggers AWS Transfer Family to receive SFTP traffic, archive to S3, and hand off to a parser Lambda for validation and transformation.
- Lane 2 (API/Real-Time): Processes synchronous REST requests through Amazon API Gateway into a Step Functions orchestrator. A transformation engine routes to the appropriate runtime: Lambda for sub-five-minute jobs, or Apache Camel on ECS Fargate for long-running and stateful flows.
- Lane 3 (JDBC/Data Aggregator): This pattern handles direct database connectivity for bulk extractions, routing through Lambda and Amazon AppFlow for lightweight aggregation or ECS Fargate for heavier workloads.
- Lane 4 (Event/Message) manages asynchronous flows: External events enter through API Gateway while internal events route through Amazon EventBridge, with Amazon SNS for fan-out broadcasting and Amazon SQS for buffered consumption.
Across all four lanes, the Error Management System (EMS) provides a unified error handling layer. Failed transactions route to a dead letter queue in Amazon SQS. EMS captures the error metadata in DynamoDB and persists the payload in Amazon S3, with every failure carrying a correlation ID and a standardized JSON error contract. It is built on Spring Boot running on Lambda, with a Next.js front end on AWS Amplify.
L1 and L2 operators use the EMS dashboard to inspect, modify, and resubmit failed transactions idempotently, without developer involvement. New interfaces onboard to EMS automatically through a unique interface ID. This moved CRG from developer-led (L4) error recovery to operator-led (L1) first-line resolution.
Key design decisions
Lambda-first, ECS as fallback: Lambda handles short-duration event processing, Apache Camel on ECS Fargate serves long-running, stateful, and large-file flows.
Reproducible infrastructure: Every AWS resource in the platform is defined in Terraform, so any environment can be rebuilt exactly from code. That fixes configuration drift, a bad change, or an accidentally deleted resource, and the same templates stand up a new environment or Region. Terraform state is held in a versioned, access-controlled S3 bucket. Infrastructure as code rebuilds the platform, not its data, so data is protected separately. DynamoDB point-in-time recovery restores tables, S3 versioning restores objects, and dead-letter queues hold failed messages for redrive. Runtime failures such as an Availability Zone outage don’t need a redeploy at all, because Lambda, SQS, DynamoDB, and Step Functions run across multiple Availability Zones by default.
Amazon EventBridge as canonical event bus: All inter-pattern communication flows through Amazon EventBridge for content-based routing, event replay, and native integration with over 200 AWS services.
Five-layer security: AWS Identity and Access Management (IAM) least-privilege role-based access control (RBAC), AWS WAF with virtual private cloud (VPC) isolation, data classification (Public through Restricted), TLS 1.2+ in transit with AWS Key Management Service (AWS KMS) encryption at rest, and structured audit logging with automated personally identifiable information (PII) redaction.
Open source: Enterprise Integration Patterns CDK Library
In this post, we share an open-source AWS CDK construct library that codifies 29 canonical integration patterns as reusable L3 constructs. Each construct provisions messaging infrastructure, IAM permissions, dead-letter queues, and retry logic from a single declaration. Amazon CloudWatch alarms are deliberately left to the consumer, because thresholds and notification targets are environment specific. The library uses TypeScript and AWS CDK. Teams using Terraform or other infrastructure as code tools can reference the patterns and translate to their provisioning framework.
Prerequisites
An AWS account with the AWS CDK bootstrapped in your target AWS Region, Node.js 20 or later, and the AWS CDK CLI v2. Familiarity with TypeScript helps but the examples are short. For Path 2 you also need Kiro or Claude Code.
Getting started
There are two ways to go from a requirement to a deployed pattern. Path 1 is hands-on: you write the construct declaration and run the CDK commands yourself. Path 2 is agent-assisted: the agents shipped in the repository select and configure the construct for you, and you run the final deploy. Both produce the same thing, a small app.ts that instantiates one or more of the 29 library constructs, so the security posture is identical whichever you choose. Start with Path 1 if you already know which pattern you need. Start with Path 2 if you are coming from a legacy platform’s vocabulary and want help mapping it. Both paths begin the same way:
The repository is a construct library, not a deployable application: app.ts ships as an empty stub, and cdk synth on a fresh clone produces no stacks by design.
Path 1: Declare a pattern yourself
Open app.ts and declare the construct you need. The README’s Implementation Guide has worked examples for request-reply, publish-subscribe, scatter-gather, and saga. Then synthesize and deploy:
Path 2: Let the agents do the selection and configuration
Open the repository in Kiro or Claude Code and select an agent from the chat input. Kiro, the agentic coding IDE and CLI from AWS shown in Figure 3, uses spec-driven development to translate natural-language requirements into pattern compositions. Describe the integration requirement in your own terms, and the agent selects the right construct from the library, writes the declaration into app.ts with correctly configured props, and validates it with npm run build, npm test, and cdk synth. Deployment stays with you: the shipped eip-architect agent is denied cdk deploy and cdk destroy by design, so nothing reaches an account without a human running it. When the agent reports the declaration ready, you run the same two commands as Path 1.
The repository ships two agent skills and two custom agents for this. Use them in order, or go straight to the second if you already know what you are building.
integration-advisorruns discovery. It asks the questions, maps each of your existing interfaces to a construct, and writes an assessment file. It touches no code.eip-architectpicks that assessment up and writes the CDK declarations that instantiate the right library constructs with the correct configuration for each pattern, then verifies them.
Clean up
Remove anything you deployed with npx cdk destroy. The constructs default to RemovalPolicy.DESTROY, so queues, tables, and buckets created by a pattern are removed with the stack.
Results
Annual integration service costs dropped from approximately $300,000 to $60,000, an 80 percent saving. Four middleware tools (BizTalk, Workato, Apollo, and Kafka) consolidated to one. The primary objective, full decommissioning of Microsoft BizTalk Server and its associated VMware/Broadcom infrastructure, has been accomplished. CRG now deploys new interfaces through standardized patterns in hours rather than weeks, using cookie-cutter Terraform templates and automated CI/CD pipelines. The Error Management System shifted failure resolution from engineering to L1 operators, fundamentally changing the support cost model. Distributed telemetry across Amazon CloudWatch, AWS X-Ray, and Dynatrace provides end-to-end transaction tracing with correlation IDs through every integration hop. CRG migrated interfaces in waves grouped by business function, with service-group rollback allowing any failed wave to revert independently. The architecture is cloud-native by design: because the pattern layer is decoupled from the service layer, you can incorporate new AWS services as steps within any existing pattern composition without re-architecting the platform.
Conclusion
For organizations retiring legacy middleware or designing integrations from scratch, the goal is the same: a modern, decoupled architecture where systems exchange data through well-understood patterns, not through a central runtime they all depend on. CRG’s approach offers a replicable playbook. Legacy integration middleware carries compounding costs: licensing, hosting, scarce talent, and opportunity cost from slow delivery cycles. A pattern-driven migration on cloud-native services addresses all four simultaneously. The open-source AWS CDK construct library and Kiro agent skill published alongside this post give your team a head start, packaging the patterns CRG proved in production. Whether you run BizTalk, MuleSoft, TIBCO, or Boomi, the integration patterns are the same. Only the execution layer changes.

