An application running on EC2 instances must be able to write objects to an Amazon S3 bucket. Which policy should the developer update so the instances can write to S3?
Choose an answer
Tap an option to check your answer.
Correct answer: The IAM policy attached to the EC2 instance profile role.
Why this is the answer
The IAM policy attached to the EC2 instance profile role is the correct place to define permissions for an EC2 instance to interact with other AWS services like S3. When an EC2 instance launches with an instance profile, it assumes the associated IAM role, and the permissions defined in that role's policies dictate what actions the instance can perform. The session policy applied to the EC2 instance role session is incorrect because session policies are temporary and typically used for fine-grained access control during a specific session, not for persistent instance permissions. The AWS KMS key policy attached to the EC2 instance profile role is incorrect because KMS key policies control access to KMS keys, not S3 bucket write operations directly. The Amazon VPC endpoint policy is incorrect because VPC endpoint policies control access to AWS services through a VPC endpoint, but the fundamental permissions still originate from the IAM role.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed