Courseiva
Infrastructure SecurityhardMultiple SelectObjective-mapped

SCS-C02 Infrastructure Security Practice Question

A company has a VPC with a single public subnet and a single private subnet. The private subnet contains an RDS MySQL database that should not be accessible from the internet. The public subnet contains a bastion host that is used for SSH access to the database instance. The security team wants to ensure that the database can only be accessed from the bastion host. Which two security group rules should be configured? (Choose TWO.)

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

Database security group: Allow inbound MySQL from the bastion security group.

Options B and C are correct. The database security group should allow inbound MySQL from the bastion security group (option B), ensuring only the bastion can access the database. The bastion security group should allow inbound SSH only from a limited corporate IP range (option C) to restrict administrative access. Option A is incorrect because allowing inbound MySQL from the public subnet CIDR would permit any instance in that subnet, not just the bastion. Option D is incorrect as it allows MySQL from the entire internet. Option E is incorrect because it allows SSH from any IP, which is insecure.

Answer analysis

Option-by-option breakdown

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

  • Database security group: Allow inbound MySQL from the public subnet CIDR.

    Why it's wrong here

    This would allow traffic from any instance in the public subnet.

  • Database security group: Allow inbound MySQL from the bastion security group.

    Why this is correct

    This restricts database access to the bastion.

  • Bastion security group: Allow inbound SSH from a limited corporate IP range.

    Why this is correct

    This restricts SSH access to the bastion.

  • Database security group: Allow inbound MySQL from 0.0.0.0/0.

    Why it's wrong here

    This would expose the database to the internet.

  • Bastion security group: Allow inbound SSH from 0.0.0.0/0.

    Why it's wrong here

    This would allow SSH from any IP.

Visual reference

192.168.1.0 /24 256 addresses (254 usable) 192.168.1.0 /25 Subnet A 128 addr (126 usable) 192.168.1.128 /25 Subnet B 128 addr (126 usable) Borrowing 1 bit from host portion creates 2 subnets (/25)

About these practice questions

One of 376 original SCS-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.