Company: Amazon | Difficulty: Easy
A security audit has flagged the IAM user app-deployer for having AdministratorAccess policy with far more permissions than needed. The user only needs access to:
- S3: Read (GetObject) and Add objects (PutObject), list buckets (ListBucket).
- CloudWatch Logs: Create log groups (CreateLogGroup), log streams (CreateLogStream), and put log events (PutLogEvents).
- Inspect the current policies attached to the
app-deployeruser - Remove the overly broad
AdministratorAccesspolicy - Create a custom managed policy named
AppDeployerPolicythat grants only the required permissions listed above - Attach the new policy to the
app-deployeruser
Note: You can use either the AWS Management Console or AWS CLI to complete this task.