The Shared Responsibility Model
Draw the line between what AWS secures and what Harbourline Bank still owns, for EC2, RDS, Fargate, Lambda and S3, and collect evidence for your side of the line.
Assumes: .NET 10 LTS · AWS SDK for .NET v4 (AWSSDK.S3 4.1.1) · AWS CLI v2 · Region us-east-1. Verified against official sources on 2026-11-17.
Learning objectives
By the end of this lesson you can:
- Explain the difference between security of the cloud (AWS's job) and security in the cloud (your job) in two sentences.
- Show how the line moves between Amazon EC2, Amazon RDS, AWS Fargate, AWS Lambda and Amazon S3, and say who patches what.
- Classify a control as inherited, shared or customer-specific.
- List what a bank still owns after moving to AWS: data, identity, keys, logging, incident response, third-party risk management and regulatory accountability.
- Download AWS's own audit reports from AWS Artifact and produce evidence for your side of the line with the CLI and C#.
Prerequisites
- IAM fundamentals and AWS CLI v2 with SSO profiles
- Secure your AWS account (sandbox account and
learn-sandboxprofile) - Optional: a bucket from the module exercise to inspect. Any bucket you own works.
- Tools: AWS CLI v2, .NET 10 SDK
Why this matters in banking
Picture a Monday-morning call. A fictional fintech partner of Harbourline Bank has exposed 40,000 statement PDFs from an S3 bucket. The partner's first message says "but S3 is secure, AWS is certified". Both statements are true and irrelevant. AWS kept its data centres, disks and S3 service secure. The partner switched off Block Public Access and wrote a bucket policy with "Principal": "*". That configuration sits entirely on the customer's side of the line.
Regulators see it the same way. Under UK GDPR the bank is the controller of its customers' personal data; AWS is a processor. Under the PRA's outsourcing rules and the EU's Digital Operational Resilience Act (DORA), the bank stays accountable for the service even when a cloud provider runs part of it. "Our provider is certified" is never an answer to an auditor. You need to know exactly which controls you inherit, which you share, and which are yours alone, and you need evidence for each.
The idea in plain language
AWS runs the building, the power, the network cables, the servers, the hypervisor and the software behind each managed service. That is security of the cloud. Everything you put into AWS and every setting you choose is security in the cloud: your data, who can access it, how it is encrypted, how your network is opened, what code you run and how you watch it.
The line is not fixed. It moves depending on how much of the stack the service manages for you:
- With EC2 (a virtual machine) you get a bare server. You patch the operating system, harden it, install the runtime, configure the firewall (security groups) and back it up.
- With Lambda (functions as a service) AWS patches the operating system and the managed .NET runtime. You own your code, its dependencies, its IAM role and its configuration.
- With S3 (object storage) there is no server to see at all. You still own the data, the bucket policy, Block Public Access, encryption choices and access logging.
Analogy: Renting a safe-deposit box. The bank (AWS) builds the vault, guards the door, runs the CCTV and checks ID at the entrance. You (the customer) decide what goes in the box, who gets a copy of your key, and whether you leave the box open on the counter. If you hand your key to a stranger, the vault's guards did nothing wrong.
A second analogy fits the moving line: renting a home. An unfurnished flat (EC2) means you fit the locks on the internal doors and maintain the boiler. A serviced apartment (Lambda) means the landlord maintains the building and appliances, but you still decide who gets a key and what you leave lying around.
What problem the Shared Responsibility Model solves
The model is not a service; it is a contract of expectations. It solves three problems:
- Clarity. It tells engineers and auditors which controls they must design, operate and evidence themselves.
- Inheritance. It lets you reuse AWS's independently audited controls (for example physical security) instead of re-auditing data centres you cannot visit.
- Scale. Because AWS handles the undifferentiated lower layers, your team can spend its effort on the layers that are specific to your bank.
AWS groups controls into three types (checked against the official Shared Responsibility Model page on 2026-11-17):
| Control type | Who | Examples AWS gives | Harbourline example |
|---|---|---|---|
| Inherited | AWS fully | Physical and environmental controls | Data-centre access logs, fire suppression, hardware disposal |
| Shared | Both, each in its own layer | Patch management, configuration management, awareness and training | AWS patches the Lambda runtime; Harbourline patches the NuGet packages inside the function |
| Customer-specific | Customer only | Service and communications protection or zone security | Routing card-processing traffic only through private subnets and VPC endpoints |
Limitations and sharp edges:
- The model is a principle, not a per-service checklist. Each service's "Security" chapter in the AWS documentation spells out the details. Read it before you approve a new service.
- "AWS manages it" does not mean "AWS configures it the way your bank needs". RDS patches the database engine, but you choose whether automatic minor version upgrades are on and when the maintenance window runs.
- Compliance reports describe AWS's controls. They do not cover your configuration, your code or your people.
Microsoft / Azure comparison
| You know (Microsoft/Azure) | AWS equivalent | What's different |
|---|---|---|
| Azure shared responsibility (IaaS/PaaS/SaaS columns) | AWS Shared Responsibility Model | Same idea. AWS describes it per service rather than in one grid, and uses inherited/shared/customer-specific control types |
| Azure VM: you patch the guest OS | EC2: you patch the guest OS (AWS Systems Manager Patch Manager can automate it) | Identical split |
| Azure App Service / Functions: Microsoft patches the platform | Lambda / Fargate: AWS patches the host and, for Lambda managed runtimes, the runtime | Container images on Fargate are still yours to patch |
| Azure SQL Database | Amazon RDS / Aurora | You still own users, network exposure, encryption choice, backup retention and the maintenance window |
| Service Trust Portal (SOC, ISO reports) | AWS Artifact | Free, in the console and through the aws artifact CLI |
| Microsoft Products and Services Data Protection Addendum | AWS Customer Agreement + AWS GDPR Data Processing Addendum (part of the AWS Service Terms) | Legal and procurement review it, not engineers |
| Azure Key Vault Managed HSM / customer-managed keys | AWS KMS customer managed keys, CloudHSM-backed custom key stores, external key stores | More options for "who physically holds the key" |
Architecture
The diagram shows where the line sits for five services. Everything above the dashed line in each column is Harbourline's job.
Where the line sits, service by service
| Task | EC2 | RDS | Fargate (ECS) | Lambda (managed .NET runtime) | S3 |
|---|---|---|---|---|---|
| Physical security, hardware, hypervisor | AWS | AWS | AWS | AWS | AWS |
| Host / guest OS patching | You | AWS | AWS (host) | AWS | AWS |
| Runtime or engine patching | You (.NET, IIS, SQL Server you install) | AWS applies; you choose window and upgrade policy | You (base image and .NET inside the container) | AWS (managed runtime); you for container-image functions | Not applicable |
| Application code and libraries | You | You (schema, stored procedures, users) | You | You | You (object content) |
| Network exposure | You: security groups, NACLs, public IPs | You: subnet group, security group, public accessibility flag | You: subnets, security groups | You: VPC attachment, function URL auth, resource policy | You: Block Public Access, bucket policy, VPC endpoint policy |
| Encryption at rest | You enable EBS encryption and pick the key | You enable it at creation (cannot be switched on later in place) | You for attached volumes and secrets | AWS encrypts environment variables by default; you may pick a customer managed key | On by default (SSE-S3) for new objects since 2023; you choose SSE-KMS if you need key control |
| IAM permissions | You (instance profile) | You (IAM auth, DB users) | You (task role, execution role) | You (execution role) | You (IAM and bucket policies) |
| Backups | You (snapshots, AWS Backup) | Shared: AWS takes automated backups; you set retention and test restores | You (data lives elsewhere) | You (code in Git, data elsewhere) | You: versioning, replication, Object Lock |
| Logging | You enable and retain | You enable log exports | You configure log driver | You set log retention | You enable server access logs or CloudTrail data events |
Notice the bottom half of the table. No matter how managed the service is, IAM, network exposure, encryption choices, logging and data stay with you. That is the part a bank can never outsource.
Step-by-step implementation
You cannot "turn on" a responsibility model, but you can make your side of it visible. The steps below build a one-page responsibility record for one workload: the statement bucket from the module exercise.
Describe the workload in one sentence
"Harbourline statement store: an S3 bucket in the sandbox account in us-east-1 holding fictional monthly PDF statements, read by a .NET console app through an IAM Identity Center role."
List the components and their service model
S3 bucket (abstracted service), IAM Identity Center permission set (identity), the .NET app on your laptop (your code), the learn-sandbox SSO profile (your credential path).
For each layer, write who owns it
Use the table above. For S3, AWS owns storage hardware, durability and the service software. Harbourline owns: Block Public Access, object ownership, default encryption choice, TLS-only bucket policy, IAM permissions, tags, logging and lifecycle.
Collect evidence for your side
Run the CLI commands below, or the C# checker in the Complete code section, and save the output with the date. Evidence that is not dated and stored is not evidence.
Collect evidence for AWS's side
Download the current SOC 2 Type II report from AWS Artifact (steps below). File it next to your own evidence. Note its period end date: auditors care about coverage gaps.
Record the gaps
Anything nobody owns is a finding. Typical first-time gaps: no one owns log retention, no one tests restores, nobody reviews IAM access quarterly.
AWS Console instructions
Get AWS's audit reports (AWS Artifact):
- Sign in through the access portal to the sandbox account with
SandboxAdmin. - Console → search "Artifact" → AWS Artifact → Reports.
- Search for
SOC 2. Select the report and choose Download report. You must accept the terms (confidentiality conditions) before downloading. Read them: AWS reports are usually confidential and may only be shared under the conditions stated. - Repeat for
PCI DSS Attestation of ComplianceandISO/IEC 27001if you want to see what they look like.
Check your side on a bucket:
- Console → S3 → Buckets → select your bucket → Permissions.
- Block public access (bucket settings): all four settings should show On.
- Object Ownership: should show Bucket owner enforced (ACLs disabled).
- Bucket policy: look for a statement that denies requests where
aws:SecureTransportis false. - Properties → Default encryption: shows SSE-S3 or SSE-KMS.
Check what AWS says it covers: the AWS Services in Scope by Compliance Program page lists which services each programme (SOC, PCI, ISO and others) covers. If a service is not in scope for PCI DSS, it should not touch cardholder data at Harbourline.
AWS CLI
# 1. Encryption at rest on a bucket (your choice, AWS runs the service).
aws s3api get-bucket-encryption --bucket hl-m01-statements-111122223333-a1b2c3 --profile learn-sandbox
# 2. Block Public Access settings on the bucket (all four should be true).
aws s3api get-public-access-block --bucket hl-m01-statements-111122223333-a1b2c3 --profile learn-sandbox
# 3. Account-level Block Public Access (a safety net for every bucket in the account).
aws s3control get-public-access-block --account-id 111122223333 --profile learn-sandbox
# 4. Is the bucket policy considered public by S3's own policy analysis?
aws s3api get-bucket-policy-status --bucket hl-m01-statements-111122223333-a1b2c3 --profile learn-sandbox
# 5. Object ownership: BucketOwnerEnforced means ACLs are disabled.
aws s3api get-bucket-ownership-controls --bucket hl-m01-statements-111122223333-a1b2c3 --profile learn-sandbox
# 6. AWS's side: list AWS compliance reports available in AWS Artifact (id, name, period).
aws artifact list-reports --profile learn-sandbox --region us-east-1 \
--query "reports[?contains(name, 'SOC')].[id, name, periodEnd]" --output table
# 7. To download one: first get the terms token for that report, then the report URL.
aws artifact get-term-for-report --report-id report-abcdEFGH12345678 --profile learn-sandbox --region us-east-1
aws artifact get-report --report-id report-abcdEFGH12345678 --term-token "<token from previous call>" --profile learn-sandbox --region us-east-1- Commands 1 to 5 are read-only and cost nothing (S3 control-plane requests like these are not billed as storage requests ⚠ VERIFY; at worst they are fractions of a cent).
get-public-access-blockreturnsNoSuchPublicAccessBlockConfigurationif the bucket has none. That is a finding, not an error in your command.- The
artifactcommands exist in AWS CLI v2 (list-reports,get-term-for-report,get-report,list-customer-agreementsand others). Run them in us-east-1 ⚠ VERIFY the Regions where the Artifact API is available. The report ID above is a fictional placeholder in the documentedreport-+ 16 characters format. - In PowerShell, replace the
\line continuation with a backtick or write the command on one line.
Infrastructure as Code
Your side of the line is configuration, so it belongs in code where it can be reviewed and re-applied. Both versions create a bucket where every customer-owned S3 control is explicit. The Terraform file assumes a provider "aws" block with region = "us-east-1" and profile = "learn-sandbox" (the pattern from Secure your AWS account, with AWS provider ~> 6.x); the CDK stack needs a CDK app and cdk bootstrap in the sandbox account.
resource "aws_s3_bucket" "statements" {
bucket_prefix = "hl-m01-statements-"
tags = {
Project = "cea-lab"
Lab = "m01-hello-aws"
Environment = "learn"
Owner = "alex"
}
}
# Customer-owned control: no public access, ever.
resource "aws_s3_bucket_public_access_block" "statements" {
bucket = aws_s3_bucket.statements.id
block_public_acls = true
ignore_public_acls = true
block_public_policy = true
restrict_public_buckets = true
}
# Customer-owned control: ACLs disabled, access only through IAM and bucket policy.
resource "aws_s3_bucket_ownership_controls" "statements" {
bucket = aws_s3_bucket.statements.id
rule {
object_ownership = "BucketOwnerEnforced"
}
}
# Customer-owned choice: which encryption. SSE-S3 here; SSE-KMS with your own key in production.
resource "aws_s3_bucket_server_side_encryption_configuration" "statements" {
bucket = aws_s3_bucket.statements.id
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}
# Customer-owned control: refuse any request that is not over TLS.
data "aws_iam_policy_document" "tls_only" {
statement {
sid = "DenyInsecureTransport"
effect = "Deny"
actions = ["s3:*"]
principals {
type = "*"
identifiers = ["*"]
}
resources = [aws_s3_bucket.statements.arn, "${aws_s3_bucket.statements.arn}/*"]
condition {
test = "Bool"
variable = "aws:SecureTransport"
values = ["false"]
}
}
}
resource "aws_s3_bucket_policy" "statements" {
bucket = aws_s3_bucket.statements.id
policy = data.aws_iam_policy_document.tls_only.json
depends_on = [aws_s3_bucket_public_access_block.statements]
}The module exercise app (lab-hello-aws) applies the same settings with the SDK, so you can compare three ways of owning the same controls.
Complete code
A read-only C# checker that turns "our side of the line" into a pass/fail report for one bucket. It uses the default credential chain, so set AWS_PROFILE first.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<RootNamespace>Harbourline.ResponsibilityCheck</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AWSSDK.S3" Version="4.1.1" />
<!-- Needed at runtime so IAM Identity Center (SSO) profiles resolve. -->
<PackageReference Include="AWSSDK.SSO" Version="4.1.0.2" />
<PackageReference Include="AWSSDK.SSOOIDC" Version="4.1.0.2" />
</ItemGroup>
</Project>// Harbourline.ResponsibilityCheck: prints evidence that "your side" of the
// Shared Responsibility Model is configured on one S3 bucket. Read-only.
// Usage: dotnet run -- <bucket-name> (with AWS_PROFILE=learn-sandbox and a valid SSO session)
using Amazon.S3;
using Amazon.S3.Model;
if (args.Length != 1)
{
Console.Error.WriteLine("Usage: dotnet run -- <bucket-name>");
return 2;
}
var bucket = args[0];
using var s3 = new AmazonS3Client(); // default credential chain + Region from AWS_PROFILE / AWS_REGION
var findings = new List<(string Control, bool Ok, string Detail)>();
// 1. Encryption at rest (customer chooses the key type; AWS runs the encryption service).
var enc = await s3.GetBucketEncryptionAsync(new GetBucketEncryptionRequest { BucketName = bucket });
var rule = enc.ServerSideEncryptionConfiguration?.ServerSideEncryptionRules?.FirstOrDefault();
var algorithm = rule?.ServerSideEncryptionByDefault?.ServerSideEncryptionAlgorithm?.Value ?? "none";
findings.Add(("Default encryption", algorithm is "AES256" or "aws:kms" or "aws:kms:dsse", algorithm));
// 2. Block Public Access (customer configuration; AWS enforces it).
try
{
var pab = await s3.GetPublicAccessBlockAsync(new GetPublicAccessBlockRequest { BucketName = bucket });
var c = pab.PublicAccessBlockConfiguration;
var allOn = c is not null && c.BlockPublicAcls == true && c.IgnorePublicAcls == true
&& c.BlockPublicPolicy == true && c.RestrictPublicBuckets == true;
findings.Add(("Block Public Access (all four)", allOn, allOn ? "on" : "at least one setting is off"));
}
catch (AmazonS3Exception ex) when (ex.ErrorCode == "NoSuchPublicAccessBlockConfiguration")
{
findings.Add(("Block Public Access (all four)", false, "not configured on the bucket"));
}
// 3. Object ownership: ACLs disabled means only IAM and bucket policies grant access.
try
{
var own = await s3.GetBucketOwnershipControlsAsync(new GetBucketOwnershipControlsRequest { BucketName = bucket });
var mode = own.OwnershipControls?.Rules?.FirstOrDefault()?.ObjectOwnership?.Value ?? "unknown";
findings.Add(("ACLs disabled (BucketOwnerEnforced)", mode == "BucketOwnerEnforced", mode));
}
catch (AmazonS3Exception ex) when (ex.ErrorCode == "OwnershipControlsNotFoundError")
{
findings.Add(("ACLs disabled (BucketOwnerEnforced)", false, "no ownership controls"));
}
// 4. Is the bucket policy public? (AWS evaluates the policy for you.)
try
{
var status = await s3.GetBucketPolicyStatusAsync(new GetBucketPolicyStatusRequest { BucketName = bucket });
var isPublic = status.PolicyStatus?.IsPublic == true;
findings.Add(("Bucket policy not public", !isPublic, isPublic ? "PUBLIC" : "not public"));
}
catch (AmazonS3Exception ex) when (ex.ErrorCode == "NoSuchBucketPolicy")
{
findings.Add(("Bucket policy not public", true, "no bucket policy (TLS-only policy recommended)"));
}
foreach (var (control, ok, detail) in findings)
{
Console.WriteLine($"{(ok ? "PASS" : "FAIL"),-5} {control,-38} {detail}");
}
return findings.All(f => f.Ok) ? 0 : 1;Run it:
aws sso login --profile learn-sandbox
$env:AWS_PROFILE = "learn-sandbox"
dotnet run -- hl-m01-statements-111122223333-a1b2c3Expected output for a bucket created by the module exercise:
PASS Default encryption AES256
PASS Block Public Access (all four) on
PASS ACLs disabled (BucketOwnerEnforced) BucketOwnerEnforced
PASS Bucket policy not public not publicThis code compiled cleanly with .NET 10 and the package versions shown on 2026-11-17 (warnings as errors). Running it needs your AWS account.
Code explained line by line
using Amazon.S3; using Amazon.S3.Model;bring in the S3 client and its request/response types from theAWSSDK.S3package.- The
args.Lengthcheck returns exit code 2 for wrong usage, so scripts can tell "bad input" from "control failed" (exit code 1). new AmazonS3Client()with no arguments uses the SDK's default credential provider chain and Region resolution. WithAWS_PROFILE=learn-sandboxit uses your SSO session. See SDK first contact.findingsis a list of tuples: control name, pass or fail, and the detail to print. It keeps the report logic separate from the AWS calls.GetBucketEncryptionAsyncreads the bucket's default encryption rule. Since January 2023 every bucket has at least SSE-S3, so a "none" result is very unlikely; the check still documents which option you chose.ServerSideEncryptionAlgorithm?.Valueis an SDK "constant class", not a C# enum..Valuegives the wire string such asAES256oraws:kms.GetPublicAccessBlockAsyncreturns the four Block Public Access flags. In SDK v4 these properties are nullablebool?, so the code compares with== truerather than assuming a default.- The
catch ... when (ex.ErrorCode == "NoSuchPublicAccessBlockConfiguration")turns "nothing configured" into a FAIL finding instead of a crash. Exception filters keep other errors (such asAccessDenied) propagating so you notice them. GetBucketOwnershipControlsAsyncreturns the object ownership mode.BucketOwnerEnforceddisables ACLs entirely, which removes a whole class of accidental public grants.GetBucketPolicyStatusAsyncasks S3 itself whether the policy is public. This is better than parsing JSON yourself: S3 applies its own rules for what "public" means.NoSuchBucketPolicyis treated as a pass with advice, because no policy is not public, but a TLS-only policy is recommended.- The
foreachprints aligned columns (-5,-38are left-aligned widths) so the output can be pasted into an evidence record. - The final
returngives exit code 0 only if every control passed, so a CI pipeline can fail on drift.
Security considerations
- Least privilege for the checker: it needs only
s3:GetEncryptionConfiguration,s3:GetBucketPublicAccessBlock,s3:GetBucketOwnershipControlsands3:GetBucketPolicyStatuson the bucket ARN. Give an evidence-collection role exactly those, notAdministratorAccess. - Evidence integrity: store evidence in a separate account and bucket with versioning and Object Lock, so the team being audited cannot edit it. Module 5 and Module 15 build this.
- Artifact reports are confidential. Do not paste them into chat tools, tickets visible to suppliers, or public repositories. Respect the terms you accepted.
- Customer managed keys move work to you. With SSE-KMS and your own key, you own the key policy, rotation settings and the risk of locking yourself out. Choose it because you need it (separation of duties, crypto-shredding, audit of every decrypt), not by default.
⚠ Learning shortcut — not for production
The lab bucket uses SSE-S3 (keys fully managed by AWS) and you check it by hand from your laptop with an administrator role. In a bank, statement buckets typically use SSE-KMS with a customer managed key whose key policy separates key administrators from key users. The checks run continuously through AWS Config rules and Security Hub CSPM controls in a central security account, and findings route to a ticketing system. Module 5 builds that version.
⚠ Learning shortcut — not for production
In this course one person accepts the Artifact terms, configures the bucket and reviews the evidence. A bank separates these roles: procurement and legal accept agreements, engineering configures, a second line risk function reviews, and internal audit tests independently.
Banking use case
Harbourline Bank is moving its monthly statement generation from an on-premises Windows service to AWS: a .NET 10 Lambda function writes PDFs to S3, and customers download them through the mobile app. The architecture review board asks the team for a responsibility matrix before go-live. The team's matrix, simplified, reads:
| Area | AWS | Harbourline (engineering) | Harbourline (risk, legal, compliance) |
|---|---|---|---|
| Data-centre, hardware, Lambda and S3 service security | Operates; evidence in SOC 2 / ISO 27001 reports via Artifact | Downloads and files current reports | Reviews report scope, period and exceptions |
| Lambda runtime patching | Patches the managed dotnet10 runtime | Keeps NuGet dependencies patched; redeploys | Sets patch SLAs |
| Data classification | None | Tags bucket DataClassification=confidential | Owns the classification scheme |
| Personal data (UK GDPR) | Processor under the AWS GDPR DPA | Implements retention (S3 Lifecycle), access controls, encryption | Controller duties: lawful basis, DPIA, data-subject rights, breach notification within 72 hours to the ICO where required |
| Keys | Runs KMS (FIPS-validated HSMs ⚠ VERIFY current validation level) | Creates customer managed key, key policy, rotation | Approves key-management standard: KMS, CloudHSM custom key store or external key store |
| Identity and access | Runs IAM and Identity Center | Least-privilege roles; no human access to the bucket in production | Quarterly access reviews |
| Logging and detection | Delivers CloudTrail and service logs | Organisation trail, retention, alerts | Defines retention periods for regulatory record-keeping |
| Incident response | Notifies customers of AWS-side events (AWS Health) | Runbooks, on-call, forensics in the account | Regulatory incident reporting (PRA/FCA, and DORA for the EU subsidiary) |
| Third-party risk | Provides assurance reports, contractual commitments | Exit plan technical feasibility, data export tested | Outsourcing register, materiality assessment, contract review, concentration risk |
What the bank still owns, in plain words
- Data. Harbourline decides what data goes to AWS, classifies it, minimises it and deletes it on schedule. AWS does not look inside your objects or tell you that a bucket holds personal data unless you run a service such as Amazon Macie.
- Identity. Every IAM policy, role trust, Identity Center assignment and SCP is the bank's. Most cloud breaches are identity breaches.
- Keys. The bank chooses the key model:
- AWS KMS with customer managed keys ($1 per key per month, plus requests): key material lives in AWS-operated HSMs; you control the key policy and usage.
- KMS custom key store backed by AWS CloudHSM: keys in single-tenant HSMs that you manage in your VPC. CloudHSM is billed per HSM per hour, and a resilient cluster needs at least two HSMs in different AZs, so this costs well over USD 1,000 per month ⚠ VERIFY current hourly price on the CloudHSM pricing page.
- KMS external key store (XKS): key material stays in a key manager outside AWS that you operate. Strongest "hold your own key" story, but your key manager's availability becomes part of every encrypt and decrypt call.
- Logging and evidence. AWS records API calls in CloudTrail; the bank decides to keep them, for how long, where, and who can read them.
- Incident response. AWS will not investigate a compromised IAM role in your account. Your security team does.
- Third-party and outsourcing risk. In the UK, the PRA's supervisory statement SS2/21 sets expectations for outsourcing and third-party risk management, including materiality assessments, contractual rights, data security and exit plans. For the EU subsidiary, the EBA Guidelines on outsourcing arrangements and DORA (applying since 17 January 2025) require ICT third-party risk management and a register of ICT contractual arrangements. On 18 November 2025 the European Supervisory Authorities designated AWS (as Amazon Web Services EMEA SARL) one of the critical ICT third-party providers under DORA, which means direct oversight of AWS by EU authorities. This oversight does not move the bank's own obligations to AWS. The bank remains responsible for its operational resilience. How these rules apply to a specific workload is a question for the bank's risk, compliance and legal teams, not for an architecture diagram.
- Contracts. The AWS Customer Agreement, the AWS Service Terms (which include the GDPR Data Processing Addendum) and any negotiated enterprise or financial-services addendum are reviewed by legal and procurement. AWS Artifact Agreements shows which agreements your account or organisation has accepted.
Common mistakes
- "AWS is PCI compliant, so our app is." → AWS's Attestation of Compliance covers AWS's controls for in-scope services → your cardholder-data environment still needs its own assessment. Use AWS's AoC as one input to yours.
- Assuming managed means configured. → RDS is "managed" → people leave
PubliclyAccessible=trueor skip encryption at creation. Encryption must be chosen when the instance is created. - Forgetting container images on Fargate. → "Fargate is serverless" → AWS patches the host, not your image. Rebuild images on a schedule and scan them (Amazon ECR scanning, Module 9).
- Treating Lambda as patch-free. → AWS patches the managed runtime → outdated NuGet packages in your deployment package are still yours.
- No owner for logs. → CloudTrail is on by default for 90 days of management events in Event history → but that is not a retained, tamper-resistant trail. Create a trail to S3 with a retention policy.
- Downloading Artifact reports once. → They have audit periods → a two-year-old SOC report does not cover today. Refresh at least annually and note the bridge letter if a period gap exists.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
NoSuchPublicAccessBlockConfiguration from get-public-access-block | No bucket-level Block Public Access settings | Apply all four settings (put-public-access-block) and recheck; also check the account-level setting |
AccessDenied on Artifact Download report | Missing artifact:GetReport / artifact:GetTermForReport permissions, or terms not accepted | Use SandboxAdmin, accept the terms, or add the Artifact read permissions to a dedicated evidence role |
aws artifact list-reports returns an endpoint error | Region where the Artifact API is not offered | Add --region us-east-1 |
ServerSideEncryptionConfigurationNotFoundError | Very old bucket or a non-AWS S3-compatible endpoint | Unlikely on AWS since 2023; set default encryption explicitly |
The C# checker throws AmazonS3Exception: AccessDenied for one call only | The role can read some bucket settings but not others | Add the specific s3:Get... permission listed under Security considerations |
Checker says Bucket policy not public but you expected a TLS policy | No policy exists | Add the TLS-only deny statement shown in the IaC section |
Cost and cleanup
Cost: $0. AWS Artifact is free. The CLI and SDK reads above are configuration requests on a bucket and cost nothing noticeable. The IaC examples create an S3 bucket that holds no data: storage cost is zero until you upload objects.
If you deployed the IaC example, remove it:
# Terraform version
terraform destroy
# CDK version (AutoDeleteObjects empties the bucket first)
cdk destroy
# Confirm nothing tagged for this lab remains
aws resourcegroupstaggingapi get-resources --tag-filters Key=Lab,Values=m01-hello-aws --profile learn-sandbox --query "ResourceTagMappingList[].ResourceARN"The tagging API can show recently deleted resources for a short while. If an ARN still appears, check it with the service's own describe/head call.
Exercises
- 🟢 Guided: Run the six CLI commands against a bucket configured like the module-exercise bucket. The module exercise deletes its bucket at the end, so either check its README for an option to keep the bucket, or create one with the Terraform above and destroy it afterwards. Download the latest AWS SOC 2 Type II report from Artifact and write down its period end date.
- 🟡 Challenge: Fill in the "where the line sits" table for Amazon DynamoDB and Amazon ECS on EC2 (not Fargate) using each service's security documentation. Where does the line differ from Fargate?
- 🔴 Live problem: A product owner writes: "Legal says we can put customer statements in S3 because AWS is ISO 27001 certified. Can you just create the bucket today?" Write the reply you would send, covering what ISO 27001 does and does not tell you, which customer-owned controls you will apply, and which internal teams must sign off.
Assignment
Create docs/responsibility-matrix.md in your learning-journal repository for the module-exercise workload. Include: the workload sentence, the per-layer ownership table, the dated output of the C# checker, the name and period of the AWS report you downloaded (not the report itself), and a "gaps and owners" list.
Solutions
You should see AES256 from get-bucket-encryption, four true values from get-public-access-block, "IsPublic": false from get-bucket-policy-status and BucketOwnerEnforced from get-bucket-ownership-controls. The SOC 2 report's period typically covers twelve months ending a few months before today. Why: the first four prove your half of the model; the report proves AWS's half. Both together form the evidence pair auditors expect.
DynamoDB is an abstracted service like S3: AWS runs servers, OS, storage engine and replication across AZs; you own table design, IAM (including fine-grained conditions such as dynamodb:LeadingKeys), encryption key choice (AWS owned, AWS managed or customer managed key), point-in-time recovery settings, backups retention and VPC endpoint policies. ECS on EC2 moves the line down: you now own the EC2 container instances, their OS patching, the ECS agent version and capacity, as well as everything you owned with Fargate. Why: the more of the host you can see and log in to, the more of it you must patch and harden.
A good reply: ISO 27001 certifies AWS's information security management system for the services in scope. It does not assess Harbourline's bucket configuration, IAM, encryption choices, retention or incident response. Before go-live you will apply Block Public Access, BucketOwnerEnforced, SSE-KMS with a customer managed key, a TLS-only policy, least-privilege roles, access logging and lifecycle rules, and you will produce dated evidence. Sign-off is needed from information security (control design), data protection (DPIA for statements, which contain personal data), the outsourcing/third-party risk function (is this a material outsourcing, is AWS in the register) and possibly legal (contract terms). Why: the certification is necessary input but never sufficient; the bank remains accountable.
Knowledge check
Answer: You patch the EC2 guest OS (AWS patches the host and hypervisor). For a Lambda function on a managed runtime, AWS patches both the OS and the runtime; you keep your code and NuGet dependencies up to date.
Answer: Inherited (physical and environmental controls), shared (patch management, configuration management, awareness and training) and customer-specific (service and communications protection or zone security, such as segmenting a cardholder-data environment).
Answer: Both, in different layers. Since 2023 AWS encrypts new objects with SSE-S3 by default and runs the encryption, but you choose the option (SSE-S3, SSE-KMS, DSSE-KMS), the key, its policy, and whether to enforce a specific type through bucket policy.
Answer: AWS Artifact, in the console or through aws artifact CLI commands. It is free. You must accept the report terms before downloading.
Answer: No. The designation adds direct EU oversight of AWS. The financial entity remains fully responsible for its own ICT risk management, third-party risk management and operational resilience.
Interview questions
- "Explain the Shared Responsibility Model to a non-technical risk manager." — AWS secures the facilities, hardware and the managed software it runs; we secure everything we configure and store: data, access, encryption choices, network exposure, logging and our code. How much of the middle layer AWS takes on depends on the service: very little for a VM, a lot for serverless.
- "We use Lambda. What security work is left for us?" — Least-privilege execution role, dependency patching and scanning, secrets in Secrets Manager rather than environment variables, input validation, resource policies on function URLs or API Gateway, log retention and alerting, and the data the function touches.
- "How do you evidence AWS's controls to an auditor?" — Download the relevant reports (SOC 2 Type II, ISO certificates, PCI AoC) from AWS Artifact, check that the services we use are in scope, note the period and any exceptions, and pair them with our own evidence for customer-side controls.
- "What would make you choose CloudHSM or an external key store over standard KMS?" — A regulatory or internal policy requirement for single-tenant HSMs or for key material to stay outside AWS, balanced against higher cost, operational burden and availability risk.
Certification practice
A company runs a .NET API on Amazon EC2 instances and stores files in Amazon S3. Which task is the company's responsibility under the AWS Shared Responsibility Model?
A. Replacing failed disks in the S3 storage fleet B. Applying security patches to the EC2 instances' guest operating system C. Patching the hypervisor that runs the EC2 instances D. Physically securing the data centres in us-east-1
Answer: B. The customer manages the EC2 guest OS. A, C and D are infrastructure layers AWS owns: storage hardware, virtualisation and physical security.
An auditor asks a bank for evidence that AWS's data centres meet an independent security standard. What should the bank use?
A. AWS Trusted Advisor B. AWS Artifact C. Amazon Inspector D. AWS Config
Answer: B. AWS Artifact provides on-demand access to AWS compliance reports such as SOC and ISO. Trusted Advisor gives best-practice checks on your account, Inspector scans your workloads for vulnerabilities, and Config records your resource configuration: all three concern the customer side.
A bank's policy requires that encryption keys for a new S3 data lake never be stored on AWS-managed infrastructure, while applications should keep using standard S3 server-side encryption APIs. Which solution meets the requirement?
A. SSE-S3 with default encryption B. SSE-KMS with an AWS managed key C. SSE-KMS with a key in an AWS KMS external key store backed by the bank's own key manager D. Client-side encryption with a key stored in AWS Secrets Manager
Answer: C. An external key store keeps key material in a key manager the customer operates outside AWS, while S3 still integrates through KMS. A and B keep keys on AWS-managed infrastructure. D stores the key in an AWS service and changes the application's encryption model.
A team moves a containerised .NET service from Amazon ECS on EC2 to AWS Fargate and removes its monthly patching task entirely. Which risk have they introduced?
A. None; Fargate patches the container image automatically B. Outdated operating-system packages and .NET runtime inside their container image will no longer be updated C. The Fargate host OS will not receive patches D. Their task IAM role will expire
Answer: B. Fargate removes host management, but the image contents remain the customer's responsibility; the task must change from "patch hosts" to "rebuild and redeploy images". A is false. C is AWS's job. D is unrelated: task roles provide automatically refreshed temporary credentials.
Completion checklist
- I can explain security of vs in the cloud in two sentences
- I can fill the "where the line sits" table for EC2, RDS, Fargate, Lambda and S3 from memory
- I ran the CLI evidence commands or the C# checker against a bucket I own
- I downloaded an AWS SOC 2 report from Artifact and noted its period
- I can list seven things a bank still owns after moving to AWS
- I destroyed any IaC bucket I created and confirmed with the tagging API
Key takeaways
- AWS secures the cloud; you secure what you put in it and how you configure it.
- The line moves with the service: EC2 leaves you the OS, Lambda leaves you code and configuration, S3 leaves you data and access settings.
- Identity, data, network exposure, encryption choices, logging and incident response never move to AWS.
- AWS's certifications are evidence for AWS's controls only; collect your own evidence for yours.
- Regulators hold the bank accountable for outsourced services, including AWS, even under DORA's direct oversight of AWS.
Further reading
- AWS Shared Responsibility Model
- Shared responsibility model — AWS Risk and Compliance whitepaper
- What is AWS Artifact? and
aws artifact list-reports - AWS Services in Scope by Compliance Program
- AWS GDPR Center
- Protecting data with server-side encryption (Amazon S3)
- AWS KMS external key stores and AWS CloudHSM key stores
- Security in Amazon ECS (shared responsibility) and Security in AWS Lambda
- PRA SS2/21 Outsourcing and third party risk management
- AWS designated as a critical third-party provider under the EU's DORA regulation (AWS Security Blog)
- Next: Cloud architecture fundamentals · Deeper security: Module 5
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.
Lab: price a banking web app three ways in the AWS Pricing Calculator
Estimate Harbourline Bank's statement portal in the AWS Pricing Calculator with On-Demand, Savings Plans and Spot workers, compare PostgreSQL with SQL Server licensing, and check the totals in C#.
Cloud architecture fundamentals
Design for scale and failure from day one: scalability, elasticity, availability, loose coupling, stateless services, retries with backoff and jitter, idempotency and managed services, with a runnable C# example.