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.
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
- What cloud computing really is and IaaS, PaaS and SaaS
- Tools: AWS CLI v2 with the
learn-sandboxprofile; optionally Terraform and the .NET 10 SDK
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
| Reason | What it looks like at Harbourline |
|---|---|
| Legacy core systems | Mainframe or vendor core banking with no supported cloud deployment, or a migration measured in years |
| Scheme and partner connectivity | Payment-scheme gateways, card networks and SWIFT links with certified on-premises equipment |
| Latency to on-premises data | New services must call the core within tight latency budgets |
| Regulatory and contractual constraints | Outsourcing notifications, data-location commitments to customers, vendor licences tied to hardware |
| Sunk investment and refresh cycles | Data-centre contracts and hardware that is only a few years old |
| Skills and operating model | Operations, 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".
| Need | AWS building block | What it is | Sharp edges |
|---|---|---|---|
| Private network link over the internet | AWS Site-to-Site VPN | IPsec tunnels between your on-premises router (customer gateway) and a virtual private gateway or transit gateway in AWS. Each connection has two tunnels for redundancy | Rides on the internet, so latency and throughput vary; standard tunnels top out at about 1.25 Gbps each; billed per connection-hour |
| Dedicated private connection | AWS Direct Connect | A physical Ethernet fibre from your network to an AWS Direct Connect location, with virtual interfaces to your VPCs or to AWS public services | Weeks 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 centre | AWS Outposts (racks and servers) | AWS-owned and AWS-managed hardware installed at your site, managed as an extension of an AWS Region | You 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 city | AWS Local Zones | Extensions of a Region in metropolitan areas for low-latency or local-data needs | Subset of services; opt-in per zone; prices differ from the parent Region |
| One identity plane | IAM Identity Center with an external identity provider (for example Microsoft Entra ID via SAML 2.0 and SCIM), AD Connector or AWS Managed Microsoft AD | Staff sign in once with corporate identities; leavers are removed centrally | Group and attribute mapping needs governance; break-glass access must still work if the IdP is down |
| On-premises workloads calling AWS APIs without stored keys | IAM Roles Anywhere | Exchanges an X.509 certificate from your certificate authority for temporary AWS credentials | Needs a trustworthy PKI and certificate lifecycle |
| Manage servers and containers in both places | AWS Systems Manager (hybrid activations), Amazon ECS Anywhere, Amazon EKS Hybrid Nodes | One control plane for patching, inventory and container scheduling on premises and in AWS | Agents and network paths to AWS required; per-node charges for some features |
| Data residency in a sovereign setting | Choosing 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 stored | The 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 equivalent | What'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 ExpressRoute | AWS Direct Connect | Similar idea; Direct Connect is not encrypted by default โ use MACsec or VPN over it |
| Azure Local (formerly Azure Stack HCI) / Azure Stack Hub | AWS Outposts | Outposts hardware is owned, delivered and maintained by AWS and appears as part of a Region |
| Azure Arc for servers and Kubernetes | Systems Manager hybrid nodes, ECS Anywhere, EKS Hybrid Nodes | AWS 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 AD | Many banks keep Entra ID as the source of truth and federate it to Identity Center (Module 5) |
| Managed identities for on-premises machines via Arc | IAM Roles Anywhere | Certificate-based, issues temporary IAM role credentials |
| Azure sovereign offerings | AWS European Sovereign Cloud; Region selection; Dedicated Local Zones | Check 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:
- 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).
- 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.
- 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-sandboxFind 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):
- 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.
- Direct Connect โ Connections โ empty. Note the Create connection wizard asks for a location and port speed; you will not create one.
- AWS Outposts โ the console shows sites and Outposts you have ordered (none).
- 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.
- IAM Identity Center โ Settings โ Identity source (in the management account, using your
ManagementAdminpermission 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-sandboxWhat to notice:
describe-locationsreturns 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-zonesincludes zones you have not opted in to (OptInStatusofnot-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.
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 hereComplete 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.
<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>// 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 setCode explained line by line
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.[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.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.Enum.Parse<DataClass>(args.FirstOrDefault() ?? ...)โ reads the data class from the command line, defaulting to the most restrictive common case.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.public sealed class ResidencyPolicy(IReadOnlyDictionary<...> allowedRegions)โ a primary constructor (C# 12): the parameter is captured and available to the methods.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.if (!allowedRegions.TryGetValue(...))โ also fail closed for an unknown data class.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/16as 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
| Symptom | Likely cause | Fix |
|---|---|---|
describe-locations fails with an SCP explicit deny | You sent it to a Region the sandbox guardrail blocks | Use --region eu-west-2 or --region us-east-1 |
aws outposts list-sites returns AccessDeniedException | Your 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 missing | aws sso login --profile learn-sandbox |
You accidentally ran terraform apply | Muscle memory | Run terraform destroy immediately; the VPN connection bills per hour and will never connect |
Residency guard prints REFUSED with AWS_REGION is not set | The variable is not set in this PowerShell session | $env:AWS_REGION = "eu-west-2" |
Residency guard throws ArgumentException from Enum.Parse | Typo in the data class argument | Use 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 SilentlyContinueExercises
- ๐ข 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
The plan shows three resources to create: aws_customer_gateway.harbourline_dc1 (your on-premises router as AWS sees it), aws_vpn_gateway.this (the AWS-side endpoint attached to the VPC) and aws_vpn_connection.dc1. Each Site-to-Site VPN connection always has two tunnels terminating on two different AWS endpoints; tunnel details such as outside IP addresses are only known after creation, so the plan shows them as "known after apply". Why: AWS builds redundancy into every VPN connection, but you only benefit if your router configures and uses both tunnels.
public class ResidencyPolicyTests
{
private static readonly ResidencyPolicy Policy = new(new Dictionary<DataClass, string[]>
{
[DataClass.UkCustomerPersonal] = ["eu-west-2"],
[DataClass.PaymentCardData] = [], // approved nowhere until assessed
});
[Fact] public void Approved_region_is_allowed() => Assert.True(Policy.Check(DataClass.UkCustomerPersonal, "eu-west-2").Allowed);
[Fact] public void Other_region_is_refused() => Assert.False(Policy.Check(DataClass.UkCustomerPersonal, "us-east-1").Allowed);
[Fact] public void Missing_region_is_refused() => Assert.False(Policy.Check(DataClass.UkCustomerPersonal, null).Allowed);
[Fact] public void Unknown_class_is_refused() => Assert.False(Policy.Check(DataClass.EuCustomerPersonal, "eu-west-1").Allowed);
[Fact] public void Card_data_is_refused_everywhere() => Assert.False(Policy.Check(DataClass.PaymentCardData, "eu-west-2").Allowed);
}Add PaymentCardData to the DataClass enum. An empty array means "approved nowhere", and the existing Contains check refuses it โ no new code path needed. Move the policy types into a class library so the test project can reference them (or reference the console project directly, which works for a learning exercise). Why: fail-closed defaults make new data classes safe until someone deliberately approves them.
Customer IDs are pseudonymous personal data: they can be linked back to an individual using other data the bank holds, so UK GDPR still applies โ removing names is not anonymisation. Transaction amounts linked to a customer ID describe that person's financial behaviour. The reply should: (1) correct the assumption politely; (2) explain that processing in us-east-1 is an international transfer that needs a lawful transfer mechanism and the data-protection officer's approval, and may conflict with commitments in the bank's privacy notice and outsourcing register; (3) offer alternatives โ process in eu-west-2 (the price difference for analytics is usually small compared with the risk), or genuinely aggregate or anonymise the data before it leaves the approved Region, with the DPO validating the method; (4) ask for a quick data-protection impact screening. Why: engineers are often first to notice a residency problem; your job is to raise it with options, not to make the legal call.
Knowledge check
Answer: Hybrid connects on-premises (or private cloud) infrastructure with a public cloud so they work as one estate. Multi-cloud means using more than one public cloud provider. An organisation can be both.
Answer: Two IPsec tunnels, terminating on different AWS endpoints, so that the connection survives the failure or maintenance of one endpoint โ provided your customer gateway uses both.
Answer: No. Direct Connect is a private connection, not an encrypted one. Use MACsec on supported dedicated connections, an IPsec VPN over Direct Connect, and TLS end to end.
Answer: AWS Outposts (racks or servers). AWS owns, installs and maintains the hardware; you provide space, power, network and physical security, and it is managed as an extension of an AWS Region.
Answer: Retain. It is a valid choice โ for example for a core banking system that cannot yet move โ and it is why hybrid architectures last for years.
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
A bank keeps its core banking platform in its own data centre and runs new digital services on AWS, connected by a private network link. Which deployment model is the bank using?
A. Public cloud B. Private cloud C. Hybrid cloud D. Community cloud
Answer: C. Combining on-premises infrastructure with a public cloud, connected so they work together, is hybrid. A would mean everything runs in the public cloud. B would mean everything runs on dedicated infrastructure. D describes infrastructure shared by a specific community of organisations.
A company needs a dedicated, private network connection from its data centre to AWS with consistent network performance. Which AWS service meets this requirement?
A. AWS Site-to-Site VPN B. AWS Direct Connect C. Amazon CloudFront D. AWS Global Accelerator
Answer: B. Direct Connect provides a dedicated physical connection with more consistent performance than internet-based links. A is private and encrypted but runs over the public internet, so performance varies. C is a content delivery network. D improves internet routing to AWS applications for end users; it is not a private data-centre link.
A bank must run some workloads on premises for latency to a legacy system, but wants to use the same AWS APIs and services as in an AWS Region. Which service should it consider?
A. AWS Outposts B. AWS Snowball Edge C. AWS Storage Gateway D. Amazon WorkSpaces
Answer: A. Outposts brings AWS-managed infrastructure and services into the customer's data centre with the same APIs. B is mainly for data transfer and disconnected edge computing. C connects on-premises storage to AWS storage but is not a general compute platform. D provides virtual desktops.
A bank connects its data centre to a VPC using one AWS Direct Connect connection. The bank needs the hybrid connection to remain available if that connection or its Direct Connect location fails, at the lowest additional cost. What should a solutions architect recommend?
A. Add a second virtual interface on the same Direct Connect connection B. Add an AWS Site-to-Site VPN connection as a backup path, using BGP for failover C. Increase the port speed of the existing connection D. Move the VPC to a different Availability Zone
Answer: B. A VPN over the internet provides an independent backup path at low cost, and BGP fails over automatically. A shares the same physical connection and location, so it does not remove the single point of failure. C adds capacity, not resilience. D is unrelated; VPCs span all AZs in a Region. (For the highest resilience, banks add a second Direct Connect connection at a different location โ more expensive than VPN backup.)
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-labexists 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
- Types of cloud computing (deployment models) โ Overview of Amazon Web Services whitepaper
- AWS hybrid and multicloud solutions
- What is AWS Site-to-Site VPN?
- What is AWS Direct Connect?
- What is AWS Outposts?
- What is AWS Local Zones?
- What is IAM Roles Anywhere?
- Migration strategies (the 7 Rs) โ AWS Prescriptive Guidance
- Opening the AWS European Sovereign Cloud (AWS News Blog)
- PRA SS2/21 โ Outsourcing and third party risk management
- Course pages: Module 2: Networking ยท Module 13: Microsoft-to-AWS migration ยท Glossary
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.
IaaS, PaaS and SaaS
Tell the cloud service models apart, place AWS and Azure services on the spectrum from virtual machines to serverless, and choose a model for a banking workload by what you are willing to operate.
AWS global infrastructure
Explain Regions, Availability Zones, edge locations, Local Zones and partitions, and choose a Region for a banking workload on latency, cost, features and data residency.