AWS 185: Architecture: apply identity, network, data, detection, and compliance controls in layers
Why this lesson matters
Apply identity, network, data, detection, response, and compliance controls to threats and responsibilities without relying on one perimeter.
What you will be able to do
By the end, you can:
- explain architecture: apply identity, network, data, detection, and compliance controls in layers in plain language;
- locate the current service controls in the AWS Management Console;
- run the matching CloudShell or AWS CLI queries and explain every important field;
- draw the identity, network, data, failure, and monitoring path;
- choose the service from requirements and reject it when those requirements are absent;
- diagnose a failed or misleading result from evidence;
- state the cost owner and prove cleanup or a no-create result.
Before you start
- Use a personal AWS account only when its owner has approved the lesson. Do not use the root user for daily work.
- CloudShell is the default command environment. AWS028 explains CloudShell; AWS029 and AWS030 explain local AWS CLI installation and profiles.
- The course example Region is
ap-south-1. Global services and services with a required control Region are called out in their commands. - Run
aws sts get-caller-identityprivately. Redact the account number before sharing evidence. - Never paste access keys, passwords, secret values, private object data, presigned URLs, or full account-specific ARNs into a submission.
- This is a no-create lesson. Every Console action and AWS CLI command is read-only. Create the practical artifact locally.
- Console wording can change. Use the Console service search if a menu label has moved, then confirm the current field in the official documentation.
The core model
| Question | What it means in this lesson |
|---|---|
| Purpose | Apply identity, network, data, detection, response, and compliance controls to threats and responsibilities without relying on one perimeter. |
| Scope and boundary | The learner must identify the account and Region scope, resource boundary, identity path, data or network path, failure behavior, observability, and cleanup ownership for Layered security architecture. |
| Evidence of success | Success means the Console fields, CLI result, workload behavior, monitoring evidence, and architecture claim agree. An available state alone is not enough for Layered security architecture. |
| Cost model | Requests, running capacity, storage, logs, data transfer, retained state, and optional features must be priced for the exact design. |
| Safe rejection rule | Avoid check-box security, overlapping tools without ownership, or controls that cannot be tested and recovered. |
How the request flows
+----------------------+
| Asset and threat |
+----------------------+
|
v
+----------------------+
| Preventive control |
+----------------------+
|
v
+----------------------------------+
| Detective and response control |
+----------------------------------+
|
v
+------------------------------------+
| Recovery and compliance evidence |
+------------------------------------+
Start with threats, assets and responsibilities
Defense in depth is not buying one service per layer. Identify data/assets, actors, entry points, trust boundaries, abuse cases, regulatory duties, business impact and shared-responsibility owner. Then select controls that prevent, detect, contain, recover and prove. Every control needs scope, operator, evidence, failure mode, cost and exception lifecycle.
| Security function | Example controls | Evidence of operation |
|---|---|---|
| Govern | Organizations, account/OU separation, SCP/RCP, Control Tower, Config rules, tag policy | policy assignment, coverage inventory, exception expiry |
| Identify/protect identity | IAM Identity Center, federation, MFA/passkeys, roles, least privilege, Access Analyzer | sign-in/assumption events, access review, unused permission reduction |
| Protect edge/network | Route 53, CloudFront, WAF, Shield, SG/NACL, Network Firewall, endpoints | DNS/listener/routing config, WAF/firewall/flow logs, reachability tests |
| Protect data | classification, S3 controls, KMS, Secrets Manager, ACM, backup/immutability | key policy/use, secret rotation, TLS test, restore test, access logs |
| Detect/investigate | CloudTrail, Config, GuardDuty, Inspector, Macie, Security Hub, Detective | regional coverage, finding timeline, correlated immutable events |
| Respond/recover | EventBridge, Step Functions, SSM Automation, isolation, credential revocation, backup/DR | approved runbook execution, rollback, recovery result and post-incident review |
| Assure | Artifact, Audit Manager, evidence account, control testing | scoped, time-bound evidence mapped to owner and requirement |
Apply controls to the request path
For an internet application, trace: authoritative DNS → CloudFront/Shield/WAF → ALB/API endpoint → workload identity and SG → secret retrieval → encrypted database/object store → logs/findings → response workflow → backup restore. At every arrow ask who authenticates whom, what is encrypted, what policy allows it, how bypass is prevented, what logs prove it, and what happens when that dependency fails.
Preventive controls reduce likelihood but can fail or be bypassed. Detective controls must have signal, owner and response SLA. Corrective controls should be reversible and tested. Recovery controls need RTO/RPO evidence. Compensating controls require a documented gap and expiry, not permanent exception language.
Multi-account security architecture
Use workload accounts to reduce blast radius, a Log Archive account for protected organization logs, a Security Tooling account for delegated security administration and findings, and dedicated Network/Shared Services accounts where scale justifies them. Keep the Organizations management account minimally used. Delegate services only where supported and verify each account/Region; aggregation is not collection.
Central controls can create a new concentration of privilege. Protect security/log accounts with restricted break-glass access, hardware-backed MFA, immutable/retained logs, key separation, monitored policy changes and tested recovery. Disable unused Regions or deploy baseline logging/detection there.
Threat-to-control decisions
| Threat/failure | Prevent | Detect | Respond/recover |
|---|---|---|---|
| Stolen administrator session | federation, phishing-resistant MFA, short sessions, SCP guardrails | CloudTrail/GuardDuty anomalous activity | revoke sessions/keys, isolate, investigate changes, restore policy |
| Public object or data exfiltration | block public access, resource policies, endpoints, KMS | Config/Access Analyzer/Macie/CloudTrail data events | block path, preserve evidence, rotate affected secrets, assess disclosure |
| Web exploit/DDoS | patching, WAF, CloudFront/Shield, origin isolation, throttling | WAF/Shield/app logs and GuardDuty | block/tune rule, scale/backpressure, SRT/runbook, repair application |
| Vulnerable compute artifact | hardened pipeline, signed/immutable artifacts | Inspector and runtime/detection telemetry | rebuild, canary deploy, prove running digest and rescan |
| Key/secret misuse | least privilege, context/conditions, rotation, no plaintext distribution | KMS/Secrets CloudTrail and anomaly findings | revoke/rotate, contain caller, re-encrypt if required, verify consumers |
| Region/account loss | IaC, backups/copies, quota/capacity and identity preparation | health and replication/backup alarms | tested failover/restore with RTO/RPO and failback |
Architecture decision table
| Situation | Direction | Reason |
|---|---|---|
| Requirement matches | Use layered controls where one failure does not expose the asset and every signal has an owner. | Select only after scope, behavior, security, recovery, operations, and price evidence agree. |
| Requirement does not match | Avoid check-box security, overlapping tools without ownership, or controls that cannot be tested and recovered. | Rejecting an attractive service is a valid architecture result. |
| No create permission or cost approval | Use supplied evidence and local design work | Learning does not depend on creating an hourly resource. |
| Existing resource is unknown or unowned | Inspect only, then stop | Never change or delete a resource merely because it resembles a course example. |
AWS Management Console, step by step
Sign in with the normal non-root learning identity. Write the expected starting state before opening the service.
- Use the Console service search and open IAM Access Analyzer, VPC controls, KMS, security findings, Config, and Audit Manager read-only views; confirm the account and Region before reading the page.
- Inspect the supplied or owned resource's status, configuration, permissions, networking, encryption, monitoring, tags, and dependencies without changing it.
- Open the related metrics, logs, events, or history view and record one timestamped signal that would prove or disprove the expected behavior.
- Return to the resource list, clear filters, and record the final inventory. On the read-only track, do not choose Create, Save, or Delete.
CloudShell and AWS CLI, step by step
Start with a known caller and Region:
export AWS_DEFAULT_REGION="ap-south-1"
aws sts get-caller-identity --query Arn --output text
aws configure list
Redact the account part of the ARN in shared evidence. Now run the topic queries:
aws accessanalyzer list-analyzers --query 'analyzers[].{Name:name,Type:type,Status:status}' --output table
aws ec2 describe-security-groups --query 'SecurityGroups[].GroupId' --output text
aws kms list-aliases --query 'Aliases[].AliasName' --output text
aws guardduty list-detectors --output text
aws configservice describe-configuration-recorders --output table
Expected interpretation
A secure architecture ties each control to a threat, asset, owner, observable event, tested response, exception, and recovery path. More products do not automatically mean better security.
Practical work
Threat-model the P05 application for stolen credentials, public exposure, injection, data theft, malicious dependency, DDoS, insider change, deleted data, and audit request. Assign preventive, detective, responsive, and recovery controls.
Diagnose this topic from its own evidence
- A service enabled in one Region is a coverage claim, not organization proof; enumerate accounts, Regions, resource eligibility and delegated status.
- If a preventive control blocks production, use break-glass and rollback evidence, then correct policy safely - do not permanently bypass it.
- If findings have no owner/SLA, detection is not an operating control; route and test failure delivery.
- If compliance report says passed but restore/incident tests fail, the control design or evidence is insufficient.
- During review, identify single points of control-plane privilege, log tampering, key deletion, DNS/origin bypass and untested recovery.
Cost and cleanup
Requests, running capacity, storage, logs, data transfer, retained state, and optional features must be priced for the exact design.
Knowledge check
- What operational purpose is this lesson solving?
Expected direction: Apply identity, network, data, detection, response, and compliance controls to threats and responsibilities without relying on one perimeter.
- Which scope or ownership boundary must be proved first?
Expected direction: The learner must identify the account and Region scope, resource boundary, identity path, data or network path, failure behavior, observability, and cleanup ownership for Layered security architecture.
- What evidence is strong enough to accept the result?
Expected direction: Success means the Console fields, CLI result, workload behavior, monitoring evidence, and architecture claim agree. An available state alone is not enough for Layered security architecture.
- Which tempting design or shortcut must be rejected?
Expected direction: Avoid check-box security, overlapping tools without ownership, or controls that cannot be tested and recovered.
- Which cost dimensions and retained resources need an owner?
Expected direction: Requests, running capacity, storage, logs, data transfer, retained state, and optional features must be priced for the exact design.
Lesson acceptance
- Produce a threat model and end-to-end request/data/evidence diagram for P05.
- Map every major threat to preventive, detective, responsive and recovery controls with owners.
- Separate workload, management, security tooling, logs, network and shared services account duties.
- Prove account/Region/resource coverage and identify aggregation-versus-collection gaps.
- Present costs, residual risks, exceptions, rollback and test evidence - not just a list of AWS services.