DVA-C02 Security Practice Question
A developer is troubleshooting an issue where an EC2 instance cannot access an S3 bucket. The instance has an IAM role with a policy that allows s3:GetObject on the bucket. Which TWO additional checks should the developer perform to resolve the issue?
⚠ Common exam trap
The trap here is that candidates often focus only on IAM policies or network controls (NACLs/security groups) and overlook the combination of bucket policies with explicit denies and KMS encryption permissions, which are common real-world blockers.
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
✓
Check if the S3 bucket policy has an explicit deny statement that affects the EC2 instance.
S3 bucket policies can explicitly deny access even if the IAM role attached to the EC2 instance grants s3:GetObject. An explicit deny in a bucket policy overrides any allow, so checking for such a deny statement is essential. Option E is correct because if the S3 bucket uses SSE-KMS encryption, the EC2 instance's IAM role must have kms:Decrypt permissions to decrypt the object; without it, GetObject requests will fail.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Check the network ACLs for the subnet.
Why it's wrong here
Network ACLs (NACLs) operate at the subnet level, providing stateless packet filtering. While they can restrict inbound and outbound traffic, S3 is a public AWS service endpoint. EC2 instances typically access S3 via the Internet Gateway, and NACLs are generally not configured to block access to specific AWS public endpoints unless there's an extremely restrictive outbound rule denying all traffic on common HTTPS ports (443) to the internet. Therefore, NACLs are rarely the direct cause of S3 access issues.
- ✓
Check if the S3 bucket policy has an explicit deny statement that affects the EC2 instance.
Why this is correct
An explicit deny statement within an S3 bucket policy takes precedence over any allow statements, including those granted by an IAM role attached to the EC2 instance. Even if the EC2 instance's IAM role has `s3:GetObject` permissions, a bucket policy explicitly denying access to that specific principal or IP range will override it, effectively blocking access to the S3 bucket. This is a critical aspect of AWS's authorization evaluation logic.
- ✗
Check if the EC2 instance is in a VPC with an S3 VPC endpoint configured.
Why it's wrong here
An S3 VPC endpoint provides private and secure connectivity to S3 from within a VPC without traversing the public internet. However, it is not a prerequisite for S3 access. An EC2 instance can successfully access S3 via an Internet Gateway if one is attached to the VPC and the routing tables are correctly configured to direct traffic to S3's public endpoints. The absence of a VPC endpoint does not inherently prevent S3 access.
- ✗
Check the security group rules attached to the EC2 instance.
Why it's wrong here
Security groups are stateful firewalls that control traffic at the instance level. For outbound traffic from an EC2 instance, the default security group rule typically allows all outbound traffic (0.0.0.0/0 on all ports). Unless the security group has been explicitly modified to restrict outbound HTTPS (port 443) traffic to the entire internet, it will not block access to S3. Security groups filter based on IP and port, not on the specific AWS service being accessed.
- ✓
Check if the S3 bucket uses SSE-KMS encryption and the EC2 role has kms:Decrypt permissions.
Why this is correct
If an S3 bucket is configured for Server-Side Encryption with AWS KMS (SSE-KMS), the IAM role assumed by the EC2 instance requires explicit `kms:Decrypt` permissions for the specific KMS key used by the bucket, in addition to `s3:GetObject` permissions. Without the necessary KMS decryption permissions, the EC2 instance will be unable to retrieve and decrypt objects, resulting in access denied errors even if S3 object permissions are otherwise sufficient.
Visual reference
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 |
Go deeper
Related to this question
About these practice questions
Courseiva writes every DVA-C02 question from scratch — 1,135 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DVA-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 DVA-C02 exam.