D2: Defining Permissions for IAM Principals
AWS Associate AWS Certified Developer – Associate exam practice questions · 10 flashcards
Question
IAM policy elements?
1 / 10
Tip: Space flips the card, ← / → navigate.
Show all 10 Defining Permissions for IAM Principals practice questions and answers
- IAM policy elements?Effect, Action, Resource, Condition, Principal (resource policies).
- Identity-based vs resource-based policies?Identity: attached to users/roles. Resource: attached to resources, specify Principal.
- Lambda execution role?IAM role Lambda assumes to access other AWS services.
- ECS task role vs execution role?Task role: permissions for the app code. Execution role: pull images from ECR and write logs.
- Least privilege for a function writing to one table?Allow dynamodb:PutItem on that table ARN only.
- Policy variables?e.g. ${aws:username} or ${cognito-identity.amazonaws.com:sub} for per-user resource paths.
- IAM Access Analyzer for developers?Validate policies and generate least-privilege policies from activity.
- Wildcard risks?"Action": "*" or "Resource": "*" grants excessive access.
- Explicit deny effect?Overrides any allow.
- Scenario: each user may only access their own S3 prefix. Approach?Policy variables with Cognito identity ID in the resource ARN.