Bird
0
0

You want to apply the least privilege principle for a developer who needs to manage Lambda functions but only in the dev-environment. Which approach is best?

hard📝 Best Practice Q15 of 15
AWS - Identity and Access Management
You want to apply the least privilege principle for a developer who needs to manage Lambda functions but only in the dev-environment. Which approach is best?
AGive the developer admin access to manage Lambda
BCreate an IAM policy allowing all Lambda actions on all functions
CAttach the AWS managed policy <code>AWSLambdaFullAccess</code> to the developer
DCreate an IAM policy allowing only Lambda actions on functions with resource ARN containing <code>dev-environment</code>
Step-by-Step Solution
Solution:
  1. Step 1: Identify the scope of access needed

    The developer needs to manage Lambda functions only in the dev-environment.
  2. Step 2: Apply least privilege by limiting actions and resources

    Create an IAM policy allowing only Lambda actions on functions with resource ARN containing dev-environment restricts Lambda actions to only functions in dev-environment, minimizing risk.
  3. Step 3: Evaluate other options

    Options B, C, and D grant broader access than needed, violating least privilege.
  4. Final Answer:

    Create an IAM policy allowing only Lambda actions on functions with resource ARN containing dev-environment -> Option D
  5. Quick Check:

    Least privilege = limit actions + resource scope [OK]
Quick Trick: Limit permissions by resource tags or names [OK]
Common Mistakes:
  • Using broad AWS managed policies
  • Granting admin or full access unnecessarily
  • Ignoring resource-level restrictions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes