An EC2 instance has an attached IAM role that explicitly denies all Amazon S3 API actions. The same instance also has an AWS credentials file containing an access key and secret access key that grant full administrative privileges. Given these multiple IAM access methods on the instance, which statement is correct?
Choose an answer
Tap an option to check your answer.
Correct answer: The EC2 instance will not be able to perform any S3 action on any S3 bucket..
Why this is the answer
AWS IAM follows an explicit deny over explicit allow principle. If any policy in the evaluation chain explicitly denies an action, that action is denied, regardless of other policies that might explicitly allow it. In this scenario, the IAM role attached to the EC2 instance explicitly denies all Amazon S3 API actions. Even though the AWS credentials file grants full administrative privileges, the explicit deny from the attached IAM role takes precedence. Therefore, the EC2 instance will not be able to perform any S3 actions. The options suggesting partial or full S3 access are incorrect because the explicit deny overrides any allowances.
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