AWS IAM and Security

Two things carry most AWS security questions: what the shared responsibility model puts on your side of the line, and how IAM resolves a request when several policies apply. The evaluation table is the one that decides exam answers.

Policy evaluation, in order

StepRule
1An explicit Deny anywhere wins. Nothing overrides it
2Service control policies must allow it
3Resource-based policy Allow is checked
4Identity-based policy Allow is checked
5Permission boundaries must allow it
6No matching Allow means implicit deny

IAM building blocks

ObjectWhat it isWhen to use
UserA long-lived identity with credentialsA person. Avoid for workloads
GroupA collection of usersAttach policies once, not per user
RoleAn identity assumed temporarilyServices, cross-account, federated users
Instance profileA role attached to EC2Never put keys on an instance
Identity-based policyAttached to a user, group or roleMost permissions
Resource-based policyAttached to a resourceS3 buckets, KMS keys, cross-account
Permission boundaryA ceiling on a principalDelegating admin safely
Service control policyAn org-wide ceilingGuardrails across accounts
Root userThe account ownerLock it, enable MFA, never use daily

Shared responsibility

AWS is responsible forYou are responsible for
Physical facilities and hardwareYour data and how it is classified
The hypervisor and host OSGuest OS patching on EC2
Managed service infrastructureIAM users, roles and permissions
Network infrastructureSecurity groups and network ACLs
Encryption capability (KMS)Choosing to encrypt, and key policy
Availability of the serviceArchitecting your workload for it

Security services

ServiceWhat it does
IAM Identity CenterWorkforce single sign-on across accounts
KMSManaged encryption keys
CloudHSMDedicated hardware security module
Secrets ManagerSecret storage with rotation
GuardDutyThreat detection from logs and DNS
InspectorVulnerability scanning of workloads
MacieFinds sensitive data in S3
Security HubAggregates findings against standards
CloudTrailRecords API calls. The audit log
ConfigRecords resource configuration and drift
WAFLayer 7 filtering
ShieldDDoS protection, Standard is automatic

Now test yourself

Memorizing a table is a start. Practice questions are what make it stick, and every answer carries the full explanation.