IAM: the foundations
IAM is global, not regional. Every request is evaluated as an explicit DENY beats an explicit ALLOW, which beats the default implicit DENY. New identities have no permissions until a policy grants them.
- Users, groups and roles all attach policies (JSON documents).
- Roles are the exam favourite: they grant temporary credentials via STS (AssumeRole), used for cross-account access, EC2/Lambda execution, and federation. No long-term keys involved.
- Policy types: identity-based (attached to user/group/role), resource-based (attached to the resource, e.g. S3 bucket policy, allows cross-account without a role), and permissions boundaries (cap the maximum permissions an identity can have).
- IAM access keys should be rotated regularly; the exam expects you to know root account keys should never be used day-to-day.
Cognito: user identity for apps
Cognito has two separate pools and mixing them up is the classic trap.
- User Pools: sign-up/sign-in directory. Issues JWTs (ID, access, refresh tokens) after authentication. Supports MFA, hosted UI, social/SAML federation.
- Identity Pools: exchange a token (from a User Pool, Google, Facebook, SAML) for temporary AWS credentials via STS, so the app can call AWS services directly.
- Remember: User Pool = authentication (who are you), Identity Pool = authorization to AWS resources (what can you touch).
- Access tokens from a User Pool expire (default 1 hour); refresh tokens default to 30 days.
KMS: encryption keys
KMS manages Customer Master Keys (CMKs, now called KMS keys) used to encrypt data, never the data itself directly for large payloads.
- Envelope encryption is the pattern: KMS encrypts a data key, the data key encrypts your actual data (get this for any 'large file' question).
- Symmetric CMKs are default and cannot be exported; asymmetric keys exist for sign/verify or encrypt/decrypt outside AWS.
- Key policies (resource-based) control access to a CMK and always take precedence in the evaluation alongside IAM.
- KMS API calls (Encrypt, Decrypt, GenerateDataKey) are logged to CloudTrail — good for audit questions.
- Automatic key rotation is available for symmetric CMKs on a yearly cycle when enabled.
Secrets Manager vs Parameter Store
Both store config, but the exam tests the differences hard.
- Secrets Manager: built-in automatic rotation (via Lambda), charges per secret per month plus API calls, native RDS/Redshift/DocumentDB rotation templates.
- Systems Manager Parameter Store: free tier (standard parameters), no built-in rotation (you'd script it), supports plain strings, string lists, and SecureString (KMS-encrypted).
- SecureString parameters need kms:Decrypt permission as well as ssm:GetParameter.
- Common mistake: assuming Parameter Store rotates secrets automatically — it does not, you must build that yourself.
Common exam traps
- Confusing resource policies (can grant cross-account access directly) with identity policies (cannot, by themselves, grant access to another account's resource).
- Forgetting that STS temporary credentials are short-lived and must be refreshed, not cached forever.
- Thinking Cognito Identity Pools handle sign-in UI — they don't, that's User Pools.
Is IAM a global or regional AWS service?
Global — IAM is not scoped to a region.
tap to reveal
In IAM policy evaluation, what wins: explicit DENY, explicit ALLOW, or implicit DENY?
Explicit DENY always wins, then explicit ALLOW, then the default implicit DENY applies if nothing matches.
tap to reveal
What AWS service issues temporary credentials when an IAM Role is assumed?
AWS STS (Security Token Service), via the AssumeRole API.
tap to reveal
What is the key difference between a Cognito User Pool and an Identity Pool?
User Pool = authentication directory issuing JWTs; Identity Pool = exchanges tokens for temporary AWS credentials to access AWS resources.
tap to reveal
What is the default expiry for a Cognito User Pool access token?
1 hour by default.
tap to reveal
What is the default expiry for a Cognito User Pool refresh token?
30 days by default.
tap to reveal
What is envelope encryption in KMS?
KMS encrypts a data key; that data key is then used to encrypt the actual data, rather than KMS encrypting the data directly.
tap to reveal
Can a symmetric KMS CMK be exported outside of KMS?
No, symmetric KMS keys cannot be exported.
tap to reveal
Does Secrets Manager or Parameter Store offer built-in automatic secret rotation?
Secrets Manager, using a Lambda function; Parameter Store has no built-in rotation.
tap to reveal
What permission, besides ssm:GetParameter, is needed to read a SecureString parameter?
kms:Decrypt on the KMS key used to encrypt it.
tap to reveal
Which policy type can grant cross-account access without the requester assuming a role?
Resource-based policies, e.g. an S3 bucket policy or a KMS key policy.
tap to reveal
What does a permissions boundary do in IAM?
It sets the maximum permissions an identity can have, capping what any attached policies can grant.
tap to reveal
How often can automatic key rotation occur for a symmetric KMS CMK?
Yearly, when automatic rotation is enabled.
tap to reveal
Which is free: Secrets Manager or Parameter Store standard parameters?
Parameter Store standard parameters are free; Secrets Manager charges per secret per month.
tap to reveal