nerdexam
Amazon

SCS-C02 · Question #235

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 Readonly Access…

The correct answer is C. Attach an inline policy with kms Decrypt permissions to the IAM role. Attaching an inline policy with kms:Decrypt to the IAM role is correct because the AccessDenied error is not an S3 permissions problem - it's a KMS permissions problem. When S3 objects are encrypted with a KMS key, reading them requires both S3 read permissions (already granted…

Submitted by lukas.cz· Mar 6, 2026Identity and Access Management

Question

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 Readonly Access 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?

Options

  • AEdit the ReadOnlyAccess policy to add kms:Decrypt actions.
  • BAdd the EC2 IAM role as the authorized Principal to the S3 bucket policy.
  • CAttach an inline policy with kms Decrypt permissions to the IAM role
  • DAttach an inline policy with S3: * permissions to the IAM role.

How the community answered

(47 responses)
  • A
    4% (2)
  • B
    2% (1)
  • C
    83% (39)
  • D
    11% (5)

Explanation

Attaching an inline policy with kms:Decrypt to the IAM role is correct because the AccessDenied error is not an S3 permissions problem - it's a KMS permissions problem. When S3 objects are encrypted with a KMS key, reading them requires both S3 read permissions (already granted via ReadOnlyAccess) and kms:Decrypt permission, which ReadOnlyAccess does not include. An inline policy scoped to the specific role follows least-privilege best practice without affecting other identities.

  • A is wrong because AWS managed policies cannot be edited by customers - they are owned and controlled by AWS.
  • B is wrong because the S3 bucket policy already grants account-wide access; the bottleneck is KMS, not S3.
  • D is wrong because the role already has S3 read access via ReadOnlyAccess, and adding S3:* does nothing to address the KMS decryption requirement - plus it's overly permissive.

Memory tip: Whenever you see "encrypted S3" + "AccessDenied" despite valid S3 permissions, think "two locks, one key isn't enough" - S3 read and KMS decrypt are separate permission gates that must both be open.

Topics

#IAM Roles#S3 Encryption#KMS Decryption#Access Denied Troubleshooting

Community Discussion

No community discussion yet for this question.

Full SCS-C02 Practice