Volume 3 · Chapter 12 — Identity, Security and Compliance
Volume Summary and Interview Rapid-Fire
12.1 What This Volume Covered
This volume covered the security control plane of AWS: IAM users, groups, and roles and the primacy of least privilege; how policies are written and evaluated (with the decisive “explicit deny always wins” rule); roles, STS, and temporary credentials as the mechanism for secure workload, human, and cross-account access; KMS and encryption for protecting data at rest and in transit; secrets management with Secrets Manager and Parameter Store; and the detective and governance layer of CloudTrail, Config, GuardDuty, Security Hub, WAF, Shield, and Organizations with SCPs. The unifying theme is defense in depth built on a few durable principles: least privilege everywhere, no stored long-lived credentials, encrypt everything, and pair prevention with detection and central governance. The rest of this chapter consolidates the essentials for rapid review.
12.2 Rapid-Fire Interview Questions
Why are roles preferred over IAM users with access keys?
Roles provide temporary, auto-expiring credentials via STS with nothing long-lived stored to leak. Workloads get a role and receive auto-rotating credentials (no keys in code); people assume roles via SSO+MFA for temporary access. Long-lived keys are the most common breach source, so roles eliminate them.
State the IAM policy evaluation rule.
Implicit default deny → an explicit Allow grants → an explicit Deny overrides everything. Explicit deny always wins, which is what makes SCPs and permission boundaries into unbreakable org-wide guardrails.
Identity-based vs resource-based policy?
Identity-based attaches to a user/role (“what can this identity do”); resource-based attaches to a resource (“who can access this resource”). Resource policies matter most for cross-account access and shared resources like KMS keys, buckets, and queues.
What is envelope encryption?
KMS issues a data key (plaintext + encrypted copy); you encrypt data locally with the plaintext key, store the encrypted data key beside the data, and discard the plaintext key. Decrypt by asking KMS to unwrap the data key. The master key never leaves KMS and large data isn’t shipped to it.
Encryption in transit vs at rest?
In transit protects data on the network (TLS); at rest protects stored data (KMS-backed encryption on S3, EBS, RDS, DynamoDB). They’re independent - apply both. Key policies control who can decrypt, making encryption an access boundary too.
Secrets Manager vs Parameter Store?
Secrets Manager is purpose-built with automatic rotation for high-value credentials (DB passwords, API keys). Parameter Store is a cost-effective config-and-secret store without built-in rotation. Both are KMS-encrypted, IAM-controlled, and fetched at runtime via the app’s role - never hard-coded.
How should a workload authenticate to AWS services?
By assuming an attached IAM role (instance profile, function role, or EKS service-account association) and using the temporary credentials automatically provided - never embedded access keys. Each workload gets its own least-privilege role.
What does CloudTrail provide, and where should its logs go?
A complete audit trail of every API call (who, what, which resource, when, from where) for investigation, compliance, and detection. Send it to a centralized, tamper-resistant logging account so the record can’t be altered by an attacker covering their tracks.
GuardDuty vs Config vs Security Hub?
GuardDuty detects threats from activity and network analysis; Config tracks resource configuration and compliance drift; Security Hub aggregates findings from both (and more) into one prioritized posture view. Detective controls layered on top of CloudTrail visibility.
What do SCPs do and why are they powerful?
Service control policies enforce guardrails across all accounts in an Organization - deny disabling encryption, public buckets, or non-approved Regions. Because an explicit deny overrides any allow beneath, they’re hard limits no account administrator can exceed. Prefer preventive SCPs over merely detecting violations.
12.3 Closing
Security on AWS is the customer’s most consequential responsibility, and this volume’s principles recur throughout the series: least privilege on every identity, no stored long-lived credentials, encryption of data in transit and at rest with governed keys, secrets retrieved at runtime rather than embedded, and a layered posture that pairs prevention with detection and central governance. These controls protect everything the later volumes build - compute, storage, data pipelines, and system designs - which is why identity and security come early. Next, the series turns to where applications actually run: compute and containers.