Question 1,384 of 318
EC2 Instance Profile Missing — IAM Role Access Denied
A company uses an IAM role to allow an EC2 instance to access an S3 bucket. The role has an attached policy that grants s3:GetObject on the bucket. However, the application on the EC2 instance is unable to read objects. What is the MOST likely cause?
Quick Answer
The application cannot read from S3 because an IAM role by itself is just a set of permissions sitting on the shelf; an EC2 instance can only use that role's credentials if the role has been attached to the instance through an IAM instance profile. Without that association, the instance has no way to assume the role and never receives temporary credentials, so from the application's point of view it looks exactly like it has no permissions, even though the role itself is correctly configured with s3:GetObject. This is worth being precise about: the role holds the policy and permissions, but the instance profile is the mechanism that actually connects that role to a running EC2 instance and makes its credentials retrievable from the instance metadata service. The other explanations fit less well: a bucket policy denying access is possible in general but weaker once the role's own policy is confirmed correct, IAM policies attach to roles and users rather than instances directly so that isn't the gap, and a user data script has no bearing on IAM permissions since it only runs commands at boot. Whenever an EC2-to-AWS-service permissions problem describes a role with an apparently correct policy that still isn't working, check first whether the role is attached to the instance via an instance profile, since a policy that's never assumed cannot grant anything.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The EC2 instance does not have an IAM instance profile configured.
For an IAM role to be used by an EC2 instance, the role must be associated with an instance profile, and that profile must be attached to the instance. Without the instance profile, the instance cannot assume the role, so the application lacks the necessary permissions to read from S3. Option A is incorrect because the bucket policy denying access would be a possible cause, but it is not the most likely given that the role already has the s3:GetObject permission. Option C is incorrect because policies are attached to roles, not instances directly. Option D is incorrect because the user data script does not affect IAM permissions.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The S3 bucket policy denies access to the IAM role.
Why it's wrong here
Could be a cause, but the bucket policy is not mentioned as denying access.
- ✓
The EC2 instance does not have an IAM instance profile configured.
Why this is correct
Without an instance profile, the role credentials are not available to the instance.
- ✗
The policy is attached to the EC2 instance instead of the role.
Why it's wrong here
Policies can only be attached to IAM identities, not directly to EC2 instances.
- ✗
The EC2 instance is not running the latest user data script.
Why it's wrong here
User data does not affect IAM role usage.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on SCS-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Refer to the exhibit. An EC2 instance with an IAM role attached attempts to access an S3 bucket, but receives an 'AccessDenied' error. The role has an attached policy allowing s3:GetObject on the bucket. What is the most likely cause?
medium- ✓ A.The S3 bucket policy denies access to the role.
- B.The IAM policy is not attached to the role.
- C.The trust policy does not allow the EC2 service to assume the role.
- D.The EC2 instance does not have an instance profile associated with the role.
Why A: Even though the IAM role has an attached policy allowing s3:GetObject on the bucket, the S3 bucket policy can explicitly deny access to the role, which overrides the IAM policy. Options B, C, and D are incorrect because the role policy is attached, the trust policy allows EC2 to assume the role, and the instance profile is associated (otherwise the role would not be used).
Last reviewed: Jun 20, 2026
This SCS-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SCS-C02 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.