Courseiva
Infrastructure SecuritymediumMultiple ChoiceObjective-mapped

SCS-C02 Infrastructure Security Practice Question

A security engineer is setting up a new VPC with public and private subnets. The VPC has an Internet Gateway attached. The public subnet's route table has a default route (0.0.0.0/0) pointing to the Internet Gateway. The private subnet's route table has a default route pointing to a NAT gateway. The engineer launches an EC2 instance in the private subnet and assigns it a public IP address. However, the instance cannot access the internet. What should the engineer do to resolve this issue?

⚠ Common exam trap

The trap here is that candidates mistakenly think assigning a public IP or Elastic IP to an instance in a private subnet will grant internet access, overlooking that routing decisions are made at the subnet level, not 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

Remove the public IP address from the instance and ensure the private subnet has a route to the NAT gateway.

An EC2 instance in a private subnet cannot use a public IP address for internet access, as the private subnet's route table directs default traffic to a NAT gateway, not an internet gateway. The public IP is irrelevant because the instance's traffic must traverse the NAT gateway, which requires the instance to have no public IP and the private subnet route to point to the NAT gateway. Removing the public IP ensures the instance uses the NAT gateway's Elastic IP for outbound traffic, resolving the internet access issue.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Attach an Elastic IP to the instance.

    Why it's wrong here

    Even with an Elastic IP, the instance cannot reach the internet without a route to IGW.

  • Update the private subnet's route table to point 0.0.0.0/0 to the Internet Gateway.

    Why it's wrong here

    This would make the subnet public, not private.

  • Remove the public IP address from the instance and ensure the private subnet has a route to the NAT gateway.

    Why this is correct

    Private subnet instances should not have public IPs; they use NAT gateway for internet access.

  • Allow outbound traffic in the instance's security group.

    Why it's wrong here

    Security groups allow all outbound traffic by default.

Visual reference

Inside (Private) PC-A 10.0.0.1 PC-B 10.0.0.2 NAT Router Outside (Public) 203.0.113.1 Inside Global Server PAT: many private IPs share one public IP via unique port numbers

About these practice questions

Courseiva writes every SCS-C02 question from scratch — 376 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.