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.
For a financial client that must compute on sensitive customer records without exposing plaintext to cloud operators, design a solution leveraging confidential computing (for example Nitro Enclaves or Intel SGX). Cover attestation, key provisioning and sealing, integration with application stack, performance expectations, and operational complexity, including troubleshooting constraints.
Sample Answer
Direct answer
Confidential computing solves a specific problem the rest of the cloud security stack cannot: it keeps data in plaintext form invisible even to the cloud provider's own operators, by processing it inside a hardware-isolated enclave (AWS Nitro Enclaves or Intel Software Guard Extensions (SGX)) whose memory not even a privileged hypervisor process can read. For a financial client computing on sensitive customer records, this closes the one gap that encryption-at-rest and encryption-in-transit both leave open: the moment data is decrypted to actually be computed on.
Structured elaboration
Attestation. Before the enclave receives any decryption key, it must cryptographically prove its own identity and integrity to a remote party (a key management service or the client's own verification service): what code is running inside it, and that it is running on genuine, untampered hardware. Nitro Enclaves attestation is issued by the Nitro Hypervisor and includes a measurement of the enclave image; SGX attestation (via Intel's Attestation Service or a client-run equivalent) similarly measures the enclave's code. A key is only released after the attesting party independently verifies this measurement matches an expected, approved enclave image, which is what prevents an attacker who has modified the enclave's code from ever receiving the decryption key at all.
Key provisioning and sealing. Keys never enter the enclave in plaintext from outside without first passing attestation. The typical flow: the enclave requests a key from a key management service (AWS Key Management Service (KMS) supports enclave attestation documents directly as a decryption condition), the KMS validates the attestation document, and only then releases the key over a channel established specifically for that verified enclave. "Sealing" refers to the enclave encrypting any persistent state it needs to retain (for SGX specifically, sealed to the exact enclave measurement or to a signing identity) so that state is unreadable outside that same enclave, or by a different, unapproved version of it.
Integration with the application stack. The enclave typically runs as a constrained, minimal-code companion process to the main application (the "parent" instance or container handles networking, orchestration, and everything non-sensitive; only the specific decrypt-and-compute logic touching sensitive data runs inside the enclave). Nitro Enclaves communicate with their parent instance over a local virtual socket (vsock) with no direct network access from inside the enclave at all, which is a deliberate constraint requiring the application to be re-architected around a narrow, well-defined interface rather than a drop-in library.
Performance expectations. Enclaves impose real overhead: SGX's protected memory region (the Enclave Page Cache) is limited in size on many platforms, and paging beyond it carries a measurable performance penalty; Nitro Enclaves allocate dedicated CPU and memory carved out from the parent instance, meaning capacity planning has to account for the enclave's allocation, not just the parent instance's total size. Neither is suited to high-throughput, low-latency processing of the entire application's traffic; the practical pattern is isolating only the specific sensitive computation, keeping everything else on the unconstrained parent.
Operational complexity, including troubleshooting constraints. Enclaves are close to a black box by design: no direct network access, no interactive shell, and limited logging capability, since the isolation that provides the security guarantee also removes most conventional debugging tools. Logging has to be deliberately engineered (structured, non-sensitive log output forwarded out through the constrained vsock/local interface) before an incident happens, because there is no way to attach a debugger to production after the fact the way there would be to a normal process.
Worked example
A financial client's fraud-scoring service needs to compute a risk score from a customer's full transaction history without any Amazon Elastic Compute Cloud (EC2) host-level operator, including the client's own infrastructure team, ever seeing the plaintext transaction data. The architecture: the main application (running in the parent EC2 instance) receives the encrypted transaction data over the network and passes it, still encrypted, over vsock to a Nitro Enclave. The enclave, on startup, requests decryption keys from AWS KMS; KMS's key policy specifically requires a matching attestation document naming this exact enclave image's measurement (a Platform Configuration Register hash), so a modified or unauthorized enclave image would be refused the key. The enclave decrypts, computes the fraud score, and returns only the score, never the underlying transaction detail, back over vsock to the parent for the application to act on. If the fraud-scoring logic needs to be updated, the new enclave image gets a new measurement, and the KMS key policy must be explicitly updated to trust it, a deliberate, auditable step rather than an implicit trust extension.
Trade-offs and pitfalls
- Confidential computing protects data in use; it does not replace encryption at rest or in transit, and treating it as a substitute leaves both of those gaps open. The worked example still requires the transaction data to arrive encrypted and be stored encrypted; the enclave only closes the window during active computation.
- Attestation policy is the actual security boundary, and a policy that trusts "any enclave" rather than a specific, named measurement defeats the entire design. A KMS key policy scoped broadly enough to release keys to any Nitro Enclave, rather than the one specific approved image, gives up the guarantee the whole architecture exists to provide.
- The troubleshooting constraint is a real operational cost that teams underestimate until the first production incident. Debugging a live issue inside an enclave without conventional tooling requires having already built structured, deliberately-limited logging before the incident, not during it; a team that has not exercised this in advance will discover the gap at the worst possible time.
- Performance overhead means confidential computing is a targeted control for the specific sensitive computation, not a wholesale platform choice. Attempting to route an entire application's traffic through an enclave, rather than isolating only the sensitive decrypt-and-compute step, both under-delivers on performance and unnecessarily expands what the constrained, hard-to-debug environment has to handle.
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.
Compare and contrast provider network controls: AWS Security Groups, Azure Network Security Groups (NSGs), and GCP firewall rules. Discuss how stateful vs stateless filtering, default rules, rule evaluation order, and implicit behavior differ across providers and what that implies for penetration testing and network segmentation testing.
Sample Answer
Direct answer
AWS Security Groups, Azure Network Security Groups (NSGs), and GCP firewall rules all implement the same conceptual idea, instance- or resource-scoped network filtering, but differ enough in statefulness, default behavior, and rule evaluation that a security assessment or a segmentation design ported directly from one provider's mental model to another will misjudge what is actually permitted.
Structured elaboration
| Property | AWS Security Groups | Azure NSGs | GCP firewall rules |
|---|---|---|---|
| Statefulness | Fully stateful: an allowed inbound connection automatically permits its return outbound traffic, no matching outbound rule needed | Fully stateful, same behavior as AWS: a matched inbound rule's return traffic is automatically permitted | Fully stateful: a connection matching an allow rule in one direction automatically allows the return traffic |
| Allow vs. deny rules | Allow-only; there is no explicit deny rule type, so the effective policy is the union of every attached rule, and nothing can be selectively carved out once allowed elsewhere | Supports both explicit Allow and explicit Deny rules, each with a numeric priority (100 to 4096, lower number evaluated first); an explicit Deny at a lower priority can override an Allow at a higher priority number | Supports both Allow and Deny rules, each with an explicit numeric priority (0 to 65535, lower number evaluated first, same "lower wins" convention as Azure) |
| Rule evaluation order | No ordering concept at all, since every rule is additive allow-only; effective access is simply the union of all matched rules across every attached security group | Rules evaluated strictly in priority order, first match wins; a specific, low-priority-number Deny rule placed above a broader Allow rule is a common, deliberate exception pattern | Same first-match-by-priority evaluation as Azure; a specific Deny at a lower priority number overrides a broader higher-priority-number Allow |
| Default/implicit rules | Default: deny all inbound, allow all outbound, unless explicitly modified; no implicit system-level rules beyond this default | Ships with default system rules that cannot be deleted (only overridden by a higher-priority custom rule): allow traffic within the same virtual network, allow inbound from the Azure Load Balancer's health-probe range, deny all other inbound by default | Default deny for ingress unless a rule allows it; implied allow for all egress unless a rule explicitly denies it, and every VPC network also carries certain implied rules a custom rule can override by priority |
| Scope | Attached per elastic network interface (ENI), effectively per-instance or per-resource | Attached at the network interface or the subnet level, meaning a single NSG can apply broadly to every resource in a subnet, a scope AWS Security Groups do not directly offer | Attached at the VPC-network level with target selection by network tag or service account, a different targeting model than AWS's per-ENI attachment or Azure's per-NIC/per-subnet attachment |
Implications for penetration testing and segmentation testing
Rule union versus explicit override changes what "effective policy" even means. Testing AWS security-group effectiveness means enumerating every group attached to a resource and computing the union, since there is no way for one rule to selectively exclude something another rule already allowed; testing Azure or GCP effectiveness instead means evaluating priority order directly, since a lower-priority-number Deny rule can and often does override a broader Allow, which means a tester has to read the full ordered rule set to know the actual effective policy, not just check whether an allow rule exists somewhere.
Azure's undeletable default rules are a common blind spot in a segmentation test. A tester who reviews only the custom rules an organization added, without accounting for Azure's built-in default allow-within-virtual-network rule, will miss that two resources in the same virtual network can reach each other by default even with no custom rule permitting it explicitly; this default needs to be explicitly overridden with a custom Deny rule at a lower priority number if intra-network segmentation is actually required.
GCP's tag- and service-account-based targeting changes how a tester scopes their enumeration. Because GCP firewall rules target resources by network tag or service account rather than by attachment to a specific network interface, a tester needs to enumerate which resources carry which tags or run under which service accounts to determine what a given firewall rule actually applies to, a materially different enumeration process than checking a per-instance attachment list on AWS or Azure.
Segmentation-testing methodology has to be provider-aware from the start, not applied as one generic checklist. A test plan written primarily against AWS's allow-only, union-of-rules model and then reused unmodified against an Azure environment will fail to test for the specific, common Azure misconfiguration of an overly broad Allow rule placed at a lower priority number than an intended, narrower Deny, since that failure mode has no AWS equivalent to have trained the tester's instincts on.
Worked example
An assessment of a multi-cloud environment finds a resource in each of the three providers intended to deny inbound access from a specific known-malicious IP range while allowing broader access otherwise. On AWS, this cannot be expressed as a single security group at all, since security groups are allow-only; the deny has to be implemented elsewhere (a NACL, since NACLs do support explicit deny, or a web application firewall (WAF) rule), and a tester checking only the security group would correctly find no explicit block there and would need to separately check the NACL to find the actual denial. On Azure, the same intent is a single NSG rule: an explicit Deny rule for that IP range at a lower priority number than the broader Allow rule, both visible together in one place a tester can read directly. On GCP, the equivalent is a Deny firewall rule at a lower priority number than the broader Allow rule, following the same override logic as Azure but implemented in GCP's own priority-numbering scheme. The same security intent required three structurally different verification approaches across the three providers, which is exactly why a tester's mental model has to be provider-specific, not a single template applied three times.
Trade-offs and pitfalls
- AWS's allow-only model is simpler to reason about (no rule ordering to track) but structurally cannot express "allow this broad range, except this specific address" in one construct, forcing that logic into a different layer (NACL or WAF) that a less-thorough assessment might not think to check. This is not a weakness of AWS's design so much as a difference that shifts where a specific kind of rule has to live, and a tester needs to know where to look.
- Azure and GCP's priority-based override model is more expressive but also more error-prone in practice, since a rule added later with an unintentionally low priority number can silently override an existing, carefully-designed rule without any explicit conflict warning. A segmentation review on these two providers needs to explicitly check for priority-ordering surprises, not just confirm that the "right" rules exist somewhere in the list.
- Azure's undeletable default rules mean a genuinely secure Azure NSG configuration requires more explicit rules than the equivalent AWS security group, specifically to override defaults AWS does not have an equivalent of. A migration or multi-cloud consistency effort that assumes "we configured the same rules on both clouds" without accounting for this gap can leave the Azure side less segmented than intended.
- GCP's tag- and service-account-based targeting is powerful for dynamic environments (a firewall rule automatically applies to any newly-created resource with the matching tag, no per-resource attachment step needed) but makes a point-in-time audit harder to reason about without first enumerating the current tag and service-account assignment across the environment, since the firewall rule list alone does not show which resources it currently applies to.
Compare security responsibilities and best practices for containers (Kubernetes) versus serverless functions (Lambda/Cloud Functions) across AWS, GCP, and Azure. Discuss image provenance, runtime protection, network policies, IAM/service-account mapping, secrets handling, and common misconfigurations unique to each model.
Sample Answer
Direct answer
Containers (Kubernetes) and serverless functions (AWS Lambda, GCP Cloud Functions, Azure Functions) sit at different points on the shared-responsibility line: Kubernetes hands you the node, kernel, and networking layer, so you own far more of the attack surface but also get direct control over enforcement; serverless takes the OS and runtime off your plate but concentrates risk into the function's IAM (Identity and Access Management) permissions and its event source. A posture that treats both models the same way (one IAM policy shape, one network model, one secrets pattern) under-controls one of them every time.
Structured elaboration
| Dimension | Kubernetes (containers) | Serverless (Lambda / Cloud Functions) |
|---|---|---|
| Image provenance | Pin to a private registry, require signed images (cosign/Sigstore), block unsigned images with an admission controller (OPA Gatekeeper, Kyverno). AWS: ECR image scanning + repository policy; GCP: Artifact Registry + Binary Authorization; Azure: ACR content trust. | Deployment package comes from CI, not a registry pull at runtime, so provenance means CI-signed artifacts and locked-down deploy roles rather than an admission hook. AWS: CodePipeline/CodeBuild provenance plus Lambda code-signing config; GCP: Cloud Build provenance attestations; Azure: DevOps pipeline signing. |
| Runtime protection | You own the node and container runtime: eBPF (extended Berkeley Packet Filter)/syscall-based runtime detection (Falco, GuardDuty Runtime Monitoring on EKS), Pod Security Standards (the restricted profile), read-only root filesystems. | Provider patches the underlying runtime; your control surface is the function's own code path: strict input validation, dependency scanning, and provider tracing (AWS X-Ray, GCP Cloud Trace, Azure Application Insights) rather than a host agent. |
| Network policies | Kubernetes NetworkPolicy objects (or a CNI (Container Network Interface) plugin like Calico/Cilium) for east-west segmentation between pods; service mesh mutual TLS (mTLS) for identity-based east-west auth; private cluster endpoints and restricted egress. | No pod network to segment; the equivalent control is VPC (Virtual Private Cloud)-connected functions with a locked-down security group and NAT (Network Address Translation) egress allow-list, or provider-native private connectivity (AWS PrivateLink, GCP Serverless VPC Access, Azure Private Endpoints) so the function never needs a public egress path to reach internal services. |
| IAM / service-account mapping | Map pod identity to cloud IAM per workload, not per node: IAM Roles for Service Accounts (IRSA) on EKS, Workload Identity on GKE, Azure AD Workload Identity on AKS. Each service account gets its own minimal role instead of sharing the node's instance role. | Each function gets its own execution role (Lambda execution role, GCP service account per function, Azure Managed Identity), scoped to only the resources that function touches. The failure mode is a shared, overly broad role reused across many functions. |
| Secrets handling | External secret stores injected at runtime via a Container Storage Interface (CSI) driver backed by AWS Secrets Manager, GCP Secret Manager, or Azure Key Vault; avoid native Kubernetes Secrets alone since they are only base64-encoded at rest by default, not encrypted. | Provider secret manager referenced by ARN (Amazon Resource Name)/resource ID and resolved at cold start, not baked into environment variables or the deployment package; encrypt environment variables with a customer-managed key where the provider supports it. |
| Misconfigurations unique to the model | Default-namespace workloads with cluster-admin-bound service accounts, disabled or missing admission controllers, exposed kubelet or API server, containers running as root with a writable root filesystem. | Overly broad execution role attached because least privilege is tedious to compute per function, secrets embedded in code or plaintext environment variables, a public function URL or unauthenticated API Gateway route with no request validation. |
Worked example
A team runs an order-processing service split as: an EKS cluster running the checkout API, and three Lambda functions (validate-payment, send-receipt, sync-inventory) triggered off an SQS (Simple Queue Service) queue.
- Containers: the checkout API's pod runs under a dedicated service account mapped via IRSA to a role scoped to
dynamodb:GetItem/PutItemon one table ARN. ANetworkPolicyallows ingress only from the ingress controller's namespace and egress only to the payment provider's IP range and the DynamoDB VPC endpoint; everything else is denied by default. Images are pulled only from the team's ECR repository and Gatekeeper rejects any pod spec without a Sigstore signature annotation. - Serverless:
validate-paymenthas its own execution role limited tosecretsmanager:GetSecretValueon exactly the payment-API-key secret's ARN andsqs:DeleteMessageon its source queue; it cannot touch DynamoDB or the other two functions' resources.sync-inventory, which needsdynamodb:UpdateItem, gets a separate role scoped only to that table. If one function is compromised through a malicious event payload, the blast radius is the one secret and one queue that function's role can reach, not the whole account.
The point of the example: the shape of least privilege differs (network policy for containers, per-function IAM role for serverless) but the underlying goal, minimizing what a single compromised unit can reach, is identical.
Trade-offs and pitfalls
- Shared-node risk in Kubernetes. If network policy and pod security enforcement lag, a compromised low-privilege pod can pivot to other workloads on the same node. Serverless removes this specific pivot path entirely, since each invocation gets an isolated execution environment, but it introduces a different one: an overly broad execution role that was never audited because "it's just a small function."
- Enforcement cost. Kubernetes admission control (Gatekeeper/Kyverno) requires ongoing policy maintenance and can break deployments if rules are too strict without a staged rollout; serverless least privilege requires per-function IAM authoring discipline that teams often skip under delivery pressure, defaulting to a shared broad role.
- Common wrong turn. Treating serverless as "the provider secures it" and stopping at the execution role. The provider secures the runtime and host; it does not validate that your function's IAM policy is scoped correctly or that your event source (an object storage bucket, an API Gateway route) is itself locked down. Runtime protection responsibility never fully disappears, it moves from "patch the node" to "scope the permissions and validate the input."
- Cross-cloud consistency. IRSA, Workload Identity, and Azure AD Workload Identity are functionally equivalent but not interchangeable in configuration; a security baseline written for one cloud will not transfer as copy-paste Terraform to another, only the pattern transfers.
You're asked to implement automated misconfiguration detection and reporting for a multi-account AWS environment. Propose an architecture that uses native services (AWS Config, Security Hub, GuardDuty), IaC scanning (Checkov, tfsec), and policy engines (OPA/Sentinel). Explain how findings flow to a central dashboard, how you would prioritize issues, and strategies for automated remediation versus human-reviewed remediation.
Sample Answer
Direct answer
Automated misconfiguration detection for a multi-account AWS environment layers three native services and two external tool categories into one pipeline, AWS Config and Security Hub for continuous configuration and finding aggregation, GuardDuty for behavioral threat detection, IaC (infrastructure-as-code) scanning (Checkov/tfsec) for pre-deployment prevention, and policy engines (OPA/Sentinel) for plan-time enforcement, feeding one central dashboard; the design decision that matters most is not which tools to use, all of these are reasonably standard choices, it is which findings get automated remediation versus which get routed to a human, since that boundary determines whether the system is trustworthy or dangerous.
Structured elaboration
Native service roles. AWS Config continuously evaluates every resource's configuration against managed and custom rules across every account, the primary source of configuration-drift and misconfiguration findings. Security Hub aggregates findings from Config, GuardDuty, and any third-party integrated tool into one normalized finding format and one dashboard, serving as the central aggregation point rather than each source having its own separate view. GuardDuty adds behavioral, threat-intelligence-driven detection (an unusual API call pattern, a known-malicious IP contacted) that configuration-based Config rules structurally cannot provide, since Config checks state, not behavior over time.
IaC scanning role. Checkov or tfsec run in the CI (continuous integration) pipeline against every infrastructure-as-code change before it merges, catching a misconfiguration before it is ever deployed, the cheapest point in the whole pipeline to catch a finding, since it requires no live cloud resource to exist yet.
Policy engine role. OPA/Sentinel evaluates the fully-resolved terraform plan output (or an equivalent for another IaC tool) at plan time, catching a misconfiguration that only resolves once variables and modules are fully computed, which static IaC scanning alone can miss; this is a preventive gate specifically for changes that go through the IaC pipeline, distinct from Config's detective, always-on coverage of the account regardless of how a resource got there.
How findings flow to a central dashboard
Every source (IaC scanning, policy-engine plan-time checks, Config, GuardDuty) emits findings in, or normalized into, the AWS Security Finding Format, feeding into Security Hub, which serves as Aggregation account's own delegated-administrator view across every member account in the AWS Organization, consistent with the delegated-administrator pattern used for centralized security tooling throughout this domain. From Security Hub, findings route into the organization's existing ticketing system (via an EventBridge rule triggering a Lambda function or a native integration), so the dashboard is not the only place a finding lives, it also becomes tracked, assigned work in the tool the responsible team already uses daily.
Prioritization
Findings are scored by a combination of severity (the source tool's own rating), exploitability (is the affected resource internet-reachable right now), and business context (is the account tagged as production, does the resource hold sensitive data), rather than a flat severity list that would treat a critical finding on an isolated development resource the same as an identical finding on an internet-facing production one.
Automated remediation versus human-reviewed remediation
Automated remediation is reserved for a narrow, explicitly reviewed list of finding types where the fix is unambiguous and reversible (re-enabling S3 Block Public Access, closing a security-group rule matching a known-bad pattern with no legitimate business justification ever recorded for it), triggered directly from a Config rule's non-compliant state via an automated remediation action (a Systems Manager Automation document, or an equivalent), with the remediation action itself logged as its own auditable event. Everything else routes to human review: a finding whose "correct" fix depends on context the automated system cannot evaluate (an unusually broad but potentially legitimate permission grant, a resource whose configuration might be intentional for a specific business reason) becomes a ticket with a severity-based service-level agreement (SLA), not an automatic action, since auto-remediating a context-dependent finding risks breaking a legitimate configuration the automated system had no way to distinguish from a genuine misconfiguration.
Worked example
A developer's Terraform pull request adding a new S3 bucket without Block Public Access enabled is caught by Checkov at the IaC-scanning stage, blocking merge before any resource is created, the cheapest possible catch. A separate, unrelated change made directly through the console (bypassing IaC entirely) opens a security-group rule to 0.0.0.0/0 on port 22; AWS Config's continuous evaluation flags this within its next scheduled evaluation cycle, and because this exact pattern (SSH open to the world, no recorded business justification) is on the narrow auto-remediation list, an automated remediation action reverts the rule within minutes, logging the action and notifying the resource's owning team after the fact. A third finding, a database security group permitting inbound access from a broader internal CIDR range than the organization's general policy prefers, does not match any auto-remediation pattern (the "correct" fix depends on whether a specific application dependency actually needs that broader range), so it routes to a ticket with a 7-day SLA for the owning team to review and either narrow the rule or document the justification.
Trade-offs and pitfalls
- The auto-remediation list is the single highest-stakes design decision in this architecture, and it needs to stay narrow and under continuous review, not grow opportunistically every time a new "obviously safe" pattern is proposed; the worked example's SSH-open-to-the-world case is genuinely unambiguous, but a broader or more context-dependent pattern added to the same list without the same scrutiny risks an automated action breaking a legitimate configuration.
- GuardDuty's behavioral detection and Config's configuration-state detection catch fundamentally different things, and a design that treats them as redundant (or worse, only implements one) misses half of what this layered approach is built to catch; Config would never flag an unusual API call pattern, and GuardDuty would never flag a static, unchanging misconfiguration that was simply never actually exploited.
- IaC scanning and Config together still leave a real gap: a change made entirely outside the IaC pipeline, caught only by Config's own continuous, out-of-band evaluation, not prevented at merge time. The worked example's console-made security-group change demonstrates this directly; the design's real strength is that Config's detective coverage exists specifically because IaC scanning's preventive coverage cannot see everything.
- Routing every finding to Security Hub and then to a ticketing system only delivers real value if the ticket routing correctly identifies the owning team via resource tagging; a finding routed to the wrong team, or to no team at all because tagging was incomplete, sits unactioned regardless of how well the detection and aggregation layers themselves are working.
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.