Skip to Content
Cloud Engineering Academy
1. Cloud Computing & AWS Fundamentals

Public, private and hybrid cloud

Explain the cloud deployment models, why banks run hybrid for years, and which AWS building blocks connect an on-premises data centre to AWS for networking, identity, compute and data residency.

beginnerโฑ 1 h ๐ŸŸข FreeCLF-C02SAA-C03

Assumes: .NET 10 LTS ยท AWS CLI v2 ยท Terraform AWS provider v6 ยท Regions us-east-1 and eu-west-2. Verified against official sources on 2026-11-17.

Learning objectives

By the end of this lesson you can:

  • Define public, private, hybrid and community cloud, and explain how multi-cloud differs from hybrid.
  • Explain why most banks run a hybrid estate for many years, and which workloads typically stay on premises.
  • Name the AWS building blocks for hybrid networking (Site-to-Site VPN, Direct Connect), compute at your location (Outposts, Local Zones), identity (IAM Identity Center with an external identity provider, AD Connector, IAM Roles Anywhere) and operations (Systems Manager hybrid nodes, ECS Anywhere, EKS Hybrid Nodes).
  • Describe how data residency and outsourcing regulation (PRA SS2/21, FCA cloud guidance, EBA outsourcing guidelines, DORA) shape a bank's cloud design โ€” without claiming that any design is compliant.
  • List the 7 Rs migration strategies at a glance.

Prerequisites

Why this matters in banking

Harbourline Bank's core banking system runs on premises in two data centres in the UK. It holds every account balance and posts every payment. It was installed fifteen years ago, it is heavily customised, it connects to the Faster Payments and Bacs schemes through dedicated links, and the vendor's next major version is three years away. Nobody is going to "lift and shift" it next quarter.

Meanwhile the digital team wants to build a new mobile banking back end on AWS, the data team wants a transaction data lake, and the security team wants one identity system for everything. All three need to talk to the core. So the realistic target for the next five or more years is hybrid: some systems in AWS, some on premises, joined by private networks and a single identity plane.

Getting hybrid wrong is expensive and risky. A single VPN tunnel over the internet becomes the hidden bottleneck for every customer request. Two identity systems drift apart, so a leaver keeps access to AWS for a week. Data meant to stay in the UK is replicated to a US Region by a default setting. And the regulator asks for an exit plan that nobody wrote. This lesson gives you the vocabulary and the building blocks; Modules 2, 5, 13 and 14 go deep.

The idea in plain language

A deployment model describes where the cloud runs and who can use it:

  • Public cloud โ€” the provider owns and runs the data centres, and many customers share the infrastructure, each isolated from the others. AWS, Azure and Google Cloud are public clouds. "Public" describes who can sign up, not who can see your data: your resources are private unless you make them public.
  • Private cloud โ€” cloud-style self-service and automation, but on infrastructure dedicated to one organisation, usually in its own data centre (for example a VMware or OpenStack platform with a self-service portal). AWS's own whitepaper notes that on-premises "private cloud" often keeps much of the cost and capacity profile of traditional IT.
  • Hybrid cloud โ€” a connected combination: some workloads in a public cloud, some on premises, linked by networking, identity and management tooling so they behave like one estate.
  • Community cloud (from the NIST definition) โ€” infrastructure shared by a specific community with common concerns, such as a set of government bodies. You will rarely meet it in practice, but it appears in definitions and exams.

Multi-cloud is a different axis: using more than one public cloud provider. A bank can be hybrid and multi-cloud (on premises plus AWS plus Azure). Multi-cloud is sometimes chosen to reduce concentration risk, but it multiplies skills, tooling and security work; it is a strategic decision, not a default.

Analogy: Harbourline's head office is its own building (on premises). For overflow staff it rents floors in a big serviced office tower that many companies share, each with its own locked floor (public cloud). It joins the two with a private courier route and a single staff badge that works in both buildings (hybrid networking and identity). Some documents, by policy, never leave head office (data that stays on premises).

Why banks stay hybrid for years

ReasonWhat it looks like at Harbourline
Legacy core systemsMainframe or vendor core banking with no supported cloud deployment, or a migration measured in years
Scheme and partner connectivityPayment-scheme gateways, card networks and SWIFT links with certified on-premises equipment
Latency to on-premises dataNew services must call the core within tight latency budgets
Regulatory and contractual constraintsOutsourcing notifications, data-location commitments to customers, vendor licences tied to hardware
Sunk investment and refresh cyclesData-centre contracts and hardware that is only a few years old
Skills and operating modelOperations, security and audit processes take time to adapt

The AWS prescriptive guidance calls keeping an application where it is the Retain strategy โ€” one of the 7 Rs of migration: Retire, Retain, Rehost (lift and shift), Relocate (for example VMware workloads moved as-is), Repurchase (move to SaaS), Replatform (lift, tinker and shift โ€” for example SQL Server to Amazon RDS) and Refactor / re-architect. Module 13 covers them properly; for now, know that "retain" is a legitimate, deliberate choice, which is why hybrid is normal.

What problem the AWS service solves

Hybrid is not one AWS service; it is a family of building blocks. Each solves one part of "make two places behave like one".

NeedAWS building blockWhat it isSharp edges
Private network link over the internetAWS Site-to-Site VPNIPsec tunnels between your on-premises router (customer gateway) and a virtual private gateway or transit gateway in AWS. Each connection has two tunnels for redundancyRides on the internet, so latency and throughput vary; standard tunnels top out at about 1.25 Gbps each; billed per connection-hour
Dedicated private connectionAWS Direct ConnectA physical Ethernet fibre from your network to an AWS Direct Connect location, with virtual interfaces to your VPCs or to AWS public servicesWeeks to provision; traffic is not encrypted by default (use MACsec where supported, or run a VPN over it); you need two connections at two locations for resilience
AWS compute and storage inside your own data centreAWS Outposts (racks and servers)AWS-owned and AWS-managed hardware installed at your site, managed as an extension of an AWS RegionYou provide space, power, network and physical security; it needs its link back to the Region; capacity is what you ordered
AWS infrastructure closer to a cityAWS Local ZonesExtensions of a Region in metropolitan areas for low-latency or local-data needsSubset of services; opt-in per zone; prices differ from the parent Region
One identity planeIAM Identity Center with an external identity provider (for example Microsoft Entra ID via SAML 2.0 and SCIM), AD Connector or AWS Managed Microsoft ADStaff sign in once with corporate identities; leavers are removed centrallyGroup and attribute mapping needs governance; break-glass access must still work if the IdP is down
On-premises workloads calling AWS APIs without stored keysIAM Roles AnywhereExchanges an X.509 certificate from your certificate authority for temporary AWS credentialsNeeds a trustworthy PKI and certificate lifecycle
Manage servers and containers in both placesAWS Systems Manager (hybrid activations), Amazon ECS Anywhere, Amazon EKS Hybrid NodesOne control plane for patching, inventory and container scheduling on premises and in AWSAgents and network paths to AWS required; per-node charges for some features
Data residency in a sovereign settingChoosing Regions; for EU sovereignty requirements, the AWS European Sovereign Cloud (first Region eusc-de-east-1 in Brandenburg, Germany, generally available since January 2026)Region choice determines where your content is storedThe European Sovereign Cloud is a separate partition with its own accounts and a different service list โš  VERIFY service availability before designing for it

A word on data residency. AWS states that it does not move customer content out of the Region you choose without your instruction, but your configuration can: cross-Region replication, global tables, backups copied to another Region, logs shipped to a central account in another Region, or a CDN caching responses worldwide. Residency is something you design and evidence, not a checkbox.

Microsoft / Azure comparison

You know (Microsoft/Azure)AWS equivalentWhat's different
Azure VPN Gateway (site-to-site)AWS Site-to-Site VPN (virtual private gateway or transit gateway)Each AWS VPN connection always provides two tunnels; you configure both on your device
Azure ExpressRouteAWS Direct ConnectSimilar idea; Direct Connect is not encrypted by default โ€” use MACsec or VPN over it
Azure Local (formerly Azure Stack HCI) / Azure Stack HubAWS OutpostsOutposts hardware is owned, delivered and maintained by AWS and appears as part of a Region
Azure Arc for servers and KubernetesSystems Manager hybrid nodes, ECS Anywhere, EKS Hybrid NodesAWS splits this across several services
Entra ID with Entra Connect (hybrid identity)IAM Identity Center federated to Entra ID or AD; AD Connector; AWS Managed Microsoft ADMany banks keep Entra ID as the source of truth and federate it to Identity Center (Module 5)
Managed identities for on-premises machines via ArcIAM Roles AnywhereCertificate-based, issues temporary IAM role credentials
Azure sovereign offeringsAWS European Sovereign Cloud; Region selection; Dedicated Local ZonesCheck each offering's service list and contractual terms with your legal team

Architecture

Harbourline's target hybrid architecture for the next few years:

Security-boundary view. Three trust boundaries cross the hybrid link:

  1. Network โ€” only specific CIDR ranges are routed between the data centres and AWS; security groups and on-premises firewalls allow only the ports each flow needs. The link is private, but traffic inside it is still encrypted (TLS end to end, plus MACsec or IPsec on the link).
  2. Identity โ€” staff authenticate once against corporate identity and receive short-lived AWS sessions; on-premises services that call AWS use IAM Roles Anywhere certificates, not access keys.
  3. Data โ€” the nightly export carries customer data across the boundary, so it is encrypted, logged and limited to the fields the data lake needs (data minimisation is a GDPR principle, not just good engineering).

Step-by-step implementation

You will not build a hybrid connection in this lesson โ€” a real one needs on-premises equipment and a VPN connection bills by the hour. Instead you explore the building blocks read-only, plan (but do not apply) a VPN in Terraform, and write a small residency guard in C#.

Refresh your session

aws sso login --profile learn-sandbox

Find the Direct Connect locations for London

Run the directconnect describe-locations command in the AWS CLI section against eu-west-2. These are the colocation facilities where a bank would order its dedicated connections โ€” typically two different facilities for resilience.

Discover Local Zones and confirm you have no hybrid resources

Run the Local Zone and "list" commands. In a fresh sandbox every list is empty. That is the point: hybrid components are deliberate, billable resources.

Plan a Site-to-Site VPN without creating it

Run terraform plan on the Infrastructure as Code example. Read the plan: a customer gateway, a virtual private gateway and a VPN connection with two tunnels. Do not run terraform apply.

Encode a residency rule in code

Run the Complete code residency guard with different AWS_REGION values. It refuses to start when the Region is not approved for the data classification โ€” a small, testable "defence in depth" next to the SCP you built in Module 0.

AWS Console instructions

Read-only tour (Region selector set to Europe (London) eu-west-2, which the sandbox guardrail allows):

  1. VPC โ†’ Virtual private network (VPN) โ†’ Site-to-Site VPN connections โ€” empty. Open Create VPN connection to see the choices (target gateway type, customer gateway, routing static or dynamic BGP, tunnel options), then Cancel.
  2. Direct Connect โ†’ Connections โ€” empty. Note the Create connection wizard asks for a location and port speed; you will not create one.
  3. AWS Outposts โ€” the console shows sites and Outposts you have ordered (none).
  4. EC2 โ†’ Dashboard โ†’ Account attributes โ†’ Settings โ†’ Zones โš  VERIFY (exact menu path) โ€” lists Availability Zones and any Local Zones for the Region with their opt-in status. Do not opt in. The CLI command below shows the same information.
  5. IAM Identity Center โ†’ Settings โ†’ Identity source (in the management account, using your ManagementAdmin permission set) โ€” shows "Identity Center directory" today. Changing it to an external IdP is a Module 5 exercise; do not change it now.

AWS CLI

Read-only and free. PowerShell quoting.

# Direct Connect locations associated with the London Region (colocation facilities you could connect at).
aws directconnect describe-locations --region eu-west-2 --query "locations[].[locationCode,locationName]" --output table --profile learn-sandbox

# Site-to-Site VPN connections and customer gateways in this Region (expect empty lists).
aws ec2 describe-vpn-connections --region eu-west-2 --query "VpnConnections[].VpnConnectionId" --profile learn-sandbox
aws ec2 describe-customer-gateways --region eu-west-2 --query "CustomerGateways[].CustomerGatewayId" --profile learn-sandbox

# Outposts sites in this account (expect empty).
aws outposts list-sites --region eu-west-2 --profile learn-sandbox

# Local Zones that belong to us-east-1, with opt-in status.
aws ec2 describe-availability-zones --all-availability-zones --filters Name=zone-type,Values=local-zone --query "AvailabilityZones[].[ZoneName,GroupName,OptInStatus]" --output table --region us-east-1 --profile learn-sandbox

# The parent Region and city of one Local Zone, from AWS public parameters.
aws ssm get-parameters-by-path --path /aws/service/global-infrastructure/local-zones/use1-bos1-az1 --query "Parameters[].[Name,Value]" --output table --region us-east-1 --profile learn-sandbox

What to notice:

  • describe-locations returns codes and facility names โ€” physical buildings. Direct Connect is about cables and cross-connects, which is why it takes weeks.
  • The empty lists prove you have created nothing that bills.
  • describe-availability-zones --all-availability-zones includes zones you have not opted in to (OptInStatus of not-opted-in). Opting in is an account-level decision.

Infrastructure as Code

Plan only โ€” do not apply. A Site-to-Site VPN connection is billed for every hour it exists, even with no traffic, and the customer gateway address below is a documentation-only IP (203.0.113.0/24), so the tunnels would never come up.

vpn-plan.tf
terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 6.0"
    }
  }
}

provider "aws" {
  region  = "eu-west-2"
  profile = "learn-sandbox"

  default_tags {
    tags = {
      Project     = "cea-lab"
      Lab         = "m01-hybrid-plan"
      Environment = "learn"
      Owner       = "your-name"
    }
  }
}

variable "vpc_id" {
  description = "Any VPC ID. Planning does not check that it exists."
  type        = string
  default     = "vpc-0123456789abcdef0"
}

# Represents the on-premises router. 203.0.113.10 is a reserved documentation address.
resource "aws_customer_gateway" "harbourline_dc1" {
  bgp_asn    = 65010
  ip_address = "203.0.113.10"
  type       = "ipsec.1"
  tags       = { Name = "hl-m01-dc1-router" }
}

# The AWS side of the VPN, attached to one VPC. Larger estates use a transit gateway instead.
resource "aws_vpn_gateway" "this" {
  vpc_id = var.vpc_id
  tags   = { Name = "hl-m01-vgw" }
}

# One VPN connection = two IPsec tunnels to two AWS endpoints.
resource "aws_vpn_connection" "dc1" {
  customer_gateway_id = aws_customer_gateway.harbourline_dc1.id
  vpn_gateway_id      = aws_vpn_gateway.this.id
  type                = "ipsec.1"
  static_routes_only  = false # use BGP so routes fail over between tunnels automatically
  tags                = { Name = "hl-m01-dc1-vpn" }
}
terraform init
terraform plan   # read the three "will be created" blocks, then stop here

Complete code

A small residency guard. The bank's data-classification policy says which Regions each class of data may be processed in. The application checks its own Region at start-up and refuses to run if it is not approved. This complements, not replaces, organisation-level controls such as the Region SCP from Module 0: the SCP stops resources being created elsewhere, and the guard stops an application configured for the wrong Region from processing data.

ResidencyGuard.csproj
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net10.0</TargetFramework>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
    <RootNamespace>Harbourline.Learning.ResidencyGuard</RootNamespace>
  </PropertyGroup>
</Project>
Program.cs
// Refuses to start when the configured AWS Region is not approved for the data being processed.
// Fictional policy for Harbourline Bank - your bank's real policy comes from its data-protection and risk teams.

var policy = new ResidencyPolicy(new Dictionary<DataClass, string[]>
{
    [DataClass.UkCustomerPersonal] = ["eu-west-2"],                  // London only
    [DataClass.EuCustomerPersonal] = ["eu-central-1", "eu-west-1"],  // Frankfurt or Ireland
    [DataClass.PublicReference]    = ["eu-west-2", "us-east-1"],     // e.g. published exchange rates
});

string? region = Environment.GetEnvironmentVariable("AWS_REGION");
var dataClass = Enum.Parse<DataClass>(args.FirstOrDefault() ?? nameof(DataClass.UkCustomerPersonal));

var decision = policy.Check(dataClass, region);
Console.WriteLine(decision.Message);
return decision.Allowed ? 0 : 1;

public enum DataClass
{
    UkCustomerPersonal,
    EuCustomerPersonal,
    PublicReference,
}

public sealed record ResidencyDecision(bool Allowed, string Message);

public sealed class ResidencyPolicy(IReadOnlyDictionary<DataClass, string[]> allowedRegions)
{
    public ResidencyDecision Check(DataClass dataClass, string? region)
    {
        if (string.IsNullOrWhiteSpace(region))
        {
            return new(false, "REFUSED: AWS_REGION is not set. Set it explicitly; never rely on a default Region for regulated data.");
        }

        if (!allowedRegions.TryGetValue(dataClass, out var approved))
        {
            return new(false, $"REFUSED: no residency rule exists for {dataClass}. Ask the data-protection team before processing it.");
        }

        return approved.Contains(region.Trim(), StringComparer.Ordinal)
            ? new(true, $"OK: {dataClass} may be processed in {region}.")
            : new(false, $"REFUSED: {dataClass} may only be processed in {string.Join(", ", approved)}, not {region}.");
    }
}

Try it in PowerShell:

$env:AWS_REGION = "eu-west-2"; dotnet run -- UkCustomerPersonal   # OK
$env:AWS_REGION = "us-east-1"; dotnet run -- UkCustomerPersonal   # REFUSED, exit code 1
$env:AWS_REGION = "us-east-1"; dotnet run -- PublicReference      # OK
Remove-Item Env:AWS_REGION; dotnet run                            # REFUSED: AWS_REGION is not set

Code explained line by line

  1. new ResidencyPolicy(new Dictionary<DataClass, string[]> { ... }) โ€” the policy is data: each data class maps to its approved Region codes. In a real system it would be loaded from a reviewed, version-controlled configuration source, not hard-coded.
  2. [DataClass.UkCustomerPersonal] = ["eu-west-2"] โ€” a C# collection expression creating a one-element array. The rule is fictional; real rules come from the bank's legal and data-protection teams.
  3. Environment.GetEnvironmentVariable("AWS_REGION") โ€” the same variable the AWS SDK for .NET reads to pick a Region, so the guard checks what the SDK will actually use.
  4. Enum.Parse<DataClass>(args.FirstOrDefault() ?? ...) โ€” reads the data class from the command line, defaulting to the most restrictive common case.
  5. return decision.Allowed ? 0 : 1; โ€” a non-zero exit code lets a container orchestrator or CI pipeline treat a residency violation as a failed start.
  6. public sealed class ResidencyPolicy(IReadOnlyDictionary<...> allowedRegions) โ€” a primary constructor (C# 12): the parameter is captured and available to the methods.
  7. if (string.IsNullOrWhiteSpace(region)) โ€” fail closed: no Region configured means refuse, rather than letting the SDK fall back to a default that might be in another country.
  8. if (!allowedRegions.TryGetValue(...)) โ€” also fail closed for an unknown data class.
  9. approved.Contains(region.Trim(), StringComparer.Ordinal) โ€” exact, case-sensitive match; Region codes are lower-case identifiers and "close enough" is not acceptable for residency.

Security considerations

  • Private does not mean encrypted. Direct Connect is a private link but not encrypted by default; encrypt in transit with TLS end to end, and on the link with MACsec (on supported dedicated connections) or an IPsec VPN over Direct Connect.
  • Resilience is part of security. A single VPN or single Direct Connect connection is a single point of failure for every hybrid flow. Banks use two Direct Connect connections at two locations, with VPN as a further backup, and test failover.
  • One identity plane, with a break-glass path. Federating Identity Center to the corporate IdP removes duplicate accounts, but you still need emergency access that works if the IdP or the network link is down (Module 5).
  • No static keys on premises. On-premises applications calling AWS should use IAM Roles Anywhere or an equivalent temporary-credential mechanism; access keys in config files on a data-centre server are a classic leak.
  • Residency is designed, not assumed. Review every feature that copies data (replication, backups, logging, analytics, CDNs) against the residency policy.

โš  Learning shortcut โ€” not for production

The Terraform example plans a single VPN connection with one customer gateway and a virtual private gateway on one VPC, using a documentation IP address. A bank's hybrid network uses redundant Direct Connect connections at separate locations, VPN as backup, a transit gateway shared to many accounts through AWS RAM, BGP route filtering, and change control on every route. Module 2 and Module 14 design that version.

โš  Learning shortcut โ€” not for production

The residency guard hard-codes a fictional policy. In production the policy is owned by data protection and risk, stored in reviewed configuration, enforced at several layers (SCPs, IaC policy checks, application guards, monitoring) and evidenced to auditors. A code check alone is not a residency control.

Banking use case

Regulation shapes the hybrid design. In the UK, the Prudential Regulation Authority's supervisory statement SS2/21 "Outsourcing and third party risk management" (effective 31 March 2022) expects banks to understand and document the shared responsibility split with a cloud provider, assess business continuity for material cloud arrangements, and have tested exit plans โ€” including "stressed" exits. The FCA's guidance for firms outsourcing to the cloud (FG16/5) covers similar ground for FCA-regulated firms. For Harbourline's EU subsidiary, the EBA Guidelines on outsourcing arrangements (EBA/GL/2019/02) and the EU Digital Operational Resilience Act (DORA, Regulation (EU) 2022/2554), which has applied since 17 January 2025, add requirements on ICT third-party risk, contracts and a register of information about ICT providers.

How Harbourline responds in its architecture, with each item reviewed by risk, compliance and legal rather than assumed:

  • Retain the core, connect it privately. Core banking stays on premises (Retain); new services reach it over redundant Direct Connect with VPN backup.
  • Choose Regions per data class. UK customer personal data is processed in eu-west-2; the EU subsidiary uses an EU Region. Analytics on anonymised or aggregated data may use other Regions only with explicit approval.
  • Plan the exit from day one. Data in open formats (Parquet, CSV), infrastructure in code, and a documented, tested plan to move a critical service back on premises or to another provider. This is also why the course prefers portable designs where the cost is reasonable.
  • Keep identity central. Corporate identity remains the source of truth, federated to IAM Identity Center, so joiners, movers and leavers are handled once.
  • Record the arrangement. The third-party risk team registers the AWS arrangement, assesses materiality per service, and tracks AWS's audit reports (via AWS Artifact) as part of its oversight.

None of this makes Harbourline "compliant". It gives the bank's risk and compliance functions the evidence they need to make that judgement.

Common mistakes

  • Thinking "public cloud" means "public data" โ†’ the word suggests openness โ†’ your resources are private by default; exposure comes from your configuration. Keep S3 Block Public Access on.
  • A single VPN tunnel as the production link โ†’ it works in the proof of concept โ†’ internet variability and a single point of failure. Use both tunnels with BGP, and Direct Connect for production traffic.
  • Assuming Direct Connect is encrypted โ†’ "private line" sounds secure โ†’ it is not encrypted by default. Add MACsec or IPsec, and TLS end to end.
  • Overlapping IP ranges โ†’ AWS VPCs created with the same 10.0.0.0/16 as the data centre โ†’ routing becomes impossible. Plan CIDR ranges with the network team before the first VPC (Module 2).
  • Two identity systems โ†’ IAM users created "temporarily" for on-premises scripts โ†’ leavers keep access, keys leak. Federate humans; use IAM Roles Anywhere for machines.
  • Treating hybrid as a temporary phase without a plan โ†’ "we'll migrate the core next year" โ†’ hybrid lasts for years; design it as a first-class, resilient, monitored architecture.
  • Saying a design is compliant โ†’ the bank's regulators and its own risk function decide that; engineers provide controls and evidence.

Troubleshooting

SymptomLikely causeFix
describe-locations fails with an SCP explicit denyYou sent it to a Region the sandbox guardrail blocksUse --region eu-west-2 or --region us-east-1
aws outposts list-sites returns AccessDeniedExceptionYour role lacks outposts:ListSites (included in AdministratorAccess)Check the permission set; this command is optional
terraform plan errors with "No valid credential sources found"SSO session expired or profile missingaws sso login --profile learn-sandbox
You accidentally ran terraform applyMuscle memoryRun terraform destroy immediately; the VPN connection bills per hour and will never connect
Residency guard prints REFUSED with AWS_REGION is not setThe variable is not set in this PowerShell session$env:AWS_REGION = "eu-west-2"
Residency guard throws ArgumentException from Enum.ParseTypo in the data class argumentUse one of UkCustomerPersonal, EuCustomerPersonal, PublicReference

Cost and cleanup

Cost: $0 if you follow the lesson: describe/list calls are free, terraform plan creates nothing, and the C# code runs locally.

If you ran terraform apply by mistake, a Site-to-Site VPN connection is billed per connection-hour (on the order of a few US cents per hour in most Regions โš  VERIFY on the Site-to-Site VPN pricing page). Destroy it at once:

terraform destroy   # in the folder with vpn-plan.tf; confirm with "yes"

# Confirm nothing tagged for the course remains in either allowed Region.
aws resourcegroupstaggingapi get-resources --tag-filters Key=Project,Values=cea-lab --query "ResourceTagMappingList[].ResourceARN" --region eu-west-2 --profile learn-sandbox
aws resourcegroupstaggingapi get-resources --tag-filters Key=Project,Values=cea-lab --query "ResourceTagMappingList[].ResourceARN" --region us-east-1 --profile learn-sandbox

# Remove local Terraform working files.
Remove-Item -Recurse -Force .terraform, .terraform.lock.hcl, terraform.tfstate* -ErrorAction SilentlyContinue

Exercises

  • ๐ŸŸข Guided: Run all the CLI commands, then terraform plan. Write down how many tunnels the planned VPN connection has and which resource represents your on-premises router.
  • ๐ŸŸก Challenge: Extend the residency guard with a unit-test project (xUnit v3) covering: approved Region, unapproved Region, missing Region, and an unknown data class. Then add a fourth data class, PaymentCardData, that is approved nowhere until the PCI DSS assessor signs off, and prove it is refused.
  • ๐Ÿ”ด Live problem: A product manager writes: "We want the new savings app's analytics to use the cheapest Region, which is us-east-1. The data is only transaction amounts and customer IDs, no names, so GDPR doesn't apply, right?" Draft your reply.

Assignment

Draw Harbourline's hybrid architecture (Mermaid is fine) for your learning-journal repository as docs/m01-hybrid.md. Include: two network paths with their purpose, the identity flow, where UK and EU customer data is processed, and a five-line "exit plan" section. Add the residency guard and its tests.

Solutions

Knowledge check

Interview questions

  • "Why do banks run hybrid rather than moving everything to the cloud?" โ€” Core systems, scheme connectivity and vendor constraints mean some workloads cannot move quickly; regulation requires careful outsourcing management and exit plans; and there are sunk costs and skills to manage. So banks run a deliberate hybrid estate with private connectivity, central identity and per-data-class Region rules.
  • "Direct Connect or VPN?" โ€” Direct Connect for production: predictable bandwidth and latency over a dedicated link, deployed in pairs at separate locations, with encryption added. Site-to-Site VPN for quick starts, backup paths and smaller sites. Many banks use both: Direct Connect as primary, VPN as backup.
  • "How do on-premises applications authenticate to AWS without access keys?" โ€” IAM Roles Anywhere: they present an X.509 certificate from a CA registered as a trust anchor and receive temporary credentials for an IAM role. Humans federate through IAM Identity Center from the corporate IdP.
  • "How would you approach data residency for a UK bank on AWS?" โ€” Classify data, map classes to approved Regions with data protection and legal, enforce with SCPs and IaC policy, configure services so nothing replicates out of Region without approval (backups, logs, replication, CDNs), and monitor and evidence it continuously.

Certification practice

Completion checklist

  • I can define public, private, hybrid and community cloud, and explain multi-cloud
  • I can name the AWS building blocks for hybrid networking, compute, identity and operations
  • I ran the read-only CLI commands and terraform plan (not apply) for the VPN
  • I ran the residency guard with approved and unapproved Regions
  • I confirmed nothing tagged Project=cea-lab exists in us-east-1 or eu-west-2

Key takeaways

  • Public, private and hybrid describe where cloud runs and who shares it; "public" never means your data is public.
  • Banks run hybrid for years because of core systems, scheme links, regulation and refresh cycles โ€” design hybrid as a first-class architecture.
  • Site-to-Site VPN (two tunnels, over the internet) and Direct Connect (dedicated, not encrypted by default) are the network building blocks; Outposts and Local Zones bring AWS closer; Identity Center federation and IAM Roles Anywhere unify identity.
  • Data residency is designed and evidenced across every feature that copies data; Region choice is only the start.
  • UK and EU outsourcing rules (PRA SS2/21, FCA cloud guidance, EBA guidelines, DORA) expect documented responsibilities and tested exit plans; engineers supply controls and evidence, not compliance verdicts.

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