A developer operations team uses AWS Identity and Access Management (IAM) to manage user permissions. The team created an Amazon EC2 instance profile role that uses an AWS managed ReadOnlyAccess policy. When an application that is running on Amazon EC2 tries to read a file from an encrypted Amazon S3 bucket, the application receives an AccessDenied error.
The team administrator has verified that the S3 bucket policy allows everyone in the account to access the S3 bucket. There is no object ACL that is attached to the file.
What should the administrator do to fix the IAM access issue?
- Edit the ReadOnlyAccess policy to add kms:Decrypt actions
- Add the EC2 IAM role as the authorized Principal to the S3 bucket policy
- Attach an inline policy with kms:Decrypt permissions to the IAM role
- Attach an inline policy with S3:* permissions to the IAM role
Reveal Solution Next Question