Skip to content
Tech Interview Prep
Technical interview guide

The Shared Responsibility Model

What the cloud provider secures versus what the customer is responsible for, and why most cloud breaches fall on the customer's side.

Minutes to read
3
Practice MCQs
25
Interview Q&A
25
Edition
v5
Editorial status
Reviewed

Scope: AWS, Microsoft Azure, Google Cloud, and NIST shared-responsibility guidance current 2026-09-01.

Interview Q&A

Treat each question like a live interview question: answer out loud first (structure, assumptions, tradeoffs), then open the model answer to spot gaps and rehearse a tighter follow-up.

Curated: · Written: · Reviewed:

25 questions

Q&A-5

What is the core distinction between security 'of' the cloud and security 'in' the cloud?

Answer

The 90-second answer

Security of the cloud is the provider's job: the facilities, hardware, hypervisor, network fabric, and the managed control plane that runs the service. Security in the cloud is yours: the data, identities, configurations, and code you put into those services. The line is not something you can detect at runtime: it is a contractual allocation, defined per service in the provider's shared responsibility model, and it slides up the stack as abstraction increases. One invariant holds across every model: data classification and access control stay with the customer.

LayerIaaS (EC2, Azure VM, GCE)PaaS / managed (S3, Cloud SQL, App Engine)SaaS (Microsoft 365, Google Workspace)
Data & classificationCustomer (in)Customer (in)Customer (in)
IAM, keys, access policyCustomer (in)Customer (in)Customer (in)
Application code & configCustomer (in)Customer (in)Provider (of)
Runtime / middlewareCustomer (in)Provider (of)Provider (of)
Guest OS & patchingCustomer (in)Provider (of)Provider (of)
Hypervisor, network fabricProvider (of)Provider (of)Provider (of)
Facilities, hardware, disksProvider (of)Provider (of)Provider (of)

Why the line moves. The provider takes over each layer it operates. Give it a VM and the guest OS is still yours to patch. Give it a runtime and it patches the runtime, but your code and its data are still yours. Give it the whole application and it runs the app, while you still own the data and decide who can reach it. The boundary is drawn by what the provider operates, not by what is "in the cloud."

A worked case. July 2019: an SSRF flaw in a customer-run WAF (ModSecurity on EC2) let an attacker reach the EC2 instance metadata service and read the IAM role credentials attached to that instance. The role was over-permissive, so the attacker listed S3 buckets and exfiltrated data on roughly 100 million US and 6 million Canadian applicants. AWS's facilities, hypervisor, and S3 service were not breached. The failure was entirely in the cloud: a misconfigured WAF, an over-broad IAM role, and IMDSv1, which hands credentials to any process that can make an HTTP request. AWS shipped IMDSv2 (session-token, hop-limited) in November 2019 to break that path.

Failure modes and how to catch them.

  1. Reading provider-managed encryption as data confidentiality. SSE-KMS with a provider-managed key protects disks at rest (of). Any principal holding s3:GetObject and kms:Decrypt reads plaintext through the API (in). Detect with CloudTrail data events on GetObject and IAM Access Analyzer for public or cross-account bucket policies.
  2. Assuming the provider patches your guest OS in IaaS. It does not. Detect with AWS Inspector findings or SSM Patch Manager compliance, or your own CVE scan.
  3. Assuming provider logs are your audit trail. CloudTrail Event history keeps management events for 90 days and nothing else; durable retention needs a trail to S3, and data events (S3 object-level, Lambda invoke) are off by default and billed separately. Azure Activity Log and GCP Cloud Audit Logs behave the same way. Detect by checking trail status and whether data events are enabled.

The trade-off worth naming. "Of" versus "in" allocates responsibility, not risk. A provider-side failure (a control-plane outage, a hypervisor CVE) still lands on your incident response, and you still rotate credentials if the provider's control plane is compromised. In practice the weight sits on the customer side: misconfiguration in the cloud is the dominant cause of cloud breaches, which is why the model is a checklist for what you own, not a shield.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-9

Under the shared responsibility model, who is responsible for patch management across Infrastructure as a Service (IaaS) versus Platform as a Service (PaaS)?

Answer

In the shared responsibility model, patch management delineates strictly along the abstraction layer exposed to the customer.

In Infrastructure as a Service (IaaS) (for example, AWS EC2, Azure Virtual Machines, or Google Compute Engine):

  • Provider responsibility: The physical hardware, virtualization layer/hypervisor, physical datacenter networks, and host firmware.
  • Customer responsibility: The guest operating system (kernel, userland security updates), network stacks, application runtimes, third-party agents, and the user application. If a vulnerability like an OpenSSL or Linux kernel flaw hits an EC2 instance, the provider will not patch it; the customer must test, schedule, and apply updates or cycle immutable machine images (AMIs/VHDs).

In Platform as a Service (PaaS) (such as AWS RDS, Azure App Service, or Google Cloud SQL):

  • Provider responsibility: The underlying physical host, the guest operating system, hypervisor, virtualization layer, and database/runtime platform plumbing. The cloud provider tests, applies, and schedules security patches for the underlying OS and managed engine minor versions without granting guest OS shell access.
  • Customer responsibility: Maintenance window scheduling, engine major-version lifecycle upgrades (which frequently alter application compatibility), application runtime dependencies/libraries packaged with the artifact, schema migrations, and testing workload compatibility against provider maintenance.

Responsibility Comparison Matrix

LayerIaaS (e.g., EC2, Azure VM)PaaS (e.g., RDS, Azure SQL, App Service)
Physical & HypervisorProviderProvider
Guest OS Kernel & Security PatchesCustomerProvider
Engine / Runtime Minor PatchesCustomerProvider (governed by maintenance windows)
Engine Major Version UpgradesCustomerCustomer (opt-in / scheduled migration)
Workload Code & DependenciesCustomerCustomer

Operational Mechanisms and Trade-offs

  1. IaaS Rollout Mechanics: Patching is implemented either in-place (via systems like AWS Systems Manager Patch Manager or Azure Update Manager) or via immutable infrastructure (re-baking machine images, blue/green instance refresh via auto-scaling groups). In-place patching risks configuration drift across fleets; immutable rolling updates avoid drift but introduce build pipeline latency.

  2. PaaS Maintenance Windows & Engine Upgrades: Providers publish maintenance windows for mandatory OS and engine minor patches. While automated, failover during multi-AZ patch application can drop existing client connections (e.g., a 10–30s primary switchover in managed databases). Customers remain responsible for handling network retries and connection pooling, as well as initiating major version upgrades that carry API or syntax breaking changes.

Common Failure Modes

  • PaaS Auto-Patch Disruption: Production databases running on single-AZ deployments drop traffic during provider-managed OS maintenance windows because the engineering team treated managed hosting as zero-downtime hosting.
  • Orphaned IaaS Instances: Treating IaaS like PaaS under the assumption that cloud providers patch unmanaged VMs, leaving unpatched kernels vulnerable to known CVEs for months until discovered in a compliance audit.

Curated: · Written: · Reviewed:

Difficulty: Easy
Q&A-2

Assess responsibility for an IaaS web application.

Answer

Assume EC2-style IaaS: raw VMs, not RDS or Lambda. The dividing line is the hypervisor. Below it: the building, power, top-of-rack switches, physical hosts, the hypervisor and Nitro firmware: the provider owns and patches. Above it: the guest OS and its patches, the AMI you picked, security groups, IAM, KMS keys, your data, your app code: you own. AWS phrases it as security of the cloud versus security in the cloud.

Two things put the line there. The provider can patch the hypervisor across every tenant without asking anyone; you can't patch your guest OS without risking your own app, so only you can own that window. And the provider can't tell whether your open port 22 is a mistake or a health check: intent lives with the workload owner.

The line moves up with managed services. RDS absorbs OS patching and backups; Lambda absorbs the runtime. It never moves accountability: you still own the data, the IAM policy that reaches it, and the decision to use the managed thing.

LayerOwnerConcrete artefact
Facilities, hosts, hypervisor, Nitro firmwareProviderPatched on their schedule; invisible to you
Guest OS, AMI, patchingYouYou bake the AMI; SSM Patch Manager reports compliance
Security groups, NACLsYouDefault deny inbound; 0.0.0.0/0 on 22 is your bug
IAM, KMS, secrets, dataYouRoot MFA, key policies, bucket policies
L3/L4 DDoS at the edgeProviderShield Standard, automatic and free
L7 WAF rules, rate limitsYouYou write the rules; Shield Advanced is a paid add-on
Multi-AZ placementYouProvider offers AZs; you choose to span them

Availability is the cleanest example of the split. EC2's SLA commits 99.99% monthly for a region-level (multi-AZ) deployment and 99.5% for a single instance. 99.5% of a 30-day month is about 216 minutes: 3.6 hours: of allowed downtime; 99.99% is about 4.3 minutes. If your app needs 99.9%, a single-AZ instance cannot get you there no matter what the provider does, because the SLA is a service credit, not a design. You buy the AZs; you have to use them.

Failure modes, with the signal that catches each:

  • Stale AMI. You baked the image in January, launched 40 instances, and a base-OS CVE lands in March. Detection: AWS Inspector findings or SSM Patch Manager compliance drifting to non-compliant. The patch window and the reboot are yours.
  • Open security group. 0.0.0.0/0 on 22 or 3389. Detection: the AWS Config managed rule restricted-ssh, or a GuardDuty finding on the instance. Cost is a breach, not a ticket.
  • Single-AZ app. An AZ impairment takes you down while the provider's status page is green for the region. Detection: your own synthetic checks per AZ, not the provider's dashboard.
  • Over-permissive instance profile. A role with s3:* attached to the instance. Detection: GuardDuty credential-exfiltration findings, CloudTrail calls from an unexpected IP. The provider's hypervisor is fine; your blast radius is not.

The trade-off to say out loud: every managed service you adopt moves work to the provider and moves the evidence you need to collect. You stop patching an OS and start auditing a config. Accountability for the data never moves.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-3

Assess responsibility for a managed database service.

Answer

Assumptions: AWS RDS for PostgreSQL, Multi-AZ, single region. Figures are from AWS documentation; check your engine and region.

The split is not "provider runs the database, you run the app." The provider owns the control plane and the host: hardware, hypervisor, host OS patching, the engine binary, standby replication, backup storage, and failover orchestration. You own the data plane and everything touching it: schema, queries, roles and grants, credentials, network exposure, KMS key policy, retention, and, the part people skip, deciding what RPO/RTO you actually need and proving the service meets it.

The line that trips people: the provider guarantees the service is reachable, not that your database is intact. A 99.95% Multi-AZ SLA covers the endpoint being up. It says nothing about the table you dropped at 14:03.

LayerProviderYou
Host OS, hypervisor, hardwareyesno
Engine binary + minor patchesyes (auto in maintenance window)approve/deny, test
Standby replication, failoveryesconnection retry logic
Backup storageyesretention setting, restore drills
Schema, queries, indexesnoyes
IAM/DB roles, credentialsnoyes
Network exposure, TLSnoyes
KMS key policynoyes
RPO/RTO targetnoyes

Trade-offs. Managed beats self-managed when your team's time is worth more than the premium and you don't need a version or extension the provider won't ship. Self-managed wins when you need a specific Postgres extension, a version the provider lags on, sub-millisecond colocation with the app, or you're at a scale where the premium is real money.

Multi-AZ vs read replica for failover: Multi-AZ is a synchronous standby you can't read from; failover is automatic, typically 60–120 seconds on RDS and under 30 on Aurora, RPO near zero. A read replica is asynchronous, readable, promoted manually, RPO > 0: you can lose the last few seconds of writes. Pick Multi-AZ when you need automatic failover with no data loss; pick replicas for read scale, not for HA.

Why failover RTO ≠ restore RTO. Failover promotes a standby that already holds the data. The work is an endpoint flip and connection re-establishment: seconds to a couple of minutes. Restore rebuilds: pull the snapshot, replay WAL to the target time, provision a new instance. That's minutes to hours, and the latest restorable time lags real time by about 5 minutes, so your true RPO is ~5 minutes even with point-in-time recovery.

Failure modes.

  • Backup configured, never restored. Detection: quarterly drill. Restore into a scratch instance, time to first successful query. A 1 TB instance can take hours; that's your real RTO, not the SLA number.
  • App can't survive failover. Detection: p99 connection errors spike for the failover window because the pool holds stale DNS. Fix: TTL under 60s, retry with jitter.
  • Storage fills. RDS autoscaling triggers around 10% free and adds headroom, but only if you set a max. Detection: FreeStorageSpace alarm.
  • Maintenance window auto-applies a minor version. Detection: RDS event subscription or CloudTrail. Cost: an untested behavior change at 03:00.

Closing. Decide your RPO/RTO first, check the service meets it, then test the restore and the failover. Everything above the endpoint is yours.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-4

Assess responsibility for a SaaS business application.

Answer

Core answer (first 90 seconds)

First I'd pin down three things: which SaaS product and edition, what data classification it holds, and how much of it is tenant-configurable. Those decide how much I test versus how much I accept on the provider's attestation.

The split is: the provider owns everything from the physical layer up through the application. Data centers, network, hosts, hypervisor, the app's own code, its patching and its availability. You own what you put in and how you configure it: data classification, tenant settings, user lifecycle, federation, roles, endpoints, sharing, retention, integrations, the legal basis for processing, and offboarding. The boundary sits at the control seam: the provider builds the mechanism, you decide its configuration. That seam is where residual risk lives, because a control can be present and still be off.

Deciding criterion for depth

Assess heavily when the control is customer-configurable and the blast radius is large: external sharing, custom roles, API tokens, marketplace integrations, regulated data. Assess lightly when the tenant is effectively single-tenant, non-configurable, and the provider holds a current SOC 2 Type II plus ISO/IEC 27001 (and ISO/IEC 27017/27018 for cloud and PII). Don't re-test what the report already covers (physical security, hypervisor patching) that's wasted effort. Don't accept the report as cover for your configuration, because its scope excludes it.

What to review and test

Review: the SOC 2 Type II report (an observation window, typically 3–12 months, not a point-in-time Type I), the subprocessor list, residency, the DPA under GDPR Article 28, backup/export, deletion, support access, incident notice windows, and continuity. Then map your complementary controls.

Test, don't just read: identity lifecycle, privileged configuration, export/recovery, and evidence access. Separately assess extensions and marketplace integrations: they sit outside the SaaS assurance scope.

Failure modes

  • Orphaned admin accounts. A contractor is disabled in the IdP but a local admin or service account in the app isn't federated, so it survives. Detect by reconciling IdP active users against the app's user list via SCIM sync report or API pull. Cost: standing privileged access; one leaked credential is admin.
  • Undeleted subprocessor copies. The provider deletes from primary storage but a logging or analytics subprocessor keeps a copy past the DPA window. Detect by requesting per-subprocessor deletion attestation. Cost: an Article 17 erasure violation.
  • Silent federation drift. SSO is configured but a fallback password path stays enabled, or a domain isn't fully claimed, so users bypass SSO and MFA. Detect by attempting a password login for a federated user and checking the enforce-SSO setting. Cost: MFA bypass.
  • Unrestorable backup. Provider backup exists but you can't restore a single tenant's data, or the export drops attachments. Detect with a restore drill, not a report. Cost: recovery time you can't meet.

Artefacts

LayerOwnerEvidence
Physical, network, host, hypervisorProviderSOC 2 Type II, ISO 27001
Application code, patching, availabilityProviderUptime SLA, status page, pen test summary
Tenant config, roles, sharingCustomerConfig baseline, access review
Identity, federation, lifecycleCustomerIdP-to-app reconciliation
Data, retention, deletion, legal basisCustomerDPA, retention schedule, deletion attestation
Integrations, marketplace appsCustomerIntegration inventory, scope review

Access review trace: pull app user list → join to IdP active users → flag app-only accounts → check each for admin role → disable or federate → record. Run quarterly; the join is the control.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-6

How does customer vs provider responsibility for encryption and data protection differ across IaaS, PaaS, and SaaS?

Answer

The 90-second answer

The line moves with the abstraction boundary, not the deployment model's name. Below that line the provider owns the cryptographic machinery: key generation, HSM custody, media destruction, and the code that calls the crypto library. Above it, three things never move to the provider: data classification, identity and access decisions, and the choice of whose key encrypts what. AWS phrases this as "security of the cloud" versus "security in the cloud"; Azure and Google publish the same split.

Concretely, the line sits at:

  • IaaS: the hypervisor. Nothing of yours is encrypted by default beyond the physical disk path; you own the OS keyring (LUKS/BitLocker), TLS termination, and application crypto.
  • PaaS: the engine or storage API. The provider runs TDE and provisions endpoint certificates; you choose the key hierarchy and grant access to it.
  • SaaS: the tenant boundary. Encryption at rest and in transit is always on and not switchable; you own labels, tenant policy, and optionally an external root key.

Where each control lands

ControlIaaSPaaSSaaS
In transitYou terminate TLS, pick ciphersProvider provisions certs; you set the minimum TLS versionProvider enforces suites; you can't change them
At restYou enable EBS/Managed Disk encryption or LUKSOn by default (Azure SQL Database enables TDE for new databases); you pick service-managed vs customer-managed keyAlways on; you may add Customer Key (M365) or client-side encryption (Workspace)
KeysYou own KMS keys and envelope encryptionYou own the CMK in KMS/Key Vault; provider owns the HSMProvider owns root keys; BYOK/Customer Key is optional

Failure modes worth naming

  1. Flat VPC, plaintext east-west traffic. Providers encrypt the physical path between data centres, not inter-instance traffic inside your VPC. Detection: VPC flow logs showing plaintext protocols on 5432/3306/6379; fix with TLS or an IPsec/WireGuard overlay.
  2. Revoking the CMK bricks the database. AWS documents that disabling or revoking access to the KMS key behind an encrypted RDS instance makes the instance inaccessible. KMS key deletion itself has a mandatory 7–30 day waiting period (default 30) so you can cancel it. Alarm on CloudTrail DisableKey and ScheduleKeyDeletion events.
  3. SaaS BYOK silently removes features. Salesforce documents that Shield Platform Encryption with Cache-Only Key Service disables server-side search, filtering, and sorting on encrypted fields, because the platform can't decrypt without the key. Test the feature set before enabling, not after.

The constant across all three: you never hand off regulatory accountability. The provider is a processor; the classification decisions and the access grants remain yours.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-8

How does the shared responsibility model split physical and environmental security controls, and how would you verify that a provider is actually meeting its side?

Answer

Physical and environmental controls sit entirely on the provider's side of the line, but the customer's obligation doesn't vanish, it changes form. You can't audit a data centre you're not allowed into, so you inherit those controls through attestation and contract, and your job becomes verifying scope, period and complementary controls rather than operating anything.

What the provider owns. Site selection and construction, physical entry (badges, mantraps, guards, CCTV), power and cooling with N+1 or better redundancy, fire suppression, flood and seismic siting, cabling, equipment maintenance, and secure disposal or reuse of media and hardware at end of life. Behind those sit personnel controls: background checks and separation of duties for staff who touch racks. NIST SP 800-144 makes the same split for public cloud: the provider carries physical and environmental security, the customer keeps data, identity and configuration.

What stays with the customer. Region and availability-zone selection, which is a jurisdiction and data-residency decision before it is a technical one. Anything you run outside the provider's fence: colo cages, edge sites, your own offices. Which provider services you accept into the workload. Support-channel access is genuinely shared: the provider controls who on its staff can reach your tenant, you control who on your staff can open a break-glass case.

Verifying it. Three artefacts carry the weight: SOC 2 Type II, ISO/IEC 27001 certification, and the provider's compliance portal (AWS Artifact, Google Cloud Compliance Reports Manager, Microsoft's Service Trust Portal with its risk assessment guide).

ControlOwnerEvidence a customer can obtain
Physical entry, surveillance, secure areasProviderSOC 2 CC6.4; ISO/IEC 27001:2022 A.7.2–A.7.4
Power, cooling, fire, floodProviderSOC 2 A1.2; ISO 27001:2022 A.7.5, A.7.11
Media and hardware disposalProviderSOC 2 CC6.5; ISO 27001:2022 A.7.14
Region and residency choiceCustomerProvider region docs; DPA
Customer colo, edge, office sitesCustomerYour own SOC 2 or physical audit
Support and break-glass accessSharedProvider access logs; your break-glass policy

Worked check: onboarding a workload into a region the provider launched last quarter:

  1. Scope. Does the SOC 2 system description list that region and that service? A report covering us-east-1 does not cover a region that opened three months ago.
  2. Period. Type II covers a window. If it ended five months ago, request a bridge letter for the gap.
  3. Complementary user entity controls (CUECs). These are the provider stating which of its controls only hold if you do your part. Map each one to a control you actually operate: this is the real work, and the step most teams skip.
  4. Exceptions. Read the exceptions and any qualified opinion, not just the unqualified paragraph.
  5. Subprocessors. The colo landlord or hardware vendor may be carved out of scope. Check the subprocessor list and the DPA.

Failure modes worth naming: treating certification as continuous compliance (ISO 27001 is point-in-time with surveillance audits, not a live guarantee); scope drift when you adopt a new service under an old report; CUECs never mapped, which voids the provider's controls for your workload; and your own edge sites left out of the audit universe entirely. Google's shared-fate framing pushes the provider further into your outcome with secure defaults and blueprints, but it does not move the attestation burden off you.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-14

Draw the network-security responsibility boundary for a workload in a cloud VPC: which network controls the provider owns, which the customer owns, and why the line falls there for that workload?

Answer

Assume a three-tier web app on EC2 in one region: CloudFront and Route 53 in front, an internet-facing ALB, app tier in private subnets, RDS in a data subnet, NAT gateway for egress. The line falls at the elastic network interface. The provider owns everything below and around it; the customer owns every policy expressed through it.

Provider: physical datacenter and cabling, the backbone between regions and out to the edge, edge DDoS absorption (Shield Standard is on by default for every AWS account), the hypervisor and the virtual switch that enforces ENI isolation and evaluates security groups, and the managed infrastructure of ALB, NAT gateway and Route 53 itself. Customer: VPC CIDR and subnet layout, route tables, security groups, network ACLs, host firewalls (nftables, Windows Firewall), TLS certificate and termination settings, WAF rules, VPC endpoints, flow logs, egress policy.

Why there: the provider can guarantee isolation of the virtual network and the fabric because it builds both, but it cannot know your intended traffic policy, which ports, which peers, which direction. You cannot audit the hypervisor or the backbone, so you cannot be accountable for them. The mechanism is the provider's; the policy is yours. Security groups are the clean example: the provider's virtual switch evaluates them at the ENI, but the rules are your configuration and your liability. Azure draws the same line with NSGs, UDRs and Azure Firewall; Google Cloud with VPC firewall rules and Cloud Armor.

Trace a request: Route 53 → CloudFront edge (volumetric L3/L4 scrubbed here) → ALB listener (your certificate, your listener rules, your security group on the ALB) → target ENI → security group (stateful, return traffic implicitly allowed) → subnet NACL (stateless, must allow both directions including ephemeral ports 1024-65535) → host firewall → app.

layerownerartefact that proves it
physical network, backbone, edge scrubbingproviderShield Standard, SOC 2 report via Artifact
virtual switch, ENI isolationproviderhypervisor, no customer visibility
VPC, subnets, route tablescustomerTerraform state, Config rules
security groups, NACLs, host firewallcustomerrule review, VPC Flow Logs
TLS termination, WAF rulescustomerACM certificate, WAF logs

Failure modes. A NACL that allows inbound 443 but not the return ephemeral range: connections hang in one direction only, visible in flow logs as REJECTs on the return path. A security group opened to 0.0.0.0/0 on 22: the provider will not stop it. Overlapping CIDRs after a peering or VPN attach: silent blackhole, no provider alarm. And the common one: assuming Shield Advanced is protecting you when only Standard is on. Standard absorbs commodity L3/L4 floods; a 200k req/s L7 flood of well-formed requests reaches your ALB and is yours to absorb with WAF rate-based rules and scaling. Illustrative: at 2 KB per request that is roughly 400 MB/s you pay to serve while you tune the rule.

Detect with VPC Flow Logs, AWS Config or Azure Network Watcher, and provider DDoS reports. Write the split into the runbook so on-call does not open a provider ticket for a security-group mistake.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-24

Define responsibility for cloud logging and forensic evidence.

Answer

What I'd say in the first two minutes

The split is: the provider secures the cloud, you secure what's in it, and the forensic consequence is that the default posture cannot reconstruct an incident. On AWS the only thing you get without asking is CloudTrail management events, with 90 days of history in the console. Data events, VPC Flow Logs, S3 server access logs, ELB access logs, RDS audit logs and EKS control-plane audit logs are all off until someone enables them. So responsibility is: you own enabling, exporting, retaining and proving the integrity of customer-side evidence; the provider owns the physical and control-plane internals you never see directly, and for those you get attestations (SOC 2 Type II via AWS Artifact) plus a support and legal escalation path.

Assumptions: one AWS Organization, several accounts, a dedicated log-archive account, and an incident that may surface more than 90 days after it happened.

What is actually on by default

SourceDefaultRetention if untouchedWhere it should land
CloudTrail management eventsOn in every account90 days (Event history)Org trail → S3 in log-archive account, Object Lock
CloudTrail data events (S3 objects, Lambda Invoke)OffnoneSame trail, advanced event selectors
VPC Flow LogsOffnoneS3, 1-min or 10-min aggregation
S3 server access logsOffnoneS3
ALB/NLB access logsOffnoneS3
RDS audit (pgaudit, MariaDB audit plugin)OffnoneCloudWatch Logs, then export
EKS control-plane auditOff per log typenoneCloudWatch Logs
CloudWatch Logs groupsOn, retention "Never expire"infinite, but often set to 7 daysExport to S3 past a year

Trade-offs, and what decides them

Org trail in a dedicated account vs per-account trails. Deciding criterion: can a compromised workload account delete its own evidence? With an Organization trail, member accounts cannot stop it, and an S3 bucket policy plus Object Lock in compliance mode makes the objects undeletable even by root. Cost is cross-account policy complexity.

CloudTrail Lake vs S3 + Athena. Criterion: how often you query. Lake gives SQL over up to 10 years with no infrastructure, billed per GB ingested and scanned. S3 + Athena is cheaper to store, slower to first query, and you own the partitioning. Query once a quarter, use Athena; query during every incident, use Lake.

Data events on vs off. Criterion: cost per event against whether the bucket holds regulated data. S3 data events run $0.10 per 100,000 events, so a bucket doing 100M object operations a day costs roughly $100/day (~$3,000/month) to log: illustrative arithmetic, not a quote. Enable them on the buckets holding PII/PHI, not on every bucket.

Failure modes and how you catch them

  • Data events off by default: an S3 GetObject exfiltration leaves no CloudTrail record. Detect by comparing S3 server access logs against CloudTrail coverage, and alarm when a bucket tagged sensitive has no data-event selector.
  • 90-day Event history: an incident found on day 100 has nothing in the console. Detect by aws cloudtrail describe-trails returning empty, or the trail's bucket having no new objects in the last hour.
  • Trail silently stops delivering when the bucket policy breaks or the bucket is deleted. Detect with alarms on StopLogging, DeleteTrail and PutBucketPolicy events, the AWS Config rule cloudtrail-enabled, and an hourly canary object check.
  • Clock skew breaks correlation. Detect by comparing CloudTrail eventTime to application timestamps; EC2 instances should use the Amazon Time Sync Service at 169.254.169.123.
  • Tampering. Detect with CloudTrail digest files (hourly, SHA-256 plus RSA) and aws cloudtrail validate-logs; compliance-mode Object Lock blocks deletion even by root.
  • Provider internals are unavailable. You cannot detect this: you record it. Pull the SOC 2 Type II report from AWS Artifact, open a support case for provider-side evidence, and mark hypervisor and control-plane internals as outside your visibility in the timeline.

Worked trace: a role reads 40k objects from a PII bucket

Management events, on by default, give you AssumeRole in the reader account at 02:14:07Z, the userIdentity.sessionContext for the assumed role, and sourceIPAddress 203.0.113.44. Data events, off by default, would have given you the 40,000 GetObject calls with object keys; S3 server access logs, also off, would have given you the keys too. So the timeline you can defend ends at "the role was assumed from this IP." The object list is an evidence gap you write down, not a claim you make.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-1

Build a shared-responsibility matrix for a production workload.

Answer

The 90-second answer. A shared-responsibility matrix is a control-by-control ownership map, not an architecture diagram. For each control, name who operates it (AWS inherited, customer implemented, or a handoff where both act) plus the evidence that proves it is working and the signal that fires when it stops. Build it from data flows and trust boundaries: the boundary is where data leaves your account for a provider's.

Assumptions: multi-tenant SaaS API on AWS (EKS compute, RDS Postgres, S3, ALB) in us-east-1 and eu-west-1. Stripe for payments, Datadog for monitoring. SOC 2 Type II; PCI DSS on the payment flow.

ControlProviderCustomerHandoffEvidenceFailure signal
Compute isolation (EKS)Hypervisor, hosts, EKS control plane (API server, etcd)Worker node AMIs, kubelet config, pod security, NetworkPolicies, IRSAControl plane patched by AWS; node AMI updates are yours even on managed node groupsAWS SOC 2 Type II via Artifact; your CIS EKS benchmark scanSSM Patch Manager compliance shows nodes missing patches
Storage encryption (RDS)Encrypts EBS volumes and snapshots under the KMS key you nameMust set encryption at creation: it cannot be enabled later; owns CMK key policyaws/rds managed key rotates annually on a fixed schedule; a CMK rotates on the period you set (default 365 days)Config rule rds-storage-encrypted; KMS key rotation eventsConfig rule NON_COMPLIANT; CloudTrail CreateDBInstance with StorageEncrypted absent
Object access (S3)Storage infrastructure, default SSE-S3Bucket policy, Block Public Access, ACLs disabled, TLS-only policyAWS applies default encryption; you confirm it and block public accessConfig s3-bucket-public-read-prohibited; S3 server access logsGuardDuty Policy:S3/BucketPublicAccessGranted
Identity (IAM)IAM service and credential infrastructureRoles, permission boundaries, MFA, key rotationAWS runs Access Analyzer; you triage and act on findingsAccess Analyzer findings; CloudTrail AttachRolePolicyFinding with findingType: ExternalAccess on a role you believed was internal
Payment flow (Stripe)PCI DSS Level 1 service provider; tokenization, card vaultKeep card data off your servers; use Stripe.js/Elements; verify webhook signaturesStripe tokenizes; you verify the Stripe-Signature header and reconcileStripe SOC 2 report; your PCI SAQ AWebhook endpoint returning 401s in the Stripe dashboard

Trace: encrypting RDS after the fact. An instance created without StorageEncrypted cannot be encrypted in place. No modify call does it. The path is: snapshot the instance, copy the snapshot with encryption enabled and a KMS key, restore a new instance from the encrypted copy, repoint the application, delete the original. rds-storage-encrypted stays NON_COMPLIANT for the original throughout, so that finding is expected during the migration, not a new incident. In Terraform, storage_encrypted = true forces replacement, so plan the cutover rather than applying blind.

Failure modes.

  • Drift: someone disables S3 Block Public Access on a bucket holding exports. Detected by s3-bucket-public-read-prohibited going NON_COMPLIANT or GuardDuty Policy:S3/BucketPublicAccessGranted. First action: re-enable the block, then read S3 access logs for GETs from outside your VPC endpoints before assuming nothing was read.
  • Unowned handoff: node patching. Platform and service teams each assume the other updates the AMI. Detected by SSM Patch Manager showing instances with missing patches past the baseline's auto-approve window. First action: name an owner in the matrix, patch, then pin the AMI ID in the Terraform module so the next update is a code change.
  • Stale attestation: the SOC 2 report you rely on covers a period that ended more than 12 months ago with no bridge letter. Detected by reading report dates in AWS Artifact: nothing automated catches this. First action: request the current report; if procurement cannot produce it, the control is unverified and the matrix should say so.

Trade-off: managed RDS vs Postgres on EC2. Managed gives automated backups with PITR, Multi-AZ failover, minor-version patching, and KMS-backed encryption; you configure parameter groups, security groups, and the key. Self-managed gives superuser, any extension, and control of the Postgres build, at the cost of owning replication, failover, backup verification, and patching. Two questions decide it: do you need an extension or superuser access RDS will not give you, and does someone own database operations as a job rather than a side task? No to both, take managed. Yes to either, self-managed is defensible: budget the on-call.

Keep it live. Version the matrix in the same repo as the infrastructure, and re-review it when a provider changes its split (AWS moves something from customer to provider, or a certification lapses) or a contract changes. An unreviewed matrix is worse than none: it tells you a control is covered when nobody has checked.

Curated: · Written: · Reviewed:

Difficulty: Medium
Q&A-10

Map data protection responsibilities in a managed cloud service.

Answer

Assumptions I'd state up front: multi-tenant SaaS on AWS, EU customer PII in S3 and RDS, you are the processor and your customer is the controller, and enterprise buyers will send you a security questionnaire before signing.

Core answer (first 90 seconds). The split is not "provider does security, we do policy." It is: the provider protects the substrate. Physical, hypervisor, managed-service control plane, and encryption at rest by default. You own every decision about who may process which data: classification, tenant isolation, key custody, authorization, retention, deletion, and breach notification. The decision that moves the most responsibility is key custody. Accept SSE-S3 and AWS holds the key and can decrypt on your behalf. Use SSE-KMS with a customer-managed key and every Decrypt becomes a CloudTrail event you can alarm on, and you can revoke all access by disabling the key. That is the line an auditor asks you to draw.

LayerProvider ownsYou own
Host, hypervisor, managed control planeAWS—
Encryption at rest defaultSSE-S3 AES-256 on every new object since 5 Jan 2023Choosing SSE-KMS CMK where the data warrants it
Key custodyKMS HSM, key material durabilityKey policy, grants, rotation, deletion schedule
IdentityIAM engineRoles, permission boundaries, tenant scoping
RetentionVersioning and Object Lock primitivesRetention periods, legal hold, delete propagation
SubprocessorsPublishes the listReviewing changes, DPA flow-down, notifying your customers
BreachCloudTrail and GuardDuty signalsDeciding notifiability, running the 72-hour GDPR clock

Trade-offs. SSE-S3 is free and zero-effort but gives you no per-object access control. SSE-KMS with a CMK gives you that control at the cost of a KMS call per GET, unless you enable S3 Bucket Keys, which AWS documents as cutting KMS request cost by up to 99%. SSE-C and client-side encryption put key material entirely outside AWS, which is what some regulators demand and what breaks every server-side feature that needs to read the bytes. On tooling: Macie, GuardDuty and Config rules cover AWS-native stores cheaply; a third-party DSPM earns its price only if you also hold data in SaaS apps and another cloud and need one evidence pane.

Failure modes worth naming. Cross-region replication ships objects but not deletes unless DeleteMarkerReplication is enabled: it is off by default, so a "deleted" record survives in the replica; catch it by comparing object counts per region. A KMS key scheduled for deletion has a 7–30 day waiting window (default 30) and a mis-scoped automation can schedule it, making data permanently unreadable; alarm on ScheduleKeyDeletion. RDS automated backups expire at the retention setting (0–35 days, default 7) while manual snapshots live until deleted, so "we delete after 30 days" is false in one direction and your storage bill is wrong in the other. EBS snapshots outlive the volumes they came from. And a provider's subprocessor list can change inside your contractual objection window with nothing watching it.

Exit. Price egress before you promise portability, use Snowball for bulk, and get a certificate of deletion that covers replicas and backups, not just the primary bucket.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-11

Map identity and access responsibility across a federated cloud tenant.

Answer

Assumptions: one cloud tenant (AWS Organizations with IAM Identity Center, or an Entra tenant), one enterprise IdP, human console access plus machine workloads. With multiple IdPs or tenants, the split below repeats per trust.

The split. The provider owns the IAM control plane: its availability, the correctness of SAML/OIDC validation, token issuance, and the audit log. You own every configuration on top of it: the trust, the attribute mapping, the roles, the lifecycle, the review. The IdP is a third dependency with its own availability, signing keys, logs and incident duties. Nobody owns "identity" alone; the boundary is the seam between the three.

LayerProviderYouIdP
Trust configValidates assertions, publishes SP metadataRegisters IdP metadata, sets audience/entity IDSigns assertions, publishes metadata
Lifecycle—Assigns permission sets/rolesAuthoritative user store, SCIM source
Auth strength—Session duration, SCPsMFA, conditional access
EvidenceCloudTrail / Entra sign-in logsCorrelation, drift detectionIdP audit log

How the trust actually works. A console login redirects to the IdP, which authenticates (MFA, conditional access) and returns a signed SAML assertion carrying a NameID and a role or group attribute. The cloud validates the signature against the IdP's signing certificate, checks the audience matches its own SP entity ID, checks NotBefore/NotOnOrAfter, then maps the attribute to a permission set and issues a role session: IAM Identity Center's default session is 1 hour, configurable up to 12. Each of those steps is a place you can break login for the whole tenant.

Trade-offs. SAML for human console access (what IAM Identity Center and Entra enterprise apps speak); OIDC for workloads, where you want short-lived tokens and no stored keys. Federated-only access removes standing credentials but turns an IdP outage into a total lockout, so keep one or two break-glass accounts, sealed and alerted. Central permission sets beat per-account roles when you have many accounts and can enforce SCPs; per-account roles win when teams need autonomy and you can't.

Workload identity trust, with the condition that stops a confused deputy:

JSON
{"Effect":"Allow",
 "Principal":{"Federated":"arn:aws:iam::123456789012:oidc-provider/token.actions.githubusercontent.com"},
 "Action":"sts:AssumeRoleWithWebIdentity",
 "Condition":{"StringEquals":{
   "token.actions.githubusercontent.com:aud":"sts.amazonaws.com",
   "token.actions.githubusercontent.com:sub":"repo:acme/deploy:ref:refs/heads/main"}}}

Drop the sub condition and any repo in any GitHub org can assume the role.

Failure modes and how you see them.

  • IdP signing certificate rotated without updating SP metadata: every federated login fails with a signature-validation error. Detect on the login-failure rate and AssumeRoleWithSAML errors in CloudTrail, not on a user ticket.
  • SCIM deprovisioning lag: Entra ID's provisioning cycle runs on the order of 40 minutes, so a leaver keeps access for that window. Detect with a reconciliation job diffing IdP active users against cloud assignments.
  • Break-glass account used routinely: alert on its sign-in; if it fires weekly it isn't break-glass.
  • Permission-set drift: someone attaches an inline policy to the mapped role. Detect with IAM drift detection or a CI diff against IaC.

Provider support access is a scoped, customer-approved role and its use is logged: treat it as a reviewable identity, not a background fact.

The answer in one line: the provider runs the IAM control plane, the IdP authenticates and owns the user store, and you own the trust, the mapping, the lifecycle and the evidence that ties them together.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-12

Review a serverless architecture through shared responsibility.

Answer

Core answer

Assume the architecture is API Gateway → Lambda → SQS → Lambda → DynamoDB on AWS, with Secrets Manager holding the credentials. The split is not "provider owns the servers, you own the code." It is: the provider owns everything up to and including the runtime interface; you own everything you ship through it, plus every decision that changes what the provider's guarantees mean for you.

AWS patches the Lambda execution environment: the OS, the kernel, the language runtime binary. You own the dependency layer inside your deployment package. That is why a Node 16 function keeps running after Node 16 reaches end of support: the provider will not upgrade your runtime for you, it deprecates it and eventually blocks new deployments. The same line explains the rest. You own the execution role's permissions, the secrets you inject, the event payload you accept, and the side effects you trigger downstream.

Where the boundary moves

The line is not fixed. It moves with how much of the stack you ship.

DeploymentProvider patchesYou patch
LambdaOS, kernel, runtime binarydependencies, runtime version choice
Fargatehost OS, kernelbase image, OS packages inside the image
EC2, self-managedhypervisor, hardwarekernel, OS, runtime, everything

Deciding criterion: how much of the guest OS you need to control. If you need a custom kernel module or a pinned glibc, Lambda is out and Fargate is the floor. If you only need to run code on a trigger, Lambda removes the most patching surface and you should take that.

Failure modes and how you see them

  • Duplicate delivery. SQS standard is at-least-once. A visibility timeout shorter than your function's runtime means the message is redelivered while the first invocation is still running. Detection: CloudWatch NumberOfMessagesReceived exceeding NumberOfMessagesSent, or a rising duplicate-key error rate on your DynamoDB writes. Fix: idempotency key on the write, visibility timeout at least 6× p99 function duration.
  • Throttling. Default account concurrency is 1,000 per region. When it is exhausted, Lambda returns 429 and API Gateway surfaces 502/504 to callers. Detection: the Throttles metric on the function. Fix: reserved concurrency on the critical function, or a queue in front of it.
  • Overprivilege. An execution role with s3:* on * means a compromised dependency can read every bucket. Detection: IAM Access Analyzer findings, or CloudTrail events from a role that never used that action before.

Trace: duplicate delivery

SQS visibility timeout is the default 30 s. The function's p99 is 45 s. Message M1 is received at t=0 and becomes invisible until t=30. At t=30 the function is still running, so SQS makes M1 visible again; a second poller picks it up at t=31 and starts a second invocation. Both reach DynamoDB, at t=45 and t=46. Without a guard you get two rows. With ConditionExpression: attribute_not_exists(orderId), the second write fails with ConditionalCheckFailedException, which you catch and treat as success. The metric that would have caught this before a customer did is NumberOfMessagesReceived > NumberOfMessagesSent on the queue.

What to say if pushed

If the interviewer asks who owns the runtime CVE, the answer is: the provider, for the runtime binary, and you, for the runtime version you pinned. If they ask about a Lambda in a VPC, the boundary does not move, the provider still owns the host, but you now own the NAT gateway, route tables and the egress cost, and cold starts lengthen because the ENI attach is on your path. That is the pattern to hold onto: the provider's line is stable, your obligations on top of it are not.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-13

Assess a marketplace appliance or managed partner service.

Answer

Answer first. A marketplace listing is a distribution channel, not a control plane. Buying through AWS Marketplace gets you consolidated billing, metering and a pre-listing scan; it does not transfer the publisher's security program to you, and it does not extend AWS's own attestations or SLA to third-party software. Assess four things in this order: who operates each layer, what evidence you will accept for it, what you can enforce technically rather than contractually, and what you do the day the publisher fails to patch.

Assumptions. An AWS Marketplace AMI or SaaS listing; you are the customer; the workload touches regulated data; you can change your own VPC, IAM and network controls but not the publisher's code.

Map the parties before you read a single attestation.

PartyOperatesEvidence to demandWhat you enforce
AWSlisting, billing, metering, pre-listing AMI scanlisting terms, scan result, Vendor Insights security profileSCPs, CloudTrail, PrivateLink endpoint policy
Publisher (ISV)the appliance, its updates, its supportSOC 2 Type II, pen-test summary, SBOM (SPDX or CycloneDX), patch SLA, DPApinned AMI ID, ECR image digest + cosign verify
Subprocessortelemetry, backend SaaS, support toolingsubprocessor list, Art. 28 terms, processing regiondefault-deny egress, VPC endpoints, DNS firewall
YouOS patching, IAM, data, configyour own Config and Inspector findingsSSM Patch Manager, GuardDuty, Config rules

The AWS SOC 2 report covers AWS. It says nothing about the ISV's build pipeline. Ask for the ISV's own report and read the subprocessor list: that is where the fourth party hides.

Trace a critical CVE. Day 0: NVD publishes CVSS 9.8, EPSS 0.4. Day 2: added to CISA KEV. Your Amazon Inspector finding fires on the EC2 instance and your SBOM diff names the bundled component. The publisher's contract says 30 days for critical. If they are at day 21, you have two options: wait, or mitigate. Mitigation is a security-group change plus draining the node, and that costs capacity. Illustrative figures: if each node serves 400 rps at p99 120 ms and peak is 900 rps, three nodes give 1200 rps and you survive losing one; two nodes give 800 and you do not. Size for N+1 before the incident, not during it.

SLA arithmetic. A seller SLA of 99.9% monthly is 43 min 12 s of allowed downtime. AWS's multi-AZ EC2 SLA of 99.99% is 4 min 19 s. The marketplace does not close that gap; the seller's service credit is your only remedy, and it is usually a percentage of the monthly fee, not of your revenue.

Trade-offs. A managed partner service wins when the publisher's patch latency beats yours and the data is not the differentiator. A self-hosted appliance wins when you need to control the update channel or the data cannot leave your VPC. Do not buy when: there is no BAA or Art. 28 DPA for the data class you hold; the appliance needs broad egress you cannot scope; or the export path is a proprietary dump you have not tested.

Failure modes and how you see them.

  • Silent patch lag. Signal: Inspector finding age exceeds the contracted SLA. Detect by diffing your SBOM against the publisher's advisory feed weekly.
  • Support access that outlives the ticket. Signal: CloudTrail AssumeRole events from the vendor's account outside the ticket window. Require an ExternalId and a time-boxed role.
  • Exit lock-in. Signal: the export takes longer than the restore. Test the export into a sandbox before you sign, not at renewal.
  • Confused deputy. Signal: a trust policy with a wildcard principal. Reject it.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-20

Map shared responsibility for AI services in the cloud.

Answer

Assume a regulated enterprise on a hyperscaler, and the question is where the line sits. The line moves with the service model, so name the model first, then split the controls.

Four models, four different lines.

GPU infrastructure: EC2 P5, GCP A3, Azure ND H100 v5. The provider owns the physical host, the hypervisor, the network, and the GPU's health. You own the OS, the CUDA and driver stack, the serving framework (vLLM, TGI), the weights, and every safety control. Nothing is defaulted for you.

Managed model API: Azure OpenAI Service, Amazon Bedrock, Vertex AI. The provider owns model hosting, scaling, base weights, and safety filters that are on by default. Azure OpenAI content filtering ships on across four harm categories; Bedrock Guardrails redact PII and block denied topics. You own what you send, who can call it, prompt and application security, output validation, and lawful use.

Managed training: SageMaker, Vertex AI Training, Azure ML. The provider owns cluster orchestration and spot handling. You own the data, the container, the hyperparameters, the checkpoint storage, and the behavior of the model you produce.

SaaS with embedded AI: M365 Copilot, GitHub Copilot. The provider owns the model and the app. You own identity, permissions, and DLP, because the AI inherits the calling user's access. That inheritance is the whole game there.

ModelProvider ownsYou ownDefault worth knowing
GPU IaaSHost, hypervisor, network, GPU healthOS, drivers, serving stack, weights, safetyNone: no safety defaults
Managed APIHosting, scaling, base weights, safety filtersData sent, access, prompt security, output validationAzure OpenAI: no training on your data; abuse logs kept up to 30 days, opt-out on approval. Bedrock: prompts not stored or logged by default
Managed trainingOrchestration, spot handlingData, container, hyperparameters, checkpoints, resulting modelVertex and SageMaker: no training on your data by default
SaaS AIModel, appIdentity, permissions, DLPCopilot inherits the user's existing permissions

Hosted API versus self-hosting. Hosted API: ship in days, the provider handles scaling and safety defaults, but you inherit model-version churn, Azure OpenAI retires model versions on a published schedule, and token-per-minute quotas. Self-hosting on GPU VMs: full control of weights and data path, but you own the entire stack and pay for idle time. An H100 p5.48xlarge is roughly $98/hr on-demand in us-east-1 (list, mid-2024), about $70k a month if left running. The deciding criteria are data residency and regulatory constraints, whether you need weight-level control, request volume and burstiness, and how much version churn you can absorb.

Failure modes and how you detect them.

Prompt injection leading to data exfiltration: detect with canary tokens in the context and egress DLP. Blast radius is whatever the app's service principal can read, so scope it to least privilege.

Silent model version change: detect with a golden-set eval on every deployment change, and pin a version with a deprecation calendar. Blast radius is every downstream consumer of that endpoint.

Cross-tenant leakage: you cannot test it directly. It is a residual risk covered by SOC 2 or ISO 27001 assurance, or mitigated by single-tenant deployment.

Unsafe automation: an agent with write access takes an irreversible action. Detect with approval gates and action logging. Blast radius is everything the agent's credentials reach.

Retain provider assurance, but own application impact, monitoring, incident handling, and fallback.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-25

Resolve customer misconfiguration enabled by an unsafe service default.

Answer

Assumption I'd state first: the customer's S3 bucket is serving objects to the internet because of a bucket policy they wrote, and the account-level Block Public Access setting was off. That was the default for accounts created before April 2023; AWS turned Block Public Access on and disabled ACLs by default for buckets created from April 2023. The same customer action is safe on a new account and unsafe on an old one: that asymmetry is the unsafe default.

Answer: contain with a control that doesn't depend on the customer's change process, measure what was actually read, then split the root cause into customer-owned and provider-owned parts and run them on separate tracks.

Contain. Don't edit the customer's bucket policy. Apply account-level Block Public Access:

Shell
aws s3control put-public-access-block \
  --account-id 111122223333 \
  --public-access-block-configuration \
  BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true

RestrictPublicBuckets=true makes S3 ignore the existing public policy for anyone outside the account without deleting it, so the customer's Terraform state doesn't drift and the evidence survives. BlockPublicPolicy=true makes later PutBucketPolicy calls that grant public access fail with AccessDenied, which stops the customer re-opening it mid-conversation.

Account-level, not bucket-level: the misconfiguration is a class. Whoever copied that policy into one bucket copied it into the rest of the module.

Measure exposure. CloudTrail data events or S3 server access logs, filtered to GetObject where the requester is outside the account: distinct objects, bytes, first and last timestamp. IAM Access Analyzer for S3 gives the externally-shared bucket list immediately, before logs are parsed. Check versioning, if it was off, deleted objects are gone.

Split the root cause. Customer side: the policy is in their IaC, their review approved it, the bucket has no owner tag. Provider side: the default. Escalate the provider side with a reproducible case (account ID, account creation date, the exact API call, the observed result) not "your default is unsafe."

Options, and when each is right:

optioneffectcost
Edit the bucket policydurable, matches their IaCneeds their change window; destroys the evidence of what was public
Bucket-level Block Public Accessfast, scopedmisses sibling buckets
Account-level Block Public Accessfast, covers the class, one call to reversemasks the misconfiguration; their IaC still says public
Delete the bucketstops exposure nowdestroys evidence, breaks the customer

Account-level is right when you don't yet know the blast radius. Bucket-level is right when the account is shared and you can't touch other teams' buckets.

Failure modes.

  • Bucket-level only → a sibling bucket is public next week. Detect with the AWS Config managed rule s3-bucket-public-read-prohibited evaluated across the account.
  • Deleting the policy instead of blocking → you can't reconstruct what was exposed. Detect: no CloudTrail record of the original PutBucketPolicy.
  • Closing after containment → the customer's next terraform apply re-creates the public policy wherever Block Public Access isn't managed in their IaC. Detect: diff their plan against the account's Block Public Access state.

Communicate the two causes separately in writing: what the customer must fix (policy, review, ownership) and what the provider owes (default change or a guardrail), with the provider ticket tracked to a response.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-7

Design reliability under the shared-responsibility model.

Answer

What a strong candidate says in the first two minutes

Before designing anything I pin three numbers with the business: RTO, RPO, and the availability target for the user-facing path. Say 99.95% monthly, which is a 21.6-minute error budget. Then I split the stack by who owns which failure. AWS owns the platform: hypervisor, AZ power and cooling, and the redundancy inside a managed service. I own everything above the API boundary: my configuration, my redundancy choices, my timeouts and retries, my data, my recovery. The SLA is a credit, not a recovery control: RDS Multi-AZ's 99.95% SLA refunds a slice of the bill, it does not restore my database. So the real question is: given the provider's published behavior, what do I have to build to hit my number?

Do the arithmetic before choosing redundancy

A three-tier path in one region: ALB (99.99% SLA) → EC2 (99.99%) → RDS Multi-AZ (99.95%): composes in series to 0.9999 × 0.9999 × 0.9995 ≈ 99.93%, about 30 minutes of downtime a month. That misses a 99.95% target (21.6 min) even though every component is individually compliant. The fix is either removing a serial dependency or adding a redundant path, not buying a better SLA.

Who owns what

LayerProvider ownsI ownEvidence I check
AZ power/networkAWS—AWS Health Dashboard, SLA
DB redundancyMulti-AZ failover mechanismenabling Multi-AZ, replica-lag alarmsRDS events, ReplicaLag metric
Data durabilityS3's 11 ninesversioning, Cross-Region Replication, lifecycleS3 SLA, replication metrics
IdentityIAM availabilityleast privilege, break-glass, key rotationCloudTrail
Recoverysnapshot storagerestore drills, measured RTOAWS Backup job reports

Trade-offs and when a choice is wrong

Recovery strategies trade RTO against cost: backup/restore (RTO hours, cheapest), pilot light (tens of minutes), warm standby (~2× steady-state cost, RTO minutes), active-active multi-region (RTO seconds, 2–3× cost plus cross-region data transfer and conflict resolution). The deciding criteria are RTO/RPO, the data consistency model, and blast radius. Active-active is the wrong answer for a single-writer relational database with no conflict resolution: you get split-brain, not availability. Aurora Global Database is the right shape there: documented RPO around 1 second and RTO under a minute via managed promotion.

Failure modes and how I detect them

Control-plane failure is the one people miss. In the December 2021 us-east-1 event the data plane kept serving, but EC2 launches, IAM changes and the console failed, so Auto Scaling could not replace instances. Detect it with AWS Health events and CloudWatch Synthetics canaries on the user path, not just host metrics. Quota exhaustion is the second: a regional failover that needs 200 new instances dies on Service Quotas (default 5 Elastic IPs per region, default Lambda concurrency 1,000), not on capacity. Alarm on quota utilization. Third is customer configuration error: an S3 bucket policy or security group that only exists in the primary region.

Test it, don't assert it

Run an AWS Fault Injection Simulator AZ-power experiment, then a restore drill that measures actual RTO from snapshot to serving traffic, and a Route 53 Application Recovery Controller routing-control failover for the region. Reconcile the measured numbers against the objectives; if the drill takes 40 minutes and the RTO is 15, the design is not done.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-19

Use shared responsibility in a cloud threat model.

Answer

Assumptions I'd state up front: a multi-tenant public cloud (AWS, Azure or GCP), the customer is the tenant, and the model covers one workload and its data rather than the whole account. Shared responsibility is a control-ownership map, not a security guarantee.

Core answer. For every asset and trust boundary, list the threats, then for each control answer four questions: who supplies the capability, who configures it, what evidence proves it is on right now, and who responds when it fails. The rows that matter are the ones where the provider supplies the capability and the customer configures it: S3 Block Public Access, IAM policies, security groups, KMS key policies. That is where breaches actually land. Where the provider owns the layer outright (hypervisor, control plane, physical site) you cannot monitor it, so the mitigation is assurance plus architecture, not a dashboard.

LayerThreatProvider suppliesCustomer configuresEvidence
Object storageBucket readable from the internetS3 encryption, Block Public Access capabilityBucket policy, ACLs, account-level BPA (on by default for buckets created after April 2023, with ACLs disabled)AWS Config rule s3-bucket-public-read-prohibited; CloudTrail PutBucketPolicy
IdentityStolen long-lived access keyIAM, STS, MFARole trust policies, key rotation, permission boundariesCloudTrail AssumeRole events; IAM credential report
Hypervisor / cross-tenantOne tenant reads another's memoryNitro isolationNothingAWS Artifact SOC 2 report: no customer telemetry exists
Management planeAttacker creates a new admin roleControl-plane APIsCloudTrail (management events on by default with 90-day history; data events off and billed separately)CloudTrail event history
Support channelHelp desk resets MFA for an attackerAzure Customer Lockbox, Google Access ApprovalEnable them; restrict who can approveLockbox request log
Third partySaaS vendor's cross-account role—External ID, scoped trust policyCloudTrail events carrying the vendor's principal

Worked trace, who actually decides. A role whose identity policy allows s3:GetObject calls GetObject over plain HTTP on a bucket whose policy contains a Deny for aws:SecureTransport: false. Evaluation order: SCPs. No deny. Identity policy: Allow. Bucket policy: explicit Deny. Explicit deny beats any allow, so the call returns 403 even though the identity policy grants it. The provider wrote the evaluation engine; the customer wrote both policies; the failure is a customer configuration bug the provider's defaults cannot catch.

Failure modes.

  • Cross-tenant isolation failure. ChaosDB (Wiz, August 2021) exposed Azure Cosmos DB primary keys through a misconfigured Jupyter Notebook container. No customer telemetry would have shown it; an external researcher found it. For provider-internal layers, buy assurance (SOC 2 / ISO 27001 through AWS Artifact, Access Transparency logs on Google Cloud) and hold a compensating control and an exit plan.
  • Control-plane outage. On 7 December 2021 an automated scaling activity inside AWS's internal network put the Kinesis Data Streams control plane in us-east-1 into a loop. Existing streams kept serving data, but create/update/delete failed and dependent services cascaded. Any runbook step needing a control-plane call (adding a node group, rotating a certificate through the API) is unavailable exactly when you need it. Keep a data-plane-only path.
  • Support-channel abuse. In 2023 Scattered Spider used help-desk social engineering to reset MFA and reach cloud tenants. FIDO2 hardware keys a help desk cannot reset, plus Customer Lockbox or Access Approval, remove that path.
  • Provider insider. Google Cloud Access Transparency logs Google personnel actions on your data; Azure Customer Lockbox requires your approval before Microsoft support reaches a resource; AWS states the Nitro System prevents anyone, including AWS operators, from accessing customer data on Nitro instances. These are the only evidence you get: cite them, never assume the probability is zero.

Decision rule. For each row, if you cannot produce evidence, it is an unmitigated risk with a named owner and a compensating control, not a checkbox. If the provider owns it and you cannot see it, the mitigation is contractual and architectural (data residency, customer-managed keys, an exit plan) and it goes into the risk register with everything else.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-15

Operationalize shared responsibility through policy as code.

Answer

Assumptions I'd state before anything else: one primary cloud, AWS, with 200 product accounts in a single AWS Organizations; SOC 2 plus a customer-facing data-residency promise; the shared-responsibility matrix already written and numbered. If the matrix isn't written, that's the blocker: policy as code without control IDs produces findings nobody owns.

Core answer: policy as code is the executable slice of the matrix, split by when it runs. Preventive rules run before the API call mutates state and can only deny. Detective rules run after, compare recorded state against the rule, and can page a human.

That split decides placement. An SCP is evaluated by Organizations before the service call, so a denied s3:PutBucketAcl never creates the object. An AWS Config rule reads the configuration item afterwards, so the bad state exists for the detection window: change-triggered rules usually fire within a few minutes of the item being recorded, periodic rules run on 1, 3, 6, 12 or 24 hour schedules, and Azure Policy re-evaluates on change plus roughly every 24 hours. So irreversible, reputation-shaped duties (public exposure, region, deleting the audit trail) go preventive; multi-variate or reversible ones (which KMS key, retention, tagging) go detective.

Binding a rule to the matrix takes five fields: control ID, enforcement point, owner, evidence sink, exception path. Skip the owner and findings never close. Skip the exception path and teams route around the rule.

Smallest rule I'd actually ship, in Rego for OPA 1.0+ (1.0 shipped December 2024 and made the if keyword required):

REGO
package guardrails.storage

deny contains msg if {
  some b in input.buckets
  b.acl == "public-read"
  msg := sprintf("bucket %s is public-read", [b.name])
}

deny contains msg if {
  some b in input.buckets
  not (b.region in data.approved_regions)
  msg := sprintf("bucket %s in %s; approved %v", [b.name, b.region, data.approved_regions])
}

Trace, with data.approved_regions = ["eu-west-1","eu-central-1"] and input:

JSON
{"buckets":[{"name":"logs-eu","region":"eu-west-1","acl":"private"},
            {"name":"assets","region":"us-east-1","acl":"public-read"}]}

Rule 1, b=logs-eu: acl is "private", not equal to "public-read", body fails, no message. b=assets: matches, so msg = bucket assets is public-read. Rule 2, b=logs-eu: "eu-west-1" is a member, not flips it false, body fails. b=assets: "us-east-1" is not a member, so msg = bucket assets in us-east-1; approved ["eu-west-1","eu-central-1"]. deny is a two-element set. Each rule body walks the whole array on its own: nothing is shared between rules, which is why a rule with a side effect would be a bug. CI runs this with conftest test plan.json, so the failure lands in about 20 seconds, at plan time.

Matrix row (customer duty)PreventiveDetectiveHow it fails
Data stays in EUSCP Deny * with StringNotEquals aws:RequestedRegion [eu-west-1, eu-central-1] on the product OU; same text against terraform plan in CIDaily check that every active account sits in an OU carrying that SCPSCPs don't apply to the management account and only 5 attach per OU by default; a new account parked at the root escapes silently
No public exposureOrg-level S3 Block Public Access plus SCP denies on s3:PutBucketAcl and public s3:PutBucketPolicyConfig rules s3-bucket-public-read-prohibited, s3-bucket-level-public-access-prohibitedA rule scoped by resource type quietly stops covering new types: alert on coverage, not just compliance
Encryption at restBucket policy denying unencrypted putss3-bucket-server-side-encryption-kmsSee the default-change case below; the old check now passes on everything
Audit trail survivesSCP deny cloudtrail:StopLogging, cloudtrail:DeleteTrailConfig rule cloud-trail-enabledA trail you deleted can't report the deletion, so the SCP is the guard for the detective control. S3 data events are off by default and billed separately, so object-level reads are unanswerable until enabled
Identity boundaryDeny iam:CreateRole unless the request carries the approved boundary ARNIAM Access Analyzer external-access findingsBoundary templates rot; the finding count plus closure time is the evidence

Staging and exceptions. Don't flip a rule straight to enforce. Sentinel has advisory, soft-mandatory and hard-mandatory levels; Azure Policy assignments accept enforcementMode: DoNotEnforce. Run a week permissive, count would-have-denied per team, then promote. Exceptions live in data, not in code: owner, ticket, expires, and a nightly job that fails when expires is in the past. SCPs have no such knob: an SCP exception means moving the account to another OU, which is permanent scope rather than a waiver. So keep SCPs for duties you'd never want exempted and put everything else in OPA or Azure Policy where an exception can expire.

Failure modes worth watching. A rule that suddenly finds nothing after a provider default change is a red flag, not a win: since 5 January 2023 S3 encrypts every new object with SSE-S3, so "is encryption on" now passes everywhere and measures nothing. Re-scope to KMS key and bucket key. And when the provider service changes semantics, regression-test with recorded real API responses replayed through the same policy, not hand-written fixtures.

Cost, because this is why scope matters. AWS Config list price in us-east-1 is 0.003 USD per configuration item recorded and 0.001 USD per rule evaluation for the first 100,000 evaluations per region per month. 200 accounts x 500 resources is 100,000 items, so one full recording pass is about 300 USD; 20 rules evaluated across that estate is 2,000,000 evaluations, which at the first-tier rate alone is 2,000 USD and only comes down with volume tiering. That's the argument for tag-scoping detective rules instead of shipping the whole catalogue to every account.

What never becomes a rule: hypervisor patching, physical security, the provider's own change control. You can't express them or observe them, so consume the SOC 2 or ISO 27001 report instead, and track the artifact, its audit period, an owner and an expiry: a calendar item, not a policy. Drift on customer-owned rules routes to the named owner with an SLA, and you verify remediation by re-running the same query that found it.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-22

Measure whether shared responsibility is working operationally.

Answer

What a strong candidate says first

Shared responsibility is working when every control has one accountable owner, the evidence behind it is current, and the boundary assumptions survive production. I'd measure that with outcome telemetry, not attestation counts.

Assumptions: mainstream IaaS/PaaS. I'll use AWS names, Azure and GCP map closely; Config/CloudTrail and a ticketing system exist; the audience is a quarterly operational review, not an audit.

The measures that matter

SignalWhat it tells youTriggerSource
Config drift rateCustomer-side baseline diverged from what's deployed>2% of in-scope resources non-compliant, or any non-compliant resource unowned for 24hAWS Config conformance pack / Azure Policy / GCP SCC
Exception ageControls being papered over instead of fixedp90 open exception >90 days → re-approval by the named ownerticketing
Restore / failover resultWhether the boundary holds under stressquarterly test; two consecutive misses of the target RTO → escalatebackup tooling
Quota headroomFailover-critical ceilings>80% of a Service Quota consumed → open a requestService Quotas API
Provider-case SLAWhether the escalation path is realtime to first human response vs plan (AWS Business 1h production-down, Enterprise 15m business-critical)support portal
Notification latencyProvider incident → internal ticket>15 minAWS Health API via EventBridge
Third-party currencySubprocessor assuranceany subprocessor without a SOC 2 Type II issued in the last 12 monthsvendor register

Segment every row by workload criticality and service model: a drift rate on a sandbox account and on a PCI workload are different numbers, and a managed database moves controls you'd otherwise own.

Why these, mechanically

Drift is the leading indicator because it usually means someone assumed the provider enforces a setting that is actually customer-side: key rotation, bucket policy, security-group egress. Exception age is the tell for an unowned control: a control that keeps getting an exception instead of a fix has no owner with budget. Restore and failover results are the only evidence the boundary holds under stress; a backup never restored is a hypothesis, not a control.

Trade-offs

Attestation versus telemetry. Provider compliance reports (AWS Artifact SOC 2, ISO 27001) are point-in-time and cover provider-side controls you cannot instrument: physical security, hypervisor patching. Continuous APIs cover customer-side controls you can. Use reports for annual assurance and for what you can't see; use telemetry for everything you can. Matrix completeness is not a score: it measures paperwork.

Failure modes and how you'd catch them

  • Boundary assumption drift: customer assumes the provider patches the managed runtime. Detect with EKS version skew or the ec2-managedinstance-patch-compliance-status Config rule. Cost: an open CVE window.
  • Silent quota ceiling: failover hits a quota nobody tracked. Detect with quota utilization >80%. Cost: failover fails during the incident.
  • Evidence expiry: a SOC 2 lapses mid-year. Detect by tracking Artifact report expiry dates. Cost: an audit finding and a blocked renewal.
  • Notification gap: a provider incident never reaches the on-call. Detect by reconciling Health events against incident tickets weekly. Cost: inflated MTTR.

What to put in front of the review

The top three provider/customer dependency risks, upcoming evidence expirations, and the decisions needed: each with an owner and a date.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-16

Prepare for a provider compliance report expiration or qualified finding.

Answer

First 90 seconds. A SOC 2 Type II report, an ISO/IEC 27001 certificate, a PCI DSS Attestation of Compliance or a FedRAMP authorization is evidence with a validity window, not a status. When it lapses or comes back qualified, every control in your matrix that cites it loses its support, and the risk it was covering becomes yours. So the first question is not "who do I notify": it is "which of my controls cite this report, and is the exception in a control I rely on, or in a complementary user entity control (CUEC) that was always my responsibility?" If it is a CUEC, nothing changed. If it is a relied-upon control, I have a bounded window, I use 30 days, to compensate, restrict scope, or accept the residual risk in writing with a named owner and an expiry date.

Why the mapping breaks. Your own report cites the provider's report as evidence for specific criteria: physical access for CC6.4, environmental protections and backup for A1.2, and so on. The external auditor tests whether that evidence covers the period under audit. A 12-month Type II period ending 2024-09-30 plus a bridge letter dated 2025-01-15 covers you to mid-January. If the successor report does not land until 2025-04-30, you have a 3.5-month window with no auditor opinion, and February fieldwork samples straight into it.

ReportValidityBridge mechanismWhat a lapse actually means
SOC 2 Type II12-month period (some 6 or 3)Bridge/gap letter from the provider covering the period to the current dateNo auditor opinion for the gap; your citation to it is stale
ISO/IEC 270013-year certificate, surveillance audits at roughly 12 and 24 monthsCertificate plus latest surveillance reportExpired certificate means no accredited certification, whatever the last audit said
PCI DSS AOC12 monthsAOC signed by a QSA or ISANo attestation of the cardholder data environment for the current year
FedRAMPAnnual assessment plus continuous monitoringMonthly ConMon deliverables, agency ATOLapsed ConMon means the authorization is no longer being maintained

Expired versus qualified. Expiry is a gap in time; a qualified opinion is a gap in effectiveness. Read Section III of the SOC 2 report, the tests of controls and results, and find whether the exception sits in a control you rely on. A qualified access-review control means the provider's review did not operate effectively for part of the period, so your CC6.2/CC6.3 reliance is unsupported until you compensate.

Failure modes.

  1. Stale citation caught in your own audit. The control matrix still points at the 2024-09-30 report; the auditor samples February 2025 and finds evidence outside the period. You get a qualified opinion on your own SOC 2, which then fails customer security reviews. Detect it with a quarterly evidence-date check against each cited report's period.
  2. Qualified control with no compensation. The provider's exception is in quarterly access reviews, performed in 2 of 4 quarters. If you rely on it and run no independent review, a terminated contractor's credentials stay live. Detect it from the provider's exception list, or from a breach investigation that traces back to it.
  3. Silent green. The dashboard still reads "compliant" because nobody updated the mapping. It surfaces when a customer's TPRM team asks for the current report: usually mid-deal, which is the expensive moment.

What would change my decision. If the exception is in a CUEC, or the provider already has a successor report in draft with a clean opinion, I stay and re-paper the mapping. If it is in a relied-upon control and no compensating control can be stood up inside 30 days, I restrict the data or workload scope or start exit planning. For EU financial-services workloads, DORA (applying since 17 January 2025) requires that provider to sit on my register of information with contractual exit provisions in place.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-17

Design provider support access and break-glass governance.

Answer

Assumptions first. Multi-tenant SaaS, customer data in a production account the customer owns, provider support engineers in three regions, SOC 2 Type II plus a contractual right to audit. If the provider owns the whole control plane and there is no account boundary, most of what follows is contractual rather than technical: say that in your first sentence, because it changes the design.

Core answer. Default deny. No provider engineer holds standing access to customer production data. Every access is just-in-time, tied to an open ticket, scoped to named resources, time-bounded, observable by the customer while it happens, and ended by expiry rather than by someone remembering to revoke it.

TierDefaultGrantTTLApprovalEvidence
Support metadatastanding, read-onlynonen/anoneprovider IdP log
Non-prod tenantnoneticket + role assumption8hprovider managerCloudTrail + SSM log
Prod data planenoneticket + customer OIDC role1h, one renewaltwo-person (provider + customer)session recording to customer S3
Break-glasssealed, no standingvault checkout with justification1h, no renewalone approver, retro review ≤24hpage to customer + recording

How a grant is issued. Provider engineers authenticate to the provider IdP with FIDO2/WebAuthn: no passwords, no shared accounts. The customer account trusts that IdP over OIDC and maps a group to an IAM role; there are no IAM users and no static access keys on the provider side. A small broker sits in front of sts:AssumeRole: it requires a ticket-ID claim, checks the ticket is open and assigned to the requester, then sets DurationSeconds. AWS STS accepts 900–43200 seconds, default 3600. Prod data-plane roles are capped at 3600 with one renewal, so the longest continuous window is two hours.

Break-glass trace. 02:14, prod is corrupting rows and the customer's on-call is asleep.

  1. Provider on-call opens a Vault checkout for breakglass-prod-ro, supplying ticket INC-4471 and a written justification.
  2. Vault policy issues a 1-hour STS credential scoped to that role only, DurationSeconds=3600, no renewal.
  3. Vault pages the customer's on-call and writes the checkout to the customer-owned audit bucket.
  4. The session runs through SSM Session Manager, port-forwarded to the DB host only; keystrokes and output log to S3 under Object Lock.
  5. 03:02 the session ends. The credential dies at 03:14 whether or not anyone acts.
  6. Next business day, post-access review. If the engineer copied a credential out of the session, rotate it: the recording tells you whether they did.

Trade-offs. Standing access versus JIT: standing cuts MTTR, JIT adds roughly 2–5 minutes to first response. Decide by blast radius, not convenience, if the provider can already read the data through the product's own API, a JIT shell adds ceremony without adding control. Customer-observed sessions versus provider-attested logs: customer-observed means the customer owns the log and the provider cannot edit it, which is the only version that survives an audit; it costs the customer a logging pipeline. CloudTrail event history keeps only 90 days, so ship to a customer-owned bucket with Object Lock and a retention you choose. Command-level logging (CloudTrail, SSM) is cheap and misses what happens inside an interactive shell; full session recording catches it and stores whatever secrets people type.

Failure modes and how you catch them.

  • Grants that never expire. The revocation job fails silently. Detect with a daily reconciliation of active grants against open tickets, alerting on anything past TTL. At 40 engineers × 3 grants/week, a 1% miss rate is ~1.2 stale grants a week: monthly reconciliation is too slow.
  • Break-glass used as a shortcut. Count invocations per quarter. More than two or three per provider per quarter means the JIT path is too slow; fix the path, not the people.
  • A log gap. The provider reaches the tenant through a path that doesn't emit to the customer log. Plant a canary record in the tenant; any read of it must appear in the customer log within minutes. If it doesn't, the pipeline is broken, not the canary.
  • Secrets inside recordings. Session recordings capture credentials typed into shells. Encrypt them, restrict who can read them, and set a retention shorter than the audit log's.

Subcontractors and jurisdiction. Subcontractor access inherits the same path (same IdP, same broker, same TTL) and the contract names who they are. Residency is enforced at the IdP: an EU tenant maps only to EU-based support groups, so a US engineer cannot be granted the role at all, rather than being told not to.

What to test. Expire a grant and confirm the credential is dead. Kill the broker and confirm no access path remains. Read the canary and confirm it lands in the customer log. Time a break-glass checkout end to end; if it's over five minutes, engineers will route around it.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-18

Plan cloud-service deprecation or responsibility shift.

Answer

First 90 seconds

Two different events hide behind this question, and the plan differs. A deprecation has a provider-set date and a named replacement. A responsibility shift has no date: a control moves out of the provider's column of the shared responsibility model and into mine. Most real ones are both. RDS for MySQL 5.7 reached end of standard support on 29 February 2024: after that AWS keeps it running only under extended support, which is simultaneously a deadline, a bill, and a set of controls I now own.

Assumptions I'd state before planning: ~40 AWS accounts under one Organizations root, 12 workloads on the affected component, SOC 2 in scope, one platform team of six. Change any of those and the sequencing changes.

Then I'd run it as a bounded migration with a single decision gate, not a checklist.

1. Write the delta down. Diff the responsibility matrix before and after, control by control:

ControlBeforeAfter
Engine patchingProvider, its maintenance windowMe, my window
Backup / PITRProvider, 35-day retention capMe, whatever I build
FailoverMulti-AZ, provider-drivenMe, or gone
Key custodyProvider-managed KMS key, auto-rotated yearlyMy CMK, my rotation policy
Audit evidenceCovered by the provider's SOC 2My logs, my scope

Anything in the right column with no named owner is the actual risk.

2. Decide, with a criterion. Four options, and the deciding question is: is the control in audit scope, and what does owning it cost versus moving?

OptionWins whenLoses when
In-place upgradeReplacement is drop-in, version is supportedSchema change is one-way, no rollback
Re-platform to managed successorYou want the control to stay outsourcedFeature parity gaps, retraining
Stay on extended supportBridge of weeks, not quartersCost compounds, auditors ask why
Self-manage on EC2You need a version nobody offersYou inherit patching, backups, failover

Arithmetic makes this concrete. Say 12 workloads × 4 db.r6g.xlarge (4 vCPU each) = 192 vCPU. At a hypothetical extended-support rate of $0.10 per vCPU-hour, that's 192 × 0.10 × 730 ≈ $14,000/month, ~$168k/year: against a one-time upgrade of three engineers for six weeks. Check the current price list; the rate steps up in later years.

3. Prove it on one workload. Lowest blast radius first. Build the replacement, run old and new in parallel, replay a day of production traffic, compare row counts and p99. Rollback is a snapshot restore into a scratch account plus a reconciliation query: test it, don't assume it.

4. Freeze, communicate, decommission, verify. Block new adoption with an SCP so nobody builds on the dying thing. Name an owner and a date per workload. Keep evidence through the transition. After cutover, verify deletion rather than trusting the console.

Failure modes. Silent control gap: the provider stops rotating the key and nobody notices. Detect with a Config rule on KMS rotation plus a control register with a named owner. Bill surprise: Cost Explorer filtered by usage type, alerting on the extended-support line. Rollback that doesn't roll back: the schema upgrade is one-way; detect by restoring a snapshot and running the reconciliation counts before you need it. And don't hold the freeze longer than the deadline justifies: providers do extend dates, and a frozen quarter costs more than the migration.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-21

Plan a secure and verifiable exit from a cloud provider.

Answer

Assume a 200-person SaaS on AWS with data in S3, RDS, DynamoDB, and 12 Marketplace subscriptions. Compliance requires 7-year audit log retention and verifiable deletion of customer data within 30 days of contract termination. The exit is a four-phase runbook: inventory, export, cutover, deletion. The decision that matters most is big-bang vs parallel run; I'd run parallel for 10% of traffic for 48 hours because it catches data drift without a full outage.

Phase 1: Inventory. Use AWS Config and Resource Explorer to list every resource. Export to a spreadsheet with columns: resource ID, type, data volume, retention, dependencies. Example: S3 bucket 'customer-uploads' has 4.2 TB, 12M objects, versioning on, lifecycle to Glacier after 90 days. RDS 'prod-db' is PostgreSQL 14, 800 GB, 3 read replicas. DynamoDB 'sessions' has 200 GB, 50M items. IAM roles: 45, including 3 with cross-account trust. KMS keys: 12. CloudTrail trail: 1, logging to S3. Marketplace: 12 subscriptions, including Datadog and Snowflake.

Phase 2: Export. For S3, use rclone or aws s3 sync to copy to GCP Cloud Storage. For RDS, pg_dump then restore to Cloud SQL. For DynamoDB, export to S3 via DynamoDB Streams and Lambda, then import to Firestore. Validate: compare object counts and MD5 checksums for S3; row counts and pg_dump checksums for RDS. Run a test restore on 1% of data first. Example: export 100 GB of S3 data, compute MD5 of each object, compare with source; expect 0 mismatches.

Phase 3: Cutover. Revoke access: disable IAM Identity Center users, delete IAM roles, revoke AWS Support access, cancel Marketplace subscriptions. Stop writes: set S3 bucket policy to deny PutObject, set RDS to read-only, disable DynamoDB writes. Reconcile: compare row counts and checksums. Parallel run: send 10% of traffic to new cloud for 48 hours, compare error rates and latency. If error rate < 0.1% and p99 latency within 10%, cut over fully.

Phase 4: Deletion. Use AWS S3 DeleteObjects to delete all objects, then delete bucket. For RDS, delete instance and final snapshot if required. For DynamoDB, delete table. For KMS, schedule key deletion (7-30 day waiting period). For backups, delete AWS Backup vaults. Obtain evidence: CloudTrail logs of DeleteObject and DeleteDBInstance events. Preserve audit logs: copy CloudTrail logs to a separate S3 bucket with Object Lock in compliance mode for 7 years. Monitor unexpected access: CloudWatch alarms on unauthorized API calls, check Cost Explorer for lingering charges. Track provider retention: AWS does not automatically delete snapshots; you must delete them explicitly or set a lifecycle policy. Document that in the exit report.

Tradeoffs. Big-bang vs parallel run. Big-bang is faster and cheaper but risks data loss and downtime. Parallel run costs double for the duration but catches drift. Decision criterion: if RPO < 1 hour and RTO < 4 hours, parallel run is worth it. Re-export vs snapshot restore: re-export is simpler but slower for large datasets; snapshot restore is faster but may not be portable across clouds. Partial exit: if only some workloads move, you can keep the provider for others, but you must isolate access and billing.

Failure modes. (1) Incomplete inventory: miss a DynamoDB table used by a Lambda function. Detection: AWS Config rules for untagged resources, or run CloudMapper. (2) Export corruption: S3 object checksum mismatch. Detection: compare MD5; if mismatch, re-export that object. (3) Access revocation gap: a forgotten IAM role still has access. Detection: AWS IAM Access Analyzer or list all roles with trust policies to external accounts. (4) Deletion not verified: provider claims deletion but data remains in backups. Detection: request a certificate of deletion from the provider, and use AWS Artifact to get compliance reports. (5) Billing continues: forgotten Marketplace subscription. Detection: set a budget alarm in AWS Budgets for $0.01.

Worked check: verify S3 bucket deletion.

Shell
# Check if bucket has any objects
if aws s3api list-objects-v2 --bucket customer-uploads --max-keys 1 --query 'Contents' --output text | grep -q .; then
  echo "Bucket not empty, deleting objects..."
  aws s3 rm s3://customer-uploads --recursive
fi
# Delete the bucket
aws s3api delete-bucket --bucket customer-uploads
# Verify deletion
if aws s3api head-bucket --bucket customer-uploads 2>&1 | grep -q '404'; then
  echo "Bucket deleted successfully"
else
  echo "Bucket still exists"
fi

Trace: First command lists up to 1 object. If any object exists, Contents is non-empty, so grep -q . succeeds, and we delete all objects. Then we delete the bucket. Then we check head-bucket. If the bucket doesn't exist, AWS returns a 404 error, which we grep for. This confirms deletion. Checked against AWS CLI v2.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-23

Review a proposal to transfer every security task to a managed service.

Answer

Short answer: you can transfer the operation of commodity detection and response, but not the accountability. A proposal to move "every security task" is either mis-scoped or is asking you to sign away controls you still legally own. Approve it only after the boundary is written down as a responsibility matrix, every retained duty has a named owner and a budget line, and you have tested the provider's detection path against your own account.

State these assumptions first: which cloud and regions, which regimes apply (PCI DSS, GDPR, SOC 2), whether the provider gets cross-account read-only or write access, and whether they operate in your account or theirs. Those four answers change the review more than anything else in the proposal.

Why the boundary moves. Under the cloud shared-responsibility model the provider secures the cloud and you secure what you put in it. A managed security service inserts a third party between those two: they run detection in their control plane, with their IAM, ingesting your logs. Every layer you hand over is a layer you can no longer see into directly. That mechanism drives most of the failure modes below.

TaskProviderYou retainEvidence it works
Detection and triage of GuardDuty / Security Hub findingsYesTuning, suppression rulesSample-finding canary, measured MTTD
IAM, roles, cross-account trustNoYesIAM Access Analyzer, CloudTrail AssumeRole events
Data classification, residency, deletionNoYesData map, deletion runbook
Config baselines (e.g. S3 Block Public Access)PartlyYesAWS Config conformance pack
Breach notification (GDPR Art. 33, 72 hours)NoYesNotification runbook, Art. 28 processor terms
Log retention and exitPartlyYesTrail to S3, export test

Failure modes and how you catch them.

  1. Detection blind spot. The provider monitors their own account; your workload logs never leave yours. Catch it: generate GuardDuty sample findings in your account and time how long until a ticket appears. Nothing inside the SLA window means the pipeline is broken.
  2. Over-broad access. Onboarding asks for a cross-account role with AdministratorAccess "for response." Catch it: IAM Access Analyzer unused-permission findings plus CloudTrail on AssumeRole.
  3. Exit amnesia. CloudTrail event history and GuardDuty findings default to 90 days retention. With no trail exporting to S3, you exit holding 90 days of history and nothing older. Check for the trail before signing, not after.

Options and deciding criteria. Full MSSP (lowest headcount, highest dependency), co-managed (you keep IAM and data classification, they run detection), or in-house tooling with an on-call rotation. Decide on regulatory scope and blast radius, not price: where PCI DSS or GDPR Art. 28 applies, processor terms and audit rights are non-negotiable, and co-managed is usually the only shape that survives legal review.

The arithmetic that kills most "transfer everything" proposals. The retained slice is the expensive slice. A 24/7 rotation covering identity and data incidents is a rough planning figure of four to five engineers fully loaded; the outsourced detection tier is a per-endpoint or per-GB fee. If the savings assume you also drop the on-call rotation, the numbers don't close.

Require before approval: a signed responsibility matrix, an exit test (export logs and data, verify deletion), and an accountable owner for every row marked "you retain." An uncovered control with no owner is the one that fails at 3am.

Curated: · Written: · Reviewed:

Difficulty: Hard