Cloud Security Architecture Questions
Designing and reasoning about the security posture of cloud and hybrid infrastructure: the shared responsibility model, network segmentation and boundary design, multi-account and multi-region security architecture, workload identity as an architectural choice, threat modeling a cloud architecture, cloud-specific attack vectors and mitigations, defense-in-depth control selection, secure cloud deployment patterns, and continuous cloud risk assessment and posture. IAM policy authoring, role/trust-policy mechanics, and secrets/credential lifecycle belong to identity-and-access-management; logging-pipeline design and SIEM/detection-rule engineering belong to security-monitoring-and-detection; encryption-key-management mechanics (KMS/CMK/BYOK) belong to data-protection-and-encryption; compliance-framework mapping (SOC2, PCI-DSS, HIPAA, GDPR) belongs to compliance-frameworks-and-certification-standards. This topic keeps identity, logging, or encryption content only when it is one ingredient inside a genuinely multi-control cloud-hardening question, not as a standalone ask.
Design a secure GitOps deployment pipeline for a Kubernetes production environment that enforces policy-as-code at merge-time (OPA/Gatekeeper), admission-time controls (mutating and validating webhooks), and supports progressive delivery (canary/blue-green). Include automatic rollback triggers for security violations or performance regressions and explain how you validate policies before enforcing them.
Sample Answer
Direct answer
A secure GitOps pipeline for Kubernetes production layers three enforcement points, each catching what the others structurally cannot: merge-time policy-as-code (Open Policy Agent (OPA)/Gatekeeper evaluated against the manifest before it reaches Git's main branch), admission-time webhooks (the same class of policy re-evaluated by the cluster itself at apply time, since a manifest can enter the cluster through a path that never went through the merge-time check), and progressive delivery with automated rollback (catching what neither static check can see: how the change actually behaves once running).
Structured elaboration
Merge-time enforcement. A pull request modifying a Kubernetes manifest runs through OPA/Conftest (or an equivalent) evaluating the same policy library the cluster's own admission controller will later enforce, catching a policy violation before a human reviewer even looks at the diff and before the change reaches the GitOps repository's main branch at all; this is the cheapest point to catch a violation, since it requires no cluster interaction.
Admission-time enforcement. Mutating webhooks apply defaults (injecting a resource limit if one is missing, for instance) before validating webhooks evaluate the final, fully-defaulted object; both run inside the cluster itself, independent of whether the change came through a reviewed pull request or, in a break-glass scenario, was applied directly. This is the layer that closes the gap merge-time checking cannot: a manifest applied outside the normal GitOps flow, or one whose policy evaluation environment at merge time somehow diverged from the cluster's own live policy set, still gets caught here.
Progressive delivery. Canary or blue-green rollout (via Argo Rollouts, Flagger, or an equivalent progressive-delivery controller) shifts traffic to the new version incrementally, with automated analysis (querying metrics, not just watching for pod crashes) at each traffic-shift step before proceeding further.
Automatic rollback triggers. Two distinct trigger classes, each requiring its own analysis: performance regression triggers compare the canary's own latency, error rate, and resource-usage metrics against the stable version's baseline during the same rollout window, rolling back automatically if the canary crosses a defined threshold; security-violation triggers are a distinct signal, a runtime security tool (behavioral monitoring, or a policy violation detected only once the workload is actually running, such as an unexpected outbound connection) flags the new version specifically, triggering rollback independent of whether performance metrics look fine, since a security violation and a performance regression are different failure modes that a single combined health check can miss one or the other of.
Validating policies before enforcing them. New or modified policies are first deployed in audit/dry-run mode (Gatekeeper's own constraint dry-run capability, or an equivalent), logging what the policy would have blocked without actually blocking anything, against real, live traffic and real manifest changes for an observation period; only once the dry-run period confirms the policy does not produce unacceptable false positives against genuine, legitimate changes does it move to enforcing mode. This is the step that prevents a well-intentioned new policy from itself becoming an outage.
Worked example
A team adds a new Gatekeeper constraint requiring every pod to specify a readOnlyRootFilesystem: true setting. Before enforcing it, the policy runs in dry-run/audit mode for two weeks against the production cluster's actual traffic of manifest changes, logging every violation it would have blocked without blocking anything; this surfaces that a legacy logging sidecar, used across a meaningful fraction of the fleet, writes to its own root filesystem and would fail under the new policy as written. The policy is adjusted to exempt that specific, reviewed sidecar pattern before moving to enforcing mode, avoiding what would otherwise have been a fleet-wide outage the moment the policy switched from audit to enforce. Separately, a new application version is rolled out via canary: traffic shifts to 10% of pods running the new version, and automated analysis compares its error rate against the stable version's baseline over a 10-minute window; the canary's error rate crosses the defined rollback threshold, and the progressive-delivery controller automatically halts the rollout and reverts traffic to the stable version, without a human needing to notice and intervene manually.
Trade-offs and pitfalls
- The dry-run validation step is the single highest-leverage practice in this entire design, and it is also the step most often skipped under the pressure to "just enable the new policy already," since the two-week audit period in the worked example feels like unnecessary delay right up until it catches exactly the finding that would have caused an outage. Treating dry-run validation as optional for a "simple, obviously correct" policy is precisely how a simple, obviously correct policy still causes an outage.
- Security-violation and performance-regression rollback triggers need to be genuinely independent checks, not folded into one combined health score, since the worked example's canary rollback was purely performance-driven; a design that only checks a blended score risks a security violation being averaged out by otherwise-healthy performance metrics, delaying or preventing the rollback that should have triggered on the security signal alone.
- Merge-time and admission-time policy evaluation need to run against the same policy library, kept in one source of truth, not two independently-maintained copies; a divergence between what the pull-request check evaluated and what the cluster's admission controller actually enforces reintroduces exactly the surprise-at-deploy-time problem this layered design exists to prevent.
- Automated rollback is powerful and also carries its own risk if the rollback trigger itself is miscalibrated (too sensitive, causing rollbacks on normal variance; too lenient, missing a genuine regression); the same dry-run-before-enforcing discipline used for policy validation should apply to a new or adjusted rollback threshold too, not just to admission-control policies.
Explain the shared responsibility model in cloud computing. For each service model (IaaS, PaaS, SaaS) describe which security controls are typically the provider's responsibility and which are the customer's. Provide concrete examples (for example, EC2, RDS, and Gmail), describe a couple of common gray-area responsibilities, and explain how you would document responsibility boundaries for a new cloud service onboarding.
Sample Answer
Direct answer
Across Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS), the shared responsibility line moves in one direction only, toward the provider, as the service becomes more managed, but the customer's core responsibility, identity, access control, and what data goes into the service, never fully disappears at any point on that spectrum, which is exactly what makes the gray-area cases (not the clear-cut ones) the actual place organizations get this wrong.
Structured elaboration
IaaS, example: Amazon Elastic Compute Cloud (EC2). Provider responsibility: physical datacenters, the hypervisor, the host's own network infrastructure. Customer responsibility: guest operating system patching, network configuration (security groups, subnet placement), identity and access management (IAM) for who can access the instance, and everything running on top of the OS, since the customer chose and controls essentially the entire software stack above the hypervisor.
PaaS, example: Amazon Relational Database Service (RDS). Provider responsibility: the physical infrastructure, the hypervisor, and now also the database engine's own patching and the underlying operating system, since the customer never has direct OS-level access to a managed database instance. Customer responsibility: network access configuration (is the instance public, what security group scopes reachability), authentication method and credential management, encryption configuration, and the data itself, a narrower slice than IaaS but still real and still the customer's to get right.
SaaS, example: Gmail (as a representative business-email SaaS product). Provider responsibility: essentially the entire technical stack, the application itself, its infrastructure, its own security patching, with the customer having no direct infrastructure-level control at all. Customer responsibility: narrows to identity and access configuration (who has an account, multi-factor authentication (MFA) enforcement, single sign-on (SSO) integration), data governance (what data users choose to put into the product, sharing and retention settings the product exposes), and user behavior (a phished user credential is still the customer's problem to prevent and respond to, regardless of how secure the underlying SaaS platform itself is).
Common gray-area responsibilities
Encryption key management on a managed service. Whether the customer is responsible for key management depends entirely on whether they opted into a customer-managed key or accepted the provider's default key; this is nominally the customer's choice, but many organizations never make it deliberately, defaulting to whatever the console's default happens to be, which means the actual responsibility boundary in practice is often determined by an unexamined default rather than a considered decision.
Default configuration values. When a managed service is deployed with an insecure default (a database provisioned with a public endpoint enabled by default, for instance, in certain configurations), the provider technically offered the configuration option, but the customer is universally held accountable for the actual deployed state in every compliance framework and every real-world incident response; "the default was insecure" is not a defense, which is a gray area in principle but a settled question in practice, worth stating plainly because it is so commonly misunderstood.
Documenting responsibility boundaries for a new cloud service onboarding
Before onboarding any new managed service, produce a written responsibility matrix specific to that service (not a generic, one-size-fits-all shared-responsibility document), explicitly naming which of the customer's own controls apply (network configuration, IAM, encryption key choice, data classification) and confirming a specific, named owner for each; review the provider's own documented responsibility boundary for that specific service, since it varies by service even within one provider, rather than assuming it matches a different service the organization has already onboarded; and require this documented matrix as a gate in the onboarding process itself, not an afterthought produced once the service is already in production use.
Worked example
An organization onboarding Gmail as its business email platform for the first time documents its responsibility matrix explicitly: MFA enforcement and SSO integration are named, owned controls (assigned to the identity team), data-loss-prevention policy configuration for what leaves the organization via email is a named, owned control (assigned to the security team), and user security-awareness training for phishing resistance is a named, owned control (assigned to the security-awareness program), each with a specific owner rather than an implicit assumption that "Google handles security." Six months later, a user falls for a phishing email and enters their credentials on a fake login page; because MFA enforcement was a documented, owned control that had actually been implemented, the stolen password alone is insufficient for the attacker to access the account, the concrete payoff of having named and implemented that specific customer-side responsibility rather than assuming the SaaS provider's own security covered it.
Trade-offs and pitfalls
- "It's SaaS, the provider handles security" is the single most common and most consequential misunderstanding of this entire model, and it is exactly backwards about where the narrowing happens: the technical infrastructure responsibility narrows toward the provider as services become more managed, but the identity, access, and data-governance responsibility never narrows to zero, and SaaS is precisely where that narrower-but-real slice matters most, since it is often the only thing standing between a phished credential and an actual breach.
- The encryption-key-management gray area is a case where "the customer could have chosen differently" is technically true and practically misleading, since most organizations never make an active, considered choice about it; treating this as a settled customer responsibility without acknowledging how often it is an unexamined default is an honest gap worth naming rather than glossing over.
- A generic, one-size-fits-all shared-responsibility document produced once and reused for every new service onboarding misses that the actual boundary varies by specific service, even within the same provider; the worked example's Gmail-specific matrix would look meaningfully different from an EC2-specific or RDS-specific one, and treating them as interchangeable templates undermines the entire point of documenting the boundary explicitly.
- A responsibility matrix that names an owner on paper but is never actually implemented (MFA "assigned" to the identity team but never actually enforced, for instance) provides no real protection, only the appearance of it; the worked example's payoff depends specifically on the named control having been genuinely implemented, not merely documented as someone's responsibility.
A critical zero-day kernel exploit has been published and may allow privilege escalation on your Linux fleet. Describe a prioritized action plan to mitigate risk across thousands of servers: emergency patching, temporary hardening, detection for exploitation, verifying no persistence, and stakeholder communication.
Sample Answer
Direct answer
A critical kernel zero-day across thousands of servers needs a response ordered by what stops the bleeding fastest, not by what most fully fixes the problem: temporary, fleet-wide hardening that can deploy in minutes comes before emergency patching that takes hours to roll out safely, since the hardening measure buys the time the patching rollout needs, and verifying no persistence has to happen after patching, not skipped in the rush to close the vulnerability, since a patched kernel does not remove a backdoor an attacker already planted before the patch went out.
Structured elaboration
Immediate triage. Confirm the specific kernel versions and configurations actually affected against the published advisory, and identify which subset of the fleet is genuinely exploitable (a privilege-escalation exploit often requires local code execution as a precondition, so a server with no untrusted local code execution path may be a materially lower immediate priority than one that does); this triage determines the actual urgency tier for the following steps, rather than treating every server in the fleet identically.
Temporary hardening, deployed first (minutes to a few hours). Apply any available runtime mitigation that does not require a reboot or a full patch cycle: a kernel module blacklist if the vulnerable code path is in an unloadable module, a sysctl or seccomp-based mitigation if the advisory provides one, or, for the highest-risk subset (servers with untrusted local code execution), a more aggressive temporary measure (restricting or disabling the specific syscall or feature the exploit depends on) even at some cost to functionality, since a temporary functionality cost is preferable to a live, unpatched privilege-escalation path on the fleet's highest-risk servers specifically.
Emergency patching, staged by risk tier (hours to a day or more). Patch the highest-risk tier first (servers with untrusted local code execution, or serving the most sensitive workloads), using the same staged, validated rollout discipline as any production patch, canary a small batch, validate, then proceed, rather than a single fleet-wide simultaneous patch that risks an untested patch causing its own fleet-wide outage; lower-risk tiers follow on a compressed but still validated timeline behind the highest-risk tier.
Detection for exploitation attempts, running in parallel with the above, not after. Deploy or tune detection specifically for the published exploit's known indicators (a specific syscall sequence, a specific process behavior pattern) if the advisory or threat intelligence provides them, and, more generally, monitor for anomalous privilege-escalation-pattern behavior (an unprivileged process suddenly gaining root-level capability) across the fleet during the response window, since the goal is catching an exploitation attempt that occurred before hardening or patching reached a specific server, not only preventing future attempts.
Verifying no persistence, after patching, not skipped. For any server where detection flagged a plausible exploitation attempt during the exposure window (even one that could not be conclusively confirmed), patching the kernel alone does not remove a persistence mechanism an attacker may have already planted before the patch landed; these servers need a forensic check specifically for unexpected persistence (an unauthorized SSH key, an unexpected cron job or systemd unit, an unexpected setuid binary) before being considered fully remediated, not assumed clean simply because the kernel is now patched.
Stakeholder communication, throughout. Leadership needs a running, honest status (fleet percentage hardened, percentage patched, any confirmed exploitation, current risk level) rather than a single end-of-incident summary, since a multi-day, fleet-wide response genuinely needs ongoing stakeholder confidence that it is under active, competent management; the communication cadence itself should be decided early and held to, not improvised as the incident unfolds.
Worked example
A zero-day privilege-escalation exploit in a widely-deployed kernel version is published with a working proof-of-concept. Triage identifies that of the fleet's 3,000 servers, roughly 400 run multi-tenant workloads with untrusted local code execution (the highest-risk tier) and the remainder run single-tenant, trusted workloads (lower immediate risk, though still needing remediation). Within the first two hours, the sysctl-based temporary mitigation the advisory provides is deployed fleet-wide via the existing configuration-management tooling, and the highest-risk 400 servers additionally receive a more aggressive syscall restriction accepted at some functionality cost. Emergency patching begins on the highest-risk tier first, canaried against 20 servers, validated over a short but real observation window, then rolled out to the remaining 380 over the following several hours; the lower-risk tier follows over the next day on a still-staged but faster timeline. Detection tooling, tuned against the published exploit's known behavioral signature, flags one server in the highest-risk tier showing a pattern consistent with an exploitation attempt during the two-hour window before hardening reached it; that specific server, even after being successfully patched, undergoes a dedicated forensic persistence check before being cleared, finding and removing an unauthorized SSH key the attempted exploitation had planted, confirming the check's value directly.
Trade-offs and pitfalls
- Patching before hardening, reversing the order in this design, leaves the fleet's highest-risk servers exposed for however long the validated, staged patch rollout actually takes, which for thousands of servers is measured in hours, not minutes; the temporary hardening step exists specifically to close that gap immediately, even imperfectly, while the more complete but slower patching proceeds.
- Treating "we patched everything" as the end state, without the persistence-verification step for any server flagged during the exposure window, is the single most consequential gap in an otherwise well-executed response, exactly what the worked example's flagged server demonstrates: the kernel patch alone would have left an attacker-planted credential in place indefinitely had the forensic check not specifically looked for it.
- A single, simultaneous fleet-wide patch (skipping the canary-and-stage discipline to move as fast as possible) risks an untested patch itself causing a fleet-wide outage, trading one incident for a potentially worse one; the staged rollout costs real time relative to a theoretical instant fleet-wide patch, but it is the discipline that prevents the emergency response from becoming its own separate incident.
- The more aggressive, functionality-costly temporary hardening applied to the highest-risk tier specifically (rather than uniformly across the fleet) requires an honest, defensible risk-tiering decision made under time pressure, and a tiering mistake (misclassifying a genuinely high-risk server as lower-risk) leaves that server under-protected during exactly the highest-risk window; the triage step's accuracy is foundational to every later step's correct prioritization.
Walk through a threat model for a compromised dependency in the IaC toolchain that injects malicious resources during deployment. Identify the entry vectors and potential impact, then propose preventive and detective controls across the build, registry, and deployment stages.
Sample Answer
Direct answer
A compromised dependency in the infrastructure-as-code (IaC) toolchain that injects malicious resources during deployment is a supply-chain threat model with the same shape as a compromised application-code dependency, but with a categorically worse blast radius, since the "code" being tampered with does not just run in an application, it directly provisions and modifies cloud infrastructure, meaning a successful compromise here can create a persistent, infrastructure-level backdoor rather than a bounded application-level one. Controls need to exist at build, registry, and deployment, since a compromise at any single stage that goes unchecked at the next stage still reaches production.
Structured elaboration
Entry vectors. A malicious or hijacked third-party Terraform provider or module pulled from a public registry, its own maintainer account compromised, or a legitimate-looking but never-actually-reviewed new module; a compromised upstream dependency of a provider plugin itself (the provider binary's own build chain being tampered with, several supply-chain layers removed from the IaC author's own code); and a compromised internal module registry (if the organization runs its own private module registry, a compromise there could tamper with a module every internal team trusts by default, a single point of leverage across the whole organization).
Potential impact. A tampered module or provider can silently inject additional resources beyond what the visible Terraform configuration describes (a hidden IAM (identity and access management) role with broad permissions, a backdoor security-group rule, an additional compute resource under attacker control), modify the behavior of resources the configuration does appear to describe (weakening an encryption setting, widening a network rule), or exfiltrate the plan/apply's own state (which frequently contains sensitive values, credentials, connection strings) to an external destination during execution.
Preventive controls, by stage.
- Build stage: pin every provider and module to an exact, hash-verified version (never a floating version range), and generate and review a dependency inventory (a Software Bill of Materials (SBOM)-equivalent for the IaC toolchain itself) so a compromise of any specific dependency version is a known, trackable event rather than silently absorbed into "whatever the latest version happened to be" at build time.
- Registry stage: for any module sourced from a public registry, mirror it into an internally-controlled, reviewed registry rather than pulling directly from the public source on every build, so a compromise of the public registry after the organization's own review does not automatically propagate; for an internal module registry, apply the same access-control and change-review discipline used for any other production-critical system, since it is now exactly that.
- Deployment stage: run
terraform planoutput through a policy-as-code check before anyapply, specifically looking for resources or attributes not accounted for in the visible configuration diff, catching an injected resource even if the module or provider that introduced it was not independently caught at the build or registry stage.
Detective controls, by stage.
- Build stage: continuous re-scanning of pinned dependency versions against newly-disclosed vulnerability and compromise databases, since a dependency that was clean when pinned can be revealed as compromised later.
- Registry stage: monitoring for any change to a mirrored or internal module's content hash, flagging drift from the last-reviewed version even if the change technically came through an otherwise-legitimate update path.
- Deployment stage: post-apply drift detection (the same continuous, out-of-band comparison against the pipeline's own last-known-good state), catching a resource that was injected during an apply and does not match what the reviewed configuration describes, the layer that catches what a plan-time-only check could still miss if the tampering happened during the apply execution itself rather than being visible in the plan.
Worked example
An organization's Terraform configuration depends on a popular, publicly-sourced module for provisioning a standard networking pattern. The module's maintainer account is compromised, and a new version is published that looks functionally identical but silently adds an additional, broadly-permissioned IAM role to every deployment using it. Because the organization pins module versions to an exact, hash-verified reference rather than a floating range, this specific compromised version is never automatically pulled into an existing pipeline, closing the entry vector for currently-deployed infrastructure. A separate team, onboarding a new service and pulling the module fresh, would have picked up the compromised version had the build-stage dependency-scanning not flagged the version's hash mismatch against a subsequently-published community advisory, catching it before that team's own apply ever ran. For a hypothetical case where the compromised version had been pulled and applied before detection, the deployment-stage drift-detection control would separately have flagged the unexpected, undocumented IAM role appearing in the account, a second, independent layer that does not depend on the build-stage scan having caught it first.
Trade-offs and pitfalls
- Pinning to exact, hash-verified versions is the single highest-leverage control in this entire threat model, and it is also the control most often weakened for convenience, since floating version ranges reduce the maintenance burden of manually bumping pinned versions; the worked example's "closes the entry vector for currently-deployed infrastructure" outcome depends entirely on this discipline being followed consistently, not adopted once and eroded later.
- Mirroring public modules into an internally-controlled registry adds real process overhead (someone has to review and promote each update) and is easy to treat as a bottleneck worth removing under delivery pressure, but it is precisely the layer that stops a compromise of the public source from automatically propagating the moment it happens, rather than only after the organization's own next scheduled review.
- A plan-time policy-as-code check that only looks for known-bad resource patterns (a public bucket, a wildcard IAM policy) will miss a genuinely novel, unexpected resource injected by a compromised dependency, since the injected resource may not itself match any previously-known-bad pattern; the check needs to specifically flag resources or attributes NOT accounted for in the reviewed configuration's own diff, a different and complementary detection logic from pattern-matching known-bad configurations.
- Detective controls at the deployment stage (drift detection) are the safety net for everything the preventive controls at build and registry might miss, and treating them as optional once build and registry controls are in place underestimates how a sophisticated, targeted compromise could specifically be designed to evade exactly those two earlier layers; the three-stage design's real strength is that each stage's detection does not depend on the prior stage having caught the compromise first.
How would you architect network segmentation and access control in a high-regulation environment where data residency and regional compliance requirements differ per customer? Explain account design, VPC placement, routing, and how to enforce region-specific controls.
Sample Answer
Direct answer
Network segmentation and access control for a high-regulation environment with per-customer data residency means the account boundary, not just the network boundary, has to carry the residency guarantee: each customer's data lives in an account (or a set of accounts) scoped to their specific regulatory region, and region-specific controls are enforced through both account placement and Service Control Policies (SCPs) that make the residency rule structurally difficult to violate, not just documented as a design intent.
Structured elaboration
Account design. One account (or a small set of accounts, following the base multi-account pattern of separating production, security, and shared services) per customer per region, rather than a shared multi-tenant account serving customers with different residency requirements. This is a stronger commitment than the base multi-account design used for a single-region product, since here the account boundary is doing double duty: blast-radius isolation between customers, and legal/regulatory boundary enforcement between regions.
VPC placement. Each customer's account provisions its virtual private cloud (VPC) only in the region their contractual and regulatory requirement specifies; an SCP attached at the organizational-unit level for that customer's regulatory grouping denies the creation of any resource, not just a VPC, but any regional resource generally, outside the approved region list, so a resource cannot be accidentally provisioned in the wrong region even by an authorized administrator acting in good faith but working from a stale runbook.
Routing. No default cross-region, cross-customer routing exists; if a shared service genuinely needs to reach multiple customers' regions (a centralized billing system, for instance, which does not itself hold regulated customer data), that service's own account has narrowly-scoped, individually-reviewed connectivity to each customer account, rather than customer accounts being able to reach each other or a broad shared network directly.
Enforcing region-specific controls. Beyond the resource-creation SCP, use the organization's account-vending process (an automated account factory) to bake the correct region restriction into every new customer account at creation time, rather than relying on a human to correctly configure it manually for each new customer; a per-region-grouped organizational unit structure, with SCPs attached at the organizational-unit level rather than per-account, means the restriction is inherited automatically as new customer accounts are added to the correct group, and a misclassification (a new customer account accidentally placed in the wrong organizational unit) is itself a detectable, auditable event rather than a silent gap.
Worked example
A SaaS platform onboards a new customer in the European Union (EU) whose data must remain in the EU under a General Data Protection Regulation (GDPR)-driven contractual requirement, alongside an existing customer in Asia-Pacific (APAC) with a similar but regionally distinct requirement. The account-vending process creates the EU customer's account inside an "EU-regulated-customers" organizational unit, which carries an SCP denying resource creation outside EU regions; the APAC customer's account sits in a separate "APAC-regulated-customers" organizational unit with its own region-restricting SCP. A platform engineer, following a runbook written for the APAC customer, accidentally attempts to apply the same Terraform module to the EU customer's account, specifying an APAC region; the SCP denies the resource creation outright, regardless of the engineer's own IAM permissions, which would otherwise have been sufficient to create the resource had the account not carried this specific organizational guardrail. The mistake is caught structurally, at the moment of the attempted action, rather than discovered later during an audit.
Trade-offs and pitfalls
- Per-customer, per-region account provisioning does not scale for free; it multiplies the number of accounts that need consistent baseline security configuration (logging, guardrails, patching) proportional to the number of customers, not just the number of regions. This is exactly why the account-vending automation matters as much as the account-design decision itself: manually configuring dozens or hundreds of per-customer accounts consistently is not realistic at any meaningful customer count, and inconsistency in that baseline is where a residency guarantee actually breaks down in practice.
- A shared cross-customer service (billing, in the worked example) is a deliberate, narrow exception to the isolation model, and its own access needs more scrutiny, not less, precisely because it is the one component with legitimate reach into multiple regulatory boundaries at once. Treating it as "just infrastructure" and under-scoping its access undermines the isolation the rest of the design carefully enforces.
- SCPs enforce where a resource CAN be created; they do not, on their own, guarantee that data already correctly placed never gets copied or replicated somewhere else by an application-level process (a cross-region backup misconfigured to target the wrong destination, for instance). The account and SCP design is the structural foundation, but application-level data-flow review is still needed to confirm nothing inside the correctly-placed account itself creates an unintended cross-region copy.
- Organizational-unit-level SCP inheritance is powerful specifically because it removes per-account configuration as a point of failure, but it depends entirely on new accounts being correctly classified into the right organizational unit at creation time; a misclassification at that one step (unlike a subsequent attempted region violation, which the SCP catches) is not itself caught by this design and needs a separate validation step in the account-vending process.
Unlock Full Question Bank
Get access to all Cloud Security Architecture interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.