Skip to Content
Cloud Engineering Academy
14. Advanced Banking Architecture

Core banking integration

Connect cloud-native services to a legacy core banking system over hybrid networking and MQ-style messaging, using an anti-corruption gateway, stand-in reads, a circuit breaker and safe handling of unknown outcomes.

advanced⏱ 2 h 30 min🟢 FreeSAP-C03SAA-C03SCS-C03

Assumes: .NET 10 LTS (file-based apps) · AWS SDK for .NET v4 · Amazon.CDK.Lib 2.277.0 · Terraform AWS provider v6 · Region us-east-1. Verified against official sources on 2026-11-18.

Learning objectives

By the end of this lesson you can:

  • Explain why the core banking system stays the system of record and why cloud services must treat it as a fragile, slower dependency.
  • Design hybrid connectivity (Direct Connect with VPN backup, Transit Gateway, DNS) for traffic between AWS and an on-premises core.
  • Choose between synchronous calls, queued commands and change-data-capture, and say what each costs in consistency.
  • Build an anti-corruption gateway with timeouts, a circuit breaker and clearly labelled stale reads, and run it in C#.
  • Handle the unknown outcome problem: the call timed out, but did the core post the transaction?
  • Describe how Amazon MQ, SQS and bridging fit with IBM MQ-style messaging and mainframe coexistence.

Prerequisites

Why this matters in banking

Almost every bank's accounts and postings live in a core banking platform that is decades old, reliable in its own terms, and not designed for the request rates, retry behaviours or availability of a mobile app. It may have:

  • a nightly batch window during which online posting is restricted or unavailable;
  • a hard throughput ceiling set by licensing or hardware;
  • interfaces such as MQ queues, fixed-width messages, COBOL copybooks or a thin SOAP layer;
  • change processes measured in quarters.

Now a new customer app, written for AWS, wants to show a balance on every screen open and post a transfer in under a second. If the app calls the core directly on every screen, an ordinary Monday morning peak becomes an outage of the core. If the app retries a posting after a timeout without a plan, a customer is debited twice. This lesson is about designing that boundary so the bank keeps both its core and its customers.

Educational content, not vendor or regulatory advice

Core systems, mainframe contracts and migration strategies differ widely, and many vendors publish their own integration rules. Operational-resilience obligations that cover the core, and any regulator expectations on outsourcing or mainframe change, need review by your architecture, risk and compliance teams ⚠ VERIFY. Nothing here asserts compliance.

The idea in plain language

Put a gateway between new services and the core. The gateway speaks the core's language on one side and a clean domain language on the other. It also protects the core: it limits calls, times them out, and stops calling when the core is unhealthy.

Three interaction styles, chosen per use case:

StyleUse forConsistencyFailure behaviour
Synchronous call through the gatewayPosting a payment that must succeed or fail nowStrong at the coreTimeout means unknown outcome; must reconcile
Queued command (SQS or MQ)Non-urgent postings, batch-like workEventual; command acknowledged, posted laterQueue absorbs the outage; age alarms warn
Read replica via CDCBalances, statements, searchEventually consistent; label the as-of timeReads continue when the core is down

The principle: writes go to the core; reads come from a replica where freshness allows. A customer checking a balance can tolerate "as of 10:02"; a debit cannot.

Analogy: a bank branch counter and a back office. Customers talk to a teller (gateway). The teller keeps a recent printout of balances for quick answers, but any money movement goes through the vault procedures (core). If the vault is closed for end-of-day counting, the teller still answers balance questions from the printout, marked with its time, and takes instructions that are executed in the morning.

The unknown outcome

A synchronous call to the core times out. Three worlds are possible: the core never got it, the core posted it and the reply was lost, or the core is still working on it. The caller cannot tell. The safe design is:

  1. Every posting carries a business reference (our idempotency key).
  2. On timeout, mark the payment UNKNOWN and do not retry blindly.
  3. Query the core by reference (an enquiry call or the next statement file) to learn the truth.
  4. Retry only if the enquiry shows it was not posted, or rely on the core's own duplicate detection by reference.

What problem the AWS services solve

NeedAWS optionLimits and sharp edges
Private network to the data centreAWS Direct Connect, with Site-to-Site VPN as a backupDirect Connect lead time can be weeks; a single connection is a single point of failure; use two connections in different locations for resilience ⚠ VERIFY recommended topology
Many VPCs and sitesTransit GatewayRoute-table design and overlapping CIDRs are the usual problems
On-premises name resolutionRoute 53 Resolver outbound endpointsPer-endpoint hourly cost; forwarding rules are per domain
QueueingSQS (standard or FIFO)FIFO has ordering and deduplication within a message group, with lower throughput limits ⚠ VERIFY quotas
Broker compatible with JMS, AMQP and MQTTAmazon MQ for ActiveMQ or RabbitMQThese are the two supported engines; IBM MQ is not an Amazon MQ engine ⚠ VERIFY, so IBM MQ stays on premises or runs self-managed, and a bridge connects it
Replicate changesAWS DMS CDC, or events published by an outboxCDC copies table rows, which may not match business events; map them
Mainframe workloadsAWS Mainframe Modernization and partner toolsCoexistence is the common first step; check service availability and fit ⚠ VERIFY

Microsoft / Azure comparison

You know (Microsoft/Azure)AWS equivalentWhat's different
ExpressRoute with VPN failoverDirect Connect with Site-to-Site VPN failoverSame shape; BGP and virtual interfaces are central concepts
Azure Virtual WAN hubTransit GatewayRoute tables and attachments instead of hubs
Azure Service BusSQS, Amazon MQSQS is simplest; Amazon MQ exists for protocol compatibility
BizTalk adapters for MQ and mainframeGateway service in .NET plus an IBM MQ client libraryYou own the adapter code, running on Fargate or EC2
Azure Data Factory CDCAWS DMS and Kinesis or S3DMS tasks replicate; you still model events
Polly policiesPolly v8 via Microsoft.Extensions.Http.ResilienceSame library on AWS; the breaker and timeout decisions are identical

Architecture

Security-boundary view

Only the gateway can route to the core network ranges. Application teams never get direct network access to the core, which keeps one team accountable for the load placed on it.

The 15-section design

Sections 1 to 3: requirements

SectionContent
1 BusinessLaunch a new mobile banking back end that reads balances and posts transfers against the existing core without increasing core load beyond an agreed ceiling, and without changing the core in this release
2 FunctionalF1 Balance and recent transactions. F2 Post an internal transfer. F3 Show clear status during core outage. F4 Reconcile gateway state with core. F5 Respect core cut-off windows. F6 Provide an operations view of queue depth and breaker state
3 Non-functionalRead availability 99.95% (served from replica). Balance freshness within 5 seconds under normal conditions; display "as of" time. Post p99 under 1.5 s with 2 s timeout. Core ceiling: no more than 150 requests per second from the new channel ⚠ agree with core owner. Core outage tolerance: reads continue, writes queue up to 4 hours. RPO 0 for acknowledged postings. RTO for gateway 15 minutes

Section 5: service selection

ChoiceWhyRejected alternativeTrade-off
Gateway service on FargateKeeps protocol and mapping logic in one owned placeEach app calls the coreOne more service to run; consistent protection of the core
Replica of balances via CDC or eventsOffloads reads and survives core outageRead through to coreStaleness; must label as-of time
SQS FIFO for queued postingsOrdering per account via message group, dedup by keyAmazon MQLess protocol compatibility; simpler operations
Direct Connect plus VPN backupPredictable latency and resilienceVPN onlyCost and lead time; VPN has variable latency
Idempotent enquiry on timeoutResolves unknown outcomes safelyRetry blindlyNeeds the core to offer an enquiry by reference

Sections 6 and 7: network and security

  • Network. Direct Connect to a Transit Gateway through a transit virtual interface; two connections in separate locations; VPN as a tertiary path ⚠ VERIFY design with your network team. Use non-overlapping CIDRs; where the core's ranges overlap yours, use NAT or PrivateLink-style patterns rather than renumbering the core. See CIDR planning.
  • Identity. Service-to-service authentication to the core according to its capabilities: mTLS, MQ channel authentication, or a technical user stored in Secrets Manager with rotation.
  • Segregation. Gateway role is the only role with network and credentials to the core. Posting worker and API tasks use separate task roles.
  • Data protection. Replica holds customer-linked data; encrypt with KMS, minimise fields, and apply retention (UK GDPR and data residency ⚠ VERIFY).

Sections 8 to 10: API, data and flow

  • API (gateway, internal). GET /accounts/{id}/balance returns { amount, currency, asOf, isStale }. POST /postings with Idempotency-Key returns 202 for queued or 201 for posted, with status POSTED, QUEUED, UNKNOWN or REJECTED.
  • Database. postings table (key idempotencyKey) holds status and core reference. balances replica table (key accountId) holds amount, currency, asOf.
  • Data flow (post). App to gateway; gateway conditional-puts the posting row; sync call or queue; worker calls core with business reference; on success writes core reference; on timeout marks UNKNOWN and enquires.

Section 11: failure scenarios

FailureDetectionAutomatic responseImpactManual step
Core slowTimeout at 2 sReturn QUEUED or UNKNOWN; open breaker after 3 failuresPending statusNone
Core downBreaker openReads from replica flagged stale; writes queuedReads work; writes delayedOperations watch queue age
Nightly batch windowCalendar and core statusSwitch to queued mode; holdPostings delayed until window endsNone
Timeout after core received the requestUNKNOWNEnquire by reference before any retryNone if resolvedReconciliation if still unclear
Direct Connect link failsBGP session downTraffic fails over to second connection or VPNPossible latency riseRaise carrier ticket
MQ bridge stallsQueue age alarmAlert, restart consumerReplica staleness growsInvestigate bridge
Poison commandRepeated processing failureMove to DLQ after retriesOne posting heldOperations review (DLQ redrive)
Duplicate commandIdempotency key existsReturn existing resultNoneNone

Sections 12 to 15

  • Scalability. The core is the bottleneck, so scaling means shedding and pacing, not adding instances. Cache or replicate reads, pace the posting worker to the agreed rate, and use backpressure. At 10x growth the plan is more replicas, not more core calls.
  • Cost. Direct Connect port hours and data transfer, Transit Gateway attachment and data processing, Fargate tasks, SQS requests and the replica store. Estimate per attachment-hour and per GB ⚠ VERIFY prices. Hybrid networking is typically the largest fixed item.
  • Implementation. Phase 1 connectivity in test with a core simulator. Phase 2 gateway with read replica. Phase 3 queued postings with pacing. Phase 4 unknown-outcome handling and reconciliation. Phase 5 batch-window and failure game days with the core team.
  • Compliance touchpoints.
AreaWhere it touchesReviewing teamEvidence
Operational resilienceCore outage tolerance, important business servicesOperational resilience leadScenario test results ⚠ VERIFY
Outsourcing and third-party (core vendor)Dependence on vendor interfacesThird-party riskVendor SLA, exit plan
Books and recordsPosting integrity, reconciliationFinance controlReconciliation reports
Data protectionReplica contents and retentionData protection officerData map
Change managementCore change windowsChange advisory boardRelease calendar alignment

Step-by-step implementation

Agree the load ceiling with the core owner

Get a written maximum request rate, allowed hours and a contact for incidents. Everything in the gateway (rate limit, pacing, breaker) derives from that number.

Build connectivity in layers

Start with the VPN to prove routing and DNS, then add Direct Connect. Test failover by shutting down one path in a maintenance window.

Write the gateway interface in domain language

GetBalanceAsync, PostTransferAsync. Never expose core field names or message layouts outside the gateway (anti-corruption layer).

Add timeout, breaker and stale-read fallback

Use the gateway code in this lesson as the starting point; in a service, use Microsoft.Extensions.Http.Resilience or Polly for the same policies.

Make postings idempotent and enquire on unknown

Store the posting before calling the core. On timeout set UNKNOWN, enquire by business reference, then decide.

Replicate reads and label freshness

Use CDC or events to maintain a balance replica. Always return the asOf timestamp so the UI can show it.

Rehearse the batch window and an outage

Run a game day: block the core, confirm reads continue, writes queue, queue age alarms fire, and the drain after recovery is paced.

AWS Console instructions

  • Console → VPC → Site-to-Site VPN connections shows tunnel state for the backup path; Direct Connect → Connections / Virtual interfaces shows port and BGP state.
  • Console → VPC → Transit gateways → Transit gateway route tables → Routes to confirm that on-premises prefixes are propagated to the right attachments.
  • Console → SQS → your FIFO queue → Monitoring to watch Approximate age of oldest message; this is the key health signal for queued postings.
  • Console → Amazon MQ → Brokers (if used) to inspect broker state, then Configuration for the engine version.

AWS CLI

# Check the state of VPN tunnels (read-only).
aws ec2 describe-vpn-connections --profile learn-sandbox --region us-east-1 \
  --query "VpnConnections[].{Id:VpnConnectionId,State:State,Tunnels:VgwTelemetry[].Status}"

# List Direct Connect connections (read-only; empty in a sandbox without one).
aws directconnect describe-connections --profile learn-sandbox --region us-east-1

# Create the FIFO queue for core postings (the dead-letter queue is created the same way).
aws sqs create-queue --queue-name hl-m14-core-postings.fifo \
  --attributes FifoQueue=true,ContentBasedDeduplication=true,MessageRetentionPeriod=345600 \
  --tags Project=cea-lab,Lab=m14-l12,Environment=learn,Owner=learner \
  --profile learn-sandbox --region us-east-1

# Watch how old the oldest queued posting is (seconds).
aws cloudwatch get-metric-statistics --namespace AWS/SQS --metric-name ApproximateAgeOfOldestMessage \
  --dimensions Name=QueueName,Value=hl-m14-core-postings.fifo \
  --start-time 2026-11-18T09:00:00Z --end-time 2026-11-18T10:00:00Z --period 300 --statistics Maximum \
  --profile learn-sandbox --region us-east-1

Direct Connect and VPN resources are design-only here: a Direct Connect port needs a physical provider, and a VPN connection bills hourly ⚠ VERIFY.

Infrastructure as Code

CorePostingQueueStack.cs
using Amazon.CDK;
using Amazon.CDK.AWS.CloudWatch;
using Amazon.CDK.AWS.SQS;
using Constructs;

namespace Harbourline.Architecture.CoreIntegration;

public class CorePostingQueueStack : Stack
{
    public CorePostingQueueStack(Construct scope, string id, IStackProps? props = null) : base(scope, id, props)
    {
        var dlq = new Queue(this, "PostingsDlq", new QueueProps
        {
            QueueName = "hl-m14-core-postings-dlq.fifo",
            Fifo = true,
            Encryption = QueueEncryption.SQS_MANAGED,
            EnforceSSL = true,
            RetentionPeriod = Duration.Days(14),
        });

        var queue = new Queue(this, "Postings", new QueueProps
        {
            QueueName = "hl-m14-core-postings.fifo",
            Fifo = true,
            ContentBasedDeduplication = true,
            Encryption = QueueEncryption.SQS_MANAGED,
            EnforceSSL = true,
            VisibilityTimeout = Duration.Seconds(60),
            RetentionPeriod = Duration.Days(4),
            DeadLetterQueue = new DeadLetterQueue { MaxReceiveCount = 5, Queue = dlq },
        });

        // The key health signal: how long has the oldest queued posting been waiting?
        queue.MetricApproximateAgeOfOldestMessage(new MetricOptions { Period = Duration.Minutes(1) })
            .CreateAlarm(this, "PostingsTooOld", new CreateAlarmOptions
            {
                AlarmDescription = "Core postings are backing up: check core health and breaker state",
                Threshold = 300,
                EvaluationPeriods = 5,
                ComparisonOperator = ComparisonOperator.GREATER_THAN_THRESHOLD,
                TreatMissingData = TreatMissingData.NOT_BREACHING,
            });

        Amazon.CDK.Tags.Of(this).Add("Project", "cea-lab");
        Amazon.CDK.Tags.Of(this).Add("Lab", "m14-l12");
        Amazon.CDK.Tags.Of(this).Add("Environment", "learn");
        Amazon.CDK.Tags.Of(this).Add("Owner", "learner");
    }
}

Complete code

The gateway below demonstrates the three protections that matter most: a per-call timeout, a circuit breaker and a stale read from a cache when the core is unhealthy. A fake core and fake clock make the behaviour reproducible without AWS.

CoreGateway.cs
// Run with: dotnet run CoreGateway.cs
// An anti-corruption gateway in front of a legacy core banking system:
// per-call timeout, a circuit breaker, and stale-but-labelled reads while the core is down.
var clock = new FakeClock(DateTimeOffset.Parse("2026-11-18T10:00:00Z"));
var core = new FakeCore();
var gateway = new CoreGateway(core, () => clock.Now, failureThreshold: 3,
    openFor: TimeSpan.FromSeconds(30), callTimeout: TimeSpan.FromMilliseconds(200));

Console.WriteLine(await gateway.GetBalanceAsync("ACC-0000000001"));   // fresh, fills the cache

core.Down = true;
for (var i = 1; i <= 5; i++)
{
    var view = await gateway.GetBalanceAsync("ACC-0000000001");
    Console.WriteLine($"call {i}: {view}  (core was called {core.Calls} times)");
}

try { await gateway.GetBalanceAsync("ACC-0000000002"); }          // never cached
catch (CoreUnavailableException e) { Console.WriteLine($"no cache -> {e.Message}"); }

core.Down = false;
clock.Now = clock.Now.AddSeconds(31);                              // breaker half-opens
Console.WriteLine(await gateway.GetBalanceAsync("ACC-0000000001"));
return 0;

public record BalanceView(decimal Amount, bool IsStale, DateTimeOffset AsOf);

public sealed class CoreUnavailableException(string message) : Exception(message);

public interface ICoreBanking
{
    Task<decimal> GetBalanceAsync(string accountId, CancellationToken ct);
}

public sealed class FakeClock(DateTimeOffset start) { public DateTimeOffset Now { get; set; } = start; }

public sealed class FakeCore : ICoreBanking
{
    public bool Down { get; set; }
    public int Calls { get; private set; }

    public Task<decimal> GetBalanceAsync(string accountId, CancellationToken ct)
    {
        Calls++;
        if (Down) throw new HttpRequestException("core banking timeout (simulated)");
        return Task.FromResult(1234.56m);
    }
}

public sealed class CoreGateway(ICoreBanking core, Func<DateTimeOffset> now, int failureThreshold,
    TimeSpan openFor, TimeSpan callTimeout)
{
    private readonly Dictionary<string, BalanceView> _cache = [];
    private int _failures;
    private DateTimeOffset? _openUntil;

    public async Task<BalanceView> GetBalanceAsync(string accountId)
    {
        if (_openUntil is { } until && now() < until) return Stale(accountId);   // breaker open: do not call

        try
        {
            using var cts = new CancellationTokenSource(callTimeout);
            var amount = await core.GetBalanceAsync(accountId, cts.Token);
            _failures = 0;
            _openUntil = null;
            return _cache[accountId] = new BalanceView(amount, IsStale: false, now());
        }
        catch (Exception e) when (e is HttpRequestException or OperationCanceledException)
        {
            // After the threshold, a single failed trial call re-opens the breaker straight away.
            if (++_failures >= failureThreshold) _openUntil = now() + openFor;
            return Stale(accountId);
        }
    }

    private BalanceView Stale(string accountId) =>
        _cache.TryGetValue(accountId, out var last)
            ? last with { IsStale = true }
            : throw new CoreUnavailableException($"core unavailable and no cached balance for {accountId}");
}

Expected output (the AsOf text depends on your culture):

BalanceView { Amount = 1234.56, IsStale = False, AsOf = 11/18/2026 10:00:00 +00:00 }
call 1: BalanceView { Amount = 1234.56, IsStale = True, AsOf = 11/18/2026 10:00:00 +00:00 }  (core was called 2 times)
call 2: BalanceView { Amount = 1234.56, IsStale = True, AsOf = 11/18/2026 10:00:00 +00:00 }  (core was called 3 times)
call 3: BalanceView { Amount = 1234.56, IsStale = True, AsOf = 11/18/2026 10:00:00 +00:00 }  (core was called 4 times)
call 4: BalanceView { Amount = 1234.56, IsStale = True, AsOf = 11/18/2026 10:00:00 +00:00 }  (core was called 4 times)
call 5: BalanceView { Amount = 1234.56, IsStale = True, AsOf = 11/18/2026 10:00:00 +00:00 }  (core was called 4 times)
no cache -> core unavailable and no cached balance for ACC-0000000002
BalanceView { Amount = 1234.56, IsStale = False, AsOf = 11/18/2026 10:00:31 +00:00 }

Notice that the core call count stops at 4: after three failures the breaker opens and calls 4 and 5 never reach the core. That is the protection the core owner asked for.

Code explained line by line

  1. BalanceView(decimal Amount, bool IsStale, DateTimeOffset AsOf) is the domain type. The UI sees "as of" and "stale", not core-specific fields.
  2. ICoreBanking is the port to the core. A real adapter implements it over MQ, SOAP or REST; the fake here lets tests control failure.
  3. FakeClock makes time a parameter, so the 30-second breaker window can be advanced instantly in tests.
  4. In GetBalanceAsync, the first line checks the breaker. If it is open and the time has not passed, the gateway returns the cached value without calling the core.
  5. The call uses a CancellationTokenSource(callTimeout), so a slow core is abandoned at 200 ms in the demo (2 s in the design).
  6. catch (...) when (e is HttpRequestException or OperationCanceledException) limits the breaker to transport and timeout failures; bugs such as NullReferenceException are not swallowed.
  7. ++_failures >= failureThreshold opens the breaker. After the open period, the next call is a trial: success resets, failure re-opens immediately because _failures is still at the threshold.
  8. Stale returns the last known value with IsStale = true via a with copy, or throws CoreUnavailableException when there is nothing to show. Never invent a balance.
  9. This class is deliberately not thread-safe, to stay short. In a service use Microsoft.Extensions.Http.Resilience or Polly, or add locking, and keep breaker state per core endpoint.

Security considerations

⚠ Learning shortcut — not for production

The demo gateway caches balances in process memory and has no authentication, no per-account authorisation and no thread safety. In production the replica is an encrypted store with per-customer access checks in the layer above the gateway, breaker state is per instance or shared deliberately, and every call to the core carries a correlation ID for the audit trail. Credentials for the core live in Secrets Manager with rotation.

  • One door. Only the gateway reaches the core network. Enforce with routes, security groups and IAM, then audit.
  • Authorise above the gateway. The core may only know technical users; "customer sees only their own accounts" is enforced by your API layer (account management).
  • Protect the core from abuse. Rate-limit per caller at the API edge and again at the gateway.
  • Stale data is a security property too. Never use a stale balance for an authorisation decision such as approving a debit; use it only for display.
  • Log without leaking. Correlation ID, account reference and outcome, not full message bodies.

Banking use case

At 23:30 each night the core enters its batch window for 50 minutes. Harbourline's app still shows balances, each tagged "as of 23:29", because reads come from the replica. A customer who sends a transfer at 23:45 sees "Processing: we will confirm shortly". The gateway queues the command; the worker drains it at the agreed pace after 00:20. One command times out after the core received it. The worker marks it UNKNOWN, enquires by business reference, finds it posted, records the core reference and notifies the customer. No duplicate, no support call.

Common mistakes

  • Reading through to the core on every screen. It couples your peak load to the core's ceiling.
  • Blind retries on timeout. They create duplicate postings; use idempotent references and enquiry.
  • Treating CDC rows as business events. A table update may not mean "transfer settled".
  • Exposing core data formats to apps. Every consumer then breaks on the next core change.
  • One Direct Connect connection called "resilient". One link is one failure.
  • Using stale data for decisions. Display only; authorise against the core.

Troubleshooting

SymptomLikely causeFix
Calls to the core time out only from AWSRoute or security rule missing on one side, or MTU and fragmentation issuesCheck Transit Gateway routes, firewall rules and path MTU
On-premises hostnames do not resolveNo resolver forwarding ruleAdd a Route 53 Resolver outbound endpoint and rule
FIFO queue throughput is lowOne message group for everythingUse a group ID per account to allow parallelism with per-account ordering
Postings stuck, age alarm firingWorker paused by an open breaker or credential expiryCheck breaker state, secrets and core status
Duplicate postings at the coreRetry without business referenceAdd idempotency key and enquiry-before-retry
Balance shows old values for hoursReplication lag or stalled bridgeAlarm on replica asOf age; restart the bridge

Cost and cleanup

The C# gateway demo is free. The CDK or Terraform stack creates two SQS queues and an alarm: effectively free at lab volumes. Direct Connect, Transit Gateway attachments, Site-to-Site VPN and Amazon MQ are design-only here because they bill hourly ⚠ VERIFY pricing before any proof of concept.

# Tear down what you deployed.
cdk destroy --profile learn-sandbox
terraform destroy

# Or delete the queues directly (substitute the queue URLs).
aws sqs delete-queue --queue-url <postings-queue-url> --profile learn-sandbox --region us-east-1
aws sqs delete-queue --queue-url <dlq-url> --profile learn-sandbox --region us-east-1

# Confirm nothing tagged for the course remains.
aws resourcegroupstaggingapi get-resources --tag-filters Key=Project,Values=cea-lab \
  --profile learn-sandbox --region us-east-1

Exercises

  • 🟢 Guided: run the gateway demo. Change failureThreshold to 2 and predict the new "core was called" counts.
  • 🟡 Challenge: add a PostTransferAsync to the gateway that returns Posted, Queued or Unknown, and write tests for a timeout after the core has accepted the message.
  • 🔴 Live problem: the core owner reports the new channel doubled morning peak load. Customers open the app 6 times each morning. Propose three changes that cut core calls without making balances unacceptably stale, with the as-of rule for each screen.

Assignment

Add architecture/core-integration/ to your portfolio: the 15-section document, a hybrid network diagram with failover paths, a sequence diagram of the unknown-outcome flow, an ADR choosing queued commands over direct calls for non-urgent postings, and the gateway with unit tests.

Solutions

Knowledge check

Interview questions

  • How do you protect a legacy core from a new digital channel? A gateway with rate limits, timeouts, a breaker, read replicas and queued commands, agreed with the core owner.
  • How do you avoid duplicate postings after a timeout? Business reference as idempotency key, store before call, enquire before retry.
  • How do you handle the nightly batch window? Switch to queued mode, serve reads from the replica with as-of times, drain at a paced rate afterwards.
  • What are the options for streaming core changes to AWS? DMS CDC, events from an outbox, or an MQ bridge; choose by how well they map to business events.
  • How do you present mainframe coexistence to a design authority? Core stays the system of record; the gateway isolates change; migration proceeds by capability (strangler pattern), each step with rollback.

Certification practice

Completion checklist

  • I can explain reads from a replica and writes to the core
  • I ran the gateway and saw the breaker stop core calls
  • I can describe the unknown-outcome procedure step by step
  • My design names the load ceiling agreed with the core owner
  • I ran cleanup and confirmed nothing tagged Project=cea-lab remains

Key takeaways

  • The core is the system of record and a fragile dependency: protect it with a gateway, pacing and a breaker.
  • Writes go to the core, reads come from a labelled-stale replica, and stale data never authorises a decision.
  • A timeout means unknown outcome: enquire by business reference before retrying.
  • Hybrid resilience needs two Direct Connect connections plus a backup path.
  • Operational resilience, outsourcing and change-management requirements need specialist review.

Further reading

Independent learning resource — not affiliated with, endorsed or sponsored by Amazon Web Services. AWS and related marks are trademarks of Amazon.com, Inc. or its affiliates. All banking data in examples is fictional. Sample architectures are for learning and are not automatically compliant with GDPR, PCI DSS or any banking regulation.

On this page