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.
Create a red-team exercise plan to evaluate cloud controls against identity-driven attacks (credential theft, role assumption), persistent backdoors in serverless functions, and data exfiltration using managed services. Include objectives, scope and exclusions, safe-blasting rules, tools and techniques, KPIs (detection time, containment time), and how to convert findings into prioritized remediation and detection improvements.
Sample Answer
Direct answer
A red-team exercise evaluating cloud controls against identity-driven attacks, persistent serverless backdoors, and managed-service exfiltration needs the same rigor as any authorized offensive engagement, a written scope with explicit exclusions and safe-blast-radius rules, but its value depends specifically on converting findings into measured detection and containment time, not just a list of what an attacker could do, since the whole point of a red team (as distinct from a penetration test) is exercising the defenders' actual response, not only proving a vulnerability exists.
Structured elaboration
Objectives. Measure whether the organization's existing detection and response capability actually catches and contains three specific attack patterns, credential theft and role assumption, a persistent backdoor planted in a serverless function, and data exfiltration through a managed service, within an acceptable time, not merely whether the attacks are technically possible.
Scope and exclusions. In scope: identity and access management (IAM) roles and their trust relationships, serverless function deployment and execution, and managed-service data paths (object storage, a managed database) within specifically named accounts and regions. Excluded: any destructive action against production data, any action against a third party's own infrastructure, and any denial-of-service technique; explicitly named "safe" techniques for each objective (below) replace anything that would otherwise require a destructive proof.
Safe-blasting rules. For credential theft and role assumption: demonstrate the ability to obtain and use a credential only against a pre-established, clearly-labeled test identity and test resources, never a real production credential belonging to an actual employee. For the serverless backdoor: deploy the "backdoor" as an inert, clearly-labeled test function that logs its own invocation rather than performing any real malicious action, proving persistence and detection evasion without any genuine payload. For managed-service exfiltration: move a clearly-labeled synthetic dataset (not real customer data) to demonstrate the exfiltration path, confirming the technique works without any real data ever leaving the environment.
Tools and techniques. Cloud-native enumeration and attack-path tooling (Pacu, ScoutSuite, or an equivalent) for the identity-driven attack path; a custom, clearly-labeled Lambda or Cloud Functions deployment for the persistence test; a synthetic-data transfer script for the exfiltration test, instrumented to log its own actions independent of what the defenders' own monitoring captures, giving the red team an independent record to compare against.
Key performance indicators (KPIs). Detection time (from the moment the red team's action occurs to the moment a defender-side alert fires, if it fires at all), containment time (from detection to the compromised identity or function being isolated or revoked), and, separately, a coverage metric: what fraction of the red team's individual actions generated any detection signal at all, since an organization might detect the overall campaign eventually while missing several of the specific techniques used to get there.
Converting findings into remediation and detection improvements. Every finding is categorized as either a control gap (the attack succeeded because a preventive control was missing or misconfigured) or a detection gap (the attack succeeded and was not prevented, but should have been detected faster or at all); control gaps route to the same misconfiguration-remediation workflow, while detection gaps route specifically to the security operations team to build or tune the missing detection rule, with the red team's own instrumented logs serving as the ground truth for exactly what signal a working detection rule would need to have caught.
Worked example
The red team obtains a test identity's credentials through a simulated phishing-equivalent handoff (a pre-arranged, safe credential drop, not an actual phishing attempt against a real employee) and uses them to assume a role with broader permissions than the test identity should have, an intentional test-environment misconfiguration seeded to validate whether privilege-escalation detection actually fires. It takes 40 minutes for a defender-side alert to trigger, and another 25 minutes for the compromised role's access to be revoked, both measured against the red team's own independent timestamp log of when the escalation actually occurred. Separately, the team deploys an inert, clearly-labeled backdoor function that re-invokes itself on a schedule, testing whether the organization's serverless-anomaly detection notices a function with an unexpected recurring invocation pattern; it is never detected during the test window, a clear detection gap rather than a control gap, since the function's own IAM role was correctly, narrowly scoped (the control worked) but no detection existed for its persistence behavior specifically. Both findings feed the post-engagement report: the identity finding as a detection-tuning priority (40 minutes is too slow relative to the organization's target), the serverless finding as a new detection rule to build from scratch, since none existed for this specific pattern.
Trade-offs and pitfalls
- The distinction between a control gap and a detection gap is the single most important classification in the report, and conflating them produces the wrong remediation. The worked example's identity finding is fundamentally a detection-speed problem (the control correctly allowed a legitimate-seeming action, detection was just slow), while the serverless finding is a detection-existence problem (no rule existed at all); treating both as "fix the IAM permissions" would miss what actually needs to change in each case.
- An inert, non-destructive proof for the serverless backdoor is deliberately less realistic than a genuine attacker's payload would be, and that gap needs to be named explicitly in the report, since a defender reading "we planted a backdoor and it was not detected" without the inert-proof caveat might reasonably assume a more severe finding than the exercise's safe-blasting rules actually demonstrated.
- Measuring detection and containment time depends entirely on the red team's own independent timestamp log being trustworthy and precise, since the whole KPI framework compares defender response against this ground truth; if the red team's own logging is imprecise or was not actually independent of the target environment's own systems, the measured times are not reliable.
- A red-team exercise that only reports what succeeded, without the coverage metric (what fraction of individual actions generated any detection signal), can understate how close the defenders actually came; an organization that eventually caught the overall campaign but missed several individual techniques along the way has a real, specific gap that a pass/fail framing on the campaign's overall outcome alone would hide.
Perform threat modeling for a multi-region, active-active cloud application that uses cross-region replication for databases and object storage. Identify top threats introduced by replication and cross-region trust (for example: misconfigured replication permissions, key compromise, data-leak during transit), enumerate attack surfaces, and prioritize mitigations by impact and likelihood.
Sample Answer
Direct answer
Cross-region replication for a multi-region active-active application introduces threats that a single-region threat model simply does not have, since replication means a second region now trusts and receives whatever the primary region sends, and that trust relationship itself, not just each region's own individual security posture, becomes new attack surface: a misconfigured replication permission, a compromised replication credential, or data-in-transit exposure during the cross-region hop can each turn a single-region compromise into a two-region one.
Structured elaboration
Attack surfaces introduced by replication and cross-region trust.
- The replication identity itself. The role or service principal performing the actual cross-region copy (for databases and object storage alike) necessarily has write access to the destination region, making it a uniquely privileged identity that exists nowhere in a single-region design; its compromise is the one event that could affect both regions simultaneously.
- Replication permission scope. A replication role or bucket-replication configuration scoped more broadly than the specific data it needs to replicate (a role permitted to write to the entire destination bucket rather than the specific prefix replication actually targets) widens what a compromise of that one identity could reach in the destination region beyond just the replicated data itself.
- Key custody across regions. If encryption keys are shared or replicated alongside the data (rather than each region holding its own key and the replication process re-encrypting on arrival), a key compromise in either region compromises both regions' data.
- Data-in-transit exposure. The cross-region hop itself, even when using the cloud provider's own backbone rather than the public internet, needs encryption in transit enforced explicitly, not assumed, since a provider's internal network being generally private is not the same guarantee as the specific replication traffic being encrypted end to end.
Top threats, with impact and likelihood.
- Misconfigured replication permissions granting broader-than-needed write access to the destination region. Impact: high (a compromise of the replication identity reaches beyond just the replicated dataset). Likelihood: medium (a common configuration oversight, since scoping replication permissions precisely takes more deliberate effort than a broad grant).
- Compromise of the replication identity/credential itself. Impact: high (the one identity that legitimately bridges both regions). Likelihood: medium (requires a separate compromise vector to obtain the credential in the first place, but the impact justifies treating this identity with disproportionate scrutiny regardless of likelihood).
- Shared or improperly-isolated encryption keys across regions. Impact: high (a single key compromise affects both regions' data at once, defeating the entire point of regional isolation). Likelihood: low to medium if the organization has already adopted per-region key isolation as a baseline practice, higher if it has not.
- Data-in-transit exposure during the cross-region hop. Impact: medium to high depending on data sensitivity. Likelihood: low if the provider's own encrypted backbone is correctly used and explicitly verified, higher if this was assumed rather than confirmed.
- Replication lag creating a consistency window an attacker could exploit (reading stale data from the secondary region, or a race condition where a security-relevant change, an access revocation, has not yet propagated to the secondary region). Impact: medium. Likelihood: medium, and specific to active-active architectures where both regions genuinely serve live traffic simultaneously rather than one being a passive standby.
Prioritized mitigations
Scope the replication identity to the exact minimum: specific source and destination resource, specific action (write, not broader), with no standing access beyond what the replication mechanism itself requires, addressing threats 1 and 2 together, since the same narrow-scoping discipline defends against both a misconfiguration and a compromise of that identity. Maintain per-region key isolation with a narrowly-scoped, audited re-encryption step at the replication boundary rather than shared keys, addressing threat 3 directly. Explicitly verify and enforce encryption in transit for the specific replication mechanism in use, rather than assuming the provider's general network privacy covers it, addressing threat 4. For threat 5, ensure security-relevant state changes (access revocations specifically) either replicate with a stronger consistency guarantee than general application data, or that both regions independently re-check revocation status against a source of truth rather than relying solely on replicated state that could lag.
Worked example
An active-active application replicates its object storage and database across two regions. The replication role, initially configured with write access to the entire destination bucket rather than the specific prefix replication actually populates, is scoped down to exactly that prefix, closing the gap where a compromise of this one role could otherwise write anywhere in the destination bucket, not just where legitimate replicated data lands. Each region's database holds its own KMS key, with the replication process explicitly re-encrypting data under the destination region's key on arrival, rather than the destination trusting or holding a copy of the source region's key. A security-relevant example of threat 5: a user's access is revoked in the primary region at a specific moment; because access-control state is treated with a stronger, synchronous consistency requirement (rather than the same eventually-consistent replication used for general application data), the secondary region's own access check reflects the revocation within seconds, not whatever the general data-replication lag would otherwise have been, closing the specific window where a revoked user might otherwise retain access in the secondary region briefly after being cut off from the primary.
Trade-offs and pitfalls
- The replication identity's scrutiny needs to be disproportionate to how routine it might otherwise seem, since it is a genuinely new class of privileged identity a single-region architecture never has to reason about at all, and teams that apply the same, ordinary IAM (identity and access management) review rigor to it as any other service role under-invest relative to what its actual blast radius warrants.
- Treating security-relevant state (access revocations) with the same eventual-consistency replication guarantee as general application data is the specific, easy-to-miss gap the worked example's fifth threat addresses, since it is tempting to assume "replication is replication" and apply one uniform consistency model everywhere, when a security-critical state change genuinely needs a stronger guarantee than a routine data update does.
- Assuming the cloud provider's internal backbone is inherently secure for replication traffic, without explicitly verifying and enforcing encryption in transit for the specific replication mechanism, is a common and consequential assumption to leave unverified; "the provider's network is private" and "this specific replication traffic is encrypted end to end" are related but not the same guarantee, and only the second one is the actual control this threat model depends on.
- Per-region key isolation with a re-encryption step at the replication boundary adds real operational complexity (the re-encryption process itself becomes a component that needs its own monitoring and failure handling) compared to simply replicating a shared key, and that added complexity is precisely the cost of the stronger regional-isolation guarantee, not an avoidable inefficiency.
Design a plan to minimize blast radius and prevent privilege escalation for a tenant onboarding flow where tenants can upload custom plugins executed in your platform. Include sandboxing options, resource limits, policy enforcement, and monitoring. Discuss trade-offs between extensibility and security.
Sample Answer
Direct answer
A tenant-onboarding flow that runs custom, tenant-uploaded plugins is a deliberate extensibility feature that inverts the platform's normal trust model: every other part of a multi-tenant platform treats the tenant as a data owner, but a plugin-execution feature treats the tenant as a code contributor, which is a categorically higher-trust grant, and the design has to assume every uploaded plugin is hostile until sandboxing, resource limits, and policy enforcement prove otherwise for that specific execution.
Structured elaboration
Sandboxing options. A dedicated, per-execution isolated environment (a microVM such as Firecracker, or a gVisor-style user-space kernel, rather than a standard container alone) gives the strongest isolation, since a standard container shares the host kernel with every other container on that host, and a kernel-level vulnerability in the plugin's execution path could escape a standard container more readily than a microVM's stronger isolation boundary. The trade-off is cold-start latency and per-execution resource overhead, both meaningfully higher for a microVM than a lightweight container, which matters if the platform's extensibility feature needs to support low-latency, frequent plugin invocations rather than occasional, longer-running ones.
Resource limits. CPU, memory, execution-time, and disk quotas enforced per plugin execution, sized conservatively against the platform's actual legitimate use cases rather than generously "to be safe for whatever a plugin might need," since a generous default resource allocation is itself an attack surface, a resource-exhaustion attack against the host or against other tenants' plugins sharing the same infrastructure.
Policy enforcement. A plugin's network access should default to none, with any legitimate external call requiring an explicit, reviewed allow-list entry (which specific destination, for which specific plugin), rather than a plugin having general outbound internet access by default; filesystem access should be limited to a scratch space specific to that execution, with no access to the host filesystem or to another tenant's data; and the plugin's own execution identity (if it needs to call back into the platform's own APIs at all) should hold the narrowest possible, per-tenant-scoped permissions, never a broad platform-wide credential.
Monitoring. Runtime behavioral monitoring specific to plugin executions (unusual resource consumption, an unexpected network connection attempt, an attempt to access a filesystem path outside the assigned scratch space) should be treated as a higher-priority detection surface than the platform's general workload monitoring, since this is the one execution context the platform has deliberately opened to untrusted, tenant-authored code; every plugin execution's full resource usage and any policy-violation attempt should be logged, both for security investigation and to build the behavioral baseline a genuinely malicious plugin would eventually deviate from.
Trade-offs between extensibility and security
Isolation strength versus latency and cost. Stronger sandboxing (a microVM per execution) costs more in cold-start time and per-execution infrastructure overhead than a lighter-weight container-based approach; a platform whose extensibility feature needs to support fast, frequent, low-latency plugin calls faces real pressure to weaken isolation for performance, which is exactly the trade-off that needs to be made deliberately and documented, not eroded gradually under performance pressure without anyone revisiting the original security rationale.
Capability richness versus attack surface. The more a plugin is permitted to do (broader network access, more platform API surface, longer execution time), the more genuinely useful and differentiated the extensibility feature becomes for legitimate tenants, and the larger the attack surface for a malicious one; this needs to be a deliberate, reviewed API surface, not "whatever the plugin SDK happens to expose," with each additional capability weighed against what it would let a hostile plugin do.
Development friction versus review depth. A policy-enforcement layer that requires per-plugin review before granting any elevated capability (a network allow-list entry, for instance) protects the platform but slows down legitimate tenant developers; an automated, policy-as-code review path for common, well-understood capability requests can reduce that friction for the common case while still requiring human review for anything genuinely novel or broad.
Worked example
A platform allowing tenants to upload plugins that process customer data during a workflow step runs each plugin execution in a Firecracker microVM, with a hard CPU and memory limit sized against the platform's own profiling of legitimate plugin workloads, a 30-second execution timeout, no default network access, and filesystem access limited to a per-execution scratch directory that is destroyed after the execution completes. A malicious plugin attempts to exfiltrate processed data by opening an outbound network connection to an external destination; because network access defaults to none and this plugin was never granted an allow-list entry, the connection attempt fails at the sandbox boundary, and the attempt itself is logged and flagged, triggering a review of the plugin and the tenant account that uploaded it. A separate, legitimate plugin genuinely needs to call one specific external API as part of its documented function; that specific destination was reviewed and added to that plugin's own narrow allow-list at onboarding time, distinct from every other plugin's own (likely empty, or differently-scoped) allow-list.
Trade-offs and pitfalls
- A shared, platform-wide network allow-list (rather than a per-plugin, per-tenant one) is a common shortcut that defeats the isolation the rest of the design carefully builds, since it would let any plugin reach any destination another plugin was legitimately granted access to, reintroducing exactly the cross-tenant reach this design otherwise structurally prevents.
- Resource limits sized too conservatively break legitimate plugin use cases, while limits sized too generously widen the resource-exhaustion attack surface; getting this right requires actual profiling of legitimate plugin workloads before setting the limits, not a guessed value, and revisiting the limits as the platform's actual plugin ecosystem evolves rather than treating the initial sizing as permanent.
- The isolation-versus-latency trade-off is the one most likely to erode gradually under performance pressure, since a slow cold start is a visible, immediate complaint from tenant developers, while a weakened isolation boundary's cost is invisible until an actual exploit occurs; the original security rationale for the stronger isolation choice needs to be documented and revisited deliberately if performance pressure ever prompts a proposal to weaken it, not silently traded away.
- Runtime behavioral monitoring depends on plugin executions actually generating enough signal to establish a meaningful baseline, a genuine limitation for a very low-volume or brand-new plugin, similar to the cold-start baseline problem present in other anomaly-detection designs in this domain; a new or rarely-invoked plugin's monitoring needs either a more conservative default sensitivity or a longer observation period before its behavioral detection can be trusted at full confidence.
Explain the concept of 'hub-and-spoke' network topology in enterprise cloud networking. What are two security benefits and one potential single point of failure you must mitigate?
Sample Answer
Direct answer
Hub-and-spoke is a network topology where a central "hub" virtual network hosts shared services (a transit gateway or equivalent, centralized firewall/inspection, logging, VPN or Direct Connect termination) and every workload "spoke" network connects only to the hub, never directly to another spoke; the two clearest security benefits are centralized enforcement and reduced east-west exposure between workloads, and the one significant single point of failure to mitigate is the hub itself, since every spoke's connectivity, and every spoke's security enforcement, now depends on it.
Structured elaboration
Security benefit 1: centralized policy enforcement and inspection. Because every spoke's traffic to another spoke, or to the internet, or to an on-premises network passes through the hub, a single centralized firewall or inspection appliance in the hub can enforce one consistent policy for every workload, rather than each spoke team independently configuring and maintaining its own egress and inter-spoke rules, which in practice drift out of consistency over time.
Security benefit 2: default isolation between spokes. Spokes do not connect directly to each other by default in a hub-and-spoke design; two spokes can only reach each other by explicit route through the hub, which is itself a chokepoint the hub's own policy can restrict or deny. This means a compromise in one spoke does not automatically have a network path to another spoke, unless the hub's routing and policy explicitly permit it, a meaningfully smaller default blast radius than a flat, fully-meshed network where every workload can reach every other workload unless specifically blocked.
The single point of failure: the hub itself. Every spoke's connectivity to every other spoke, to the internet, and to on-premises infrastructure routes through the hub; an outage or a misconfiguration in the hub's transit gateway, its centralized firewall, or its own network path affects every spoke simultaneously, which is a materially larger blast radius for an availability failure than a flat topology would have (even though the security posture is generally better). The hub is also a concentrated target: a compromise of the hub's own centralized firewall or transit component potentially exposes the routing decisions for every spoke it serves.
Mitigating the hub's single-point-of-failure risk. Redundant hub infrastructure (a highly-available transit gateway configuration, redundant firewall appliances across multiple Availability Zones rather than a single instance) is the direct availability mitigation. For the security-concentration risk specifically, the hub's own administrative access needs tighter controls than any individual spoke (since compromising hub administration is a strictly worse outcome than compromising one spoke), and the hub's own configuration changes should go through a more deliberate change-control process than a typical spoke, given the blast radius of a mistake made there.
Worked example
An enterprise with 12 application spokes routes all inter-spoke and internet-bound traffic through a hub containing a redundant, multi-Availability-Zone firewall cluster and a highly-available transit gateway. A compromised workload in Spoke 3 attempts to reach a database in Spoke 7; because spokes do not connect directly, this traffic must route through the hub, where the centralized firewall's policy (permitting only the specific inter-spoke flows that have been explicitly approved) denies the connection, since Spoke 3 and Spoke 7 were never granted a route to each other. Separately, when one of the hub's two firewall appliances fails during a maintenance window, the redundant second appliance continues serving all 12 spokes without an availability interruption, which is the concrete payoff of the redundancy investment described above; without it, that same failure would have been a total outage for every spoke simultaneously, not just the one undergoing maintenance.
Trade-offs and pitfalls
- The security benefit and the availability risk come from the exact same architectural property, and treating them as separate concerns misses that they trade off against each other. The same centralization that makes policy enforcement consistent and blast radius small during a compromise is what makes an outage or a misconfiguration in the hub itself catastrophic across every spoke at once; a hub-and-spoke design is only a net improvement if the redundancy investment in the hub is genuinely made, not merely intended.
- A common wrong turn is under-investing in hub redundancy specifically because the hub "isn't a workload," so it does not get the same operational rigor (monitoring, on-call ownership, change review) that individual application spokes receive. The hub is infrastructure every spoke depends on, and it deserves at least the operational rigor of the most critical spoke it serves, not less.
- A hub-and-spoke design still allows a spoke-to-spoke path if the hub's policy explicitly permits it, and over time, as more legitimate integration needs accumulate, the hub's policy can gradually grow permissive enough to erode the default-isolation benefit. Periodic review of the hub's actual permitted spoke-to-spoke flows against what is still genuinely needed keeps this benefit real rather than nominal.
- A concentrated administrative-access risk at the hub is easy to overlook because the hub is infrastructure, not a customer-facing workload, and infrastructure access reviews sometimes receive less scrutiny than application access reviews. Given the hub's blast radius, its administrative access should receive at least as much scrutiny as the most sensitive spoke it serves, arguably more.
List and explain ten common cloud misconfigurations that frequently lead to breaches or data exposure across AWS, Azure, and GCP (for example: open storage buckets, overly permissive IAM policies, public database endpoints, default credentials). For each misconfiguration briefly state how you would detect it and the primary remediation step.
Sample Answer
Direct answer
Most cloud breaches trace back to a small, repeatable set of configuration mistakes rather than novel exploits: open storage, over-broad identity and access management (IAM), exposed management interfaces, and defaults left unchanged. The ten below are the ones that recur across AWS, Azure, and GCP specifically, generalized so the same mental checklist applies regardless of which provider is in front of you.
Structured elaboration
| # | Misconfiguration | Detection | Primary remediation |
|---|---|---|---|
| 1 | Publicly readable/writable object storage (S3 buckets, Azure Blob containers, GCS buckets) | Cloud security posture management (CSPM) inventory scan checking public ACLs (access control lists) and bucket/container policies | Enable Block Public Access (or the provider equivalent) as an account-wide default, not a per-bucket opt-in |
| 2 | Overly permissive IAM policies (wildcard actions/resources) | Policy analyzer or access-analysis tooling scanning for "*" in the action or resource fields of attached policies | Replace with a least-privilege policy scoped to actual usage, validated against real call history |
| 3 | Publicly reachable database endpoints (RDS/Cloud SQL/Azure SQL with a public IP and open security group) | Network configuration scan cross-referencing public IP assignment with the database's security group or firewall rule | Move the database to a private subnet with no public IP, and restrict access to the application tier's security group only |
| 4 | Default or unrotated credentials (default service account keys, unrotated root/admin keys) | Credential-age reporting (IAM credential report on AWS, equivalent identity audit on GCP/Azure) | Rotate immediately, then enforce a maximum credential age with automated rotation for anything long-lived |
| 5 | Management ports open to the internet (SSH/22, RDP (Remote Desktop Protocol)/3389 reachable from 0.0.0.0/0) | Security group/network security group audit for ingress rules with an unrestricted source CIDR on those ports | Restrict to a bastion host, VPN (Virtual Private Network) range, or a just-in-time access mechanism, never a direct internet-wide allow |
| 6 | Missing encryption at rest on storage or database resources | Configuration scan checking each resource's encryption setting against policy | Enable default encryption (provider-managed or customer-managed key) at the account or organization level so new resources inherit it |
| 7 | Overly permissive cross-account or cross-tenant trust relationships | IAM trust-policy scan for Principal values referencing an external account without a condition (such as an external ID) | Add an external ID condition and scope the trust to only the specific external principal that needs it |
| 8 | Logging or audit trail disabled or not centralized (CloudTrail/Activity Log/Cloud Audit Logs turned off or not shipped to a separate account) | Organization-level check confirming every account or subscription has logging enabled and forwarding to a dedicated log-archive destination | Enable organization-wide logging as a baseline requirement, enforced by policy, not left to each team to configure |
| 9 | Excessive network access between environments (no segmentation between development, staging, and production networks) | Network topology review confirming routing and security group boundaries actually separate environments, not just naming conventions | Enforce separate VPCs/virtual networks per environment with explicit, minimal peering rather than one flat network |
| 10 | Serverless functions or compute instances with broader IAM permissions than their event source or workload requires | Access-analysis tooling comparing a role's granted permissions against the resource's actual API call history | Scope down to the resources actually used, deployed behind a monitored canary period before full cutover |
Worked example
Applying items 1, 2, and 5 to one small environment: a startup's AWS account has a public documentation bucket (correctly public, item 1 does not apply here), an application role with dynamodb:* on Resource: "*" (item 2), and a bastion security group allowing SSH from 0.0.0.0/0 (item 5). Detection: the access-analysis tool flags the DynamoDB role because its actual CloudTrail history shows only GetItem and PutItem calls against one table, and the security group audit flags the bastion rule because its source CIDR is unrestricted. Remediation: the role is narrowed to dynamodb:GetItem/PutItem on that one table's ARN (Amazon Resource Name), and the bastion's security group is restricted to the company's VPN egress CIDR. Neither fix touches the intentionally-public documentation bucket, which is why detection needs to distinguish "public" from "wrongly public" rather than flagging every public resource identically.
Trade-offs and pitfalls
- Detection tooling is only as good as its baseline. A CSPM scan that flags every public bucket without a way to mark a bucket as intentionally public generates enough noise that a team starts ignoring its alerts, which is functionally the same as not scanning at all.
- Access-analysis-based least privilege depends on a representative sample of usage. A role scoped from 30 days of call history can miss a legitimate but infrequent code path (a monthly batch job, a quarterly report), so a scoped-down policy needs a monitored rollback window before being treated as final, not a one-shot cutover.
- Item 9 (environment segmentation) is the one most often skipped entirely, because a flat network is simpler to set up initially and the cost of the missing boundary is invisible until a development environment's weaker controls become the actual path into production.
- A single remediation step listed per item is a starting point, not a complete fix. Restricting a security group's source CIDR (item 5) reduces exposure but does not replace enforcing MFA (multi-factor authentication) or session logging on whatever the bastion ultimately grants access to; treat each remediation as the first of several controls, not the only one needed.
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.