Bird
0
0

How can you allow an EC2 instance to send outbound traffic only to another instance in the same security group?

hard📝 Application Q9 of 15
AWS - Security Groups and Network ACLs
How can you allow an EC2 instance to send outbound traffic only to another instance in the same security group?
ASet inbound rule with source as the security group ID
BSet outbound rule with destination as the security group ID
CSet inbound rule with source as 0.0.0.0/0
DSet outbound rule with destination as 0.0.0.0/0
Step-by-Step Solution
Solution:
  1. Step 1: Understand security group referencing

    Security groups can reference themselves to allow traffic within the group.
  2. Step 2: Configure outbound rule

    Setting outbound rule destination as the security group ID restricts traffic to instances in that group.
  3. Final Answer:

    Set outbound rule with destination as the security group ID -> Option B
  4. Quick Check:

    Use security group ID in outbound rules to restrict traffic [OK]
Quick Trick: Use security group ID as destination to restrict outbound [OK]
Common Mistakes:
MISTAKES
  • Using 0.0.0.0/0 allows all destinations
  • Confusing inbound and outbound rules

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes