CV0-004 Security Practice Question
A cloud engineer is configuring a web application on AWS and needs to ensure that only HTTP and HTTPS traffic from the internet is allowed to reach the EC2 instances. Which AWS service should be used to control inbound traffic at the instance level?
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
✓
Security Group
Security groups are stateful virtual firewalls that control inbound and outbound traffic at the instance level. Network ACLs operate at the subnet level and are stateless.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Security Group
Why this is correct
Security groups are stateful virtual firewalls attached directly to EC2 elastic network interfaces, so rules are evaluated per instance rather than per subnet. Allowing only TCP ports 80 and 443 inbound satisfies the instance-level constraint, with return traffic automatically permitted regardless of outbound rules.
- ✗
AWS Shield
Why it's wrong here
AWS Shield provides DDoS protection at layers 3 and 4, not port-level allow-listing of HTTP and HTTPS. It is tempting because it guards internet-facing workloads, but filtering inbound traffic to specific ports on an instance requires a security group attached to that instance's elastic network interface.
- ✗
AWS WAF
Why it's wrong here
AWS WAF inspects layer 7 HTTP request content — SQL injection, XSS, IP reputation — and does not restrict traffic by port or protocol. It is tempting because it fronts web applications, but permitting only HTTP and HTTPS to an instance is a security group rule, not a web ACL.
- ✗
Network ACL
Why it's wrong here
Network ACLs filter at the subnet boundary, applying to all resources within the subnet rather than a single instance. They are tempting because they do permit inbound port rules, but instance-level control requires a security group, which is stateful and attached directly to the EC2 instance's network interface.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every CV0-004 question from scratch — 834 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 CV0-004 practice question is part of Courseiva's free CompTIA 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 CV0-004 exam.