nerdexam
Amazon

SAP-C02 · Question #583

A software company needs to create short-lived test environments to test pull requests as part of its development process. Each test environment consists of a single Amazon EC2 instance that is in…

The correct answer is B. Create a single VPC for the test environments. Include a transit gateway attachment and related. The task is to create short-lived, automated test environments consisting of EC2 instances that need to communicate with an on-premises server via an existing Transit Gateway VPN connection, with the least operational overhead.

Submitted by brentm· Mar 6, 2026Design for New Solutions

Question

A software company needs to create short-lived test environments to test pull requests as part of its development process. Each test environment consists of a single Amazon EC2 instance that is in an Auto Scaling group. The test environments must be able to communicate with a central server to report test results. The central server is located in an on-premises data center. A solutions architect must implement a solution so that the company can create and delete test environments without any manual intervention. The company has created a transit gateway with a VPN attachment to the on- premises network. Which solution will meet these requirements with the LEAST operational overhead?

Options

  • ACreate an AWS CloudFormation template that contains a transit gateway attachment and related
  • BCreate a single VPC for the test environments. Include a transit gateway attachment and related
  • CCreate a new OU in AWS Organizations for testing. Create an AWS CioudFormation template
  • DConvert the test environment EC2 instances into Docker images. Use AWS CloudFormation to

How the community answered

(28 responses)
  • A
    14% (4)
  • B
    75% (21)
  • C
    4% (1)
  • D
    7% (2)

Why each option

The task is to create short-lived, automated test environments consisting of EC2 instances that need to communicate with an on-premises server via an existing Transit Gateway VPN connection, with the least operational overhead.

ACreate an AWS CloudFormation template that contains a transit gateway attachment and related

Creating a new Transit Gateway attachment for *each* test environment or CloudFormation stack would be highly inefficient and complex, as TGW attachments are designed to connect VPCs, not individual resources or ephemeral environments.

BCreate a single VPC for the test environments. Include a transit gateway attachment and relatedCorrect

Creating a single VPC for all test environments, which then has a single Transit Gateway attachment, minimizes network setup overhead for each new test environment. Instances within this VPC can automatically route to the on-premises network via the TGW without individual network configurations or attachments.

CCreate a new OU in AWS Organizations for testing. Create an AWS CioudFormation template

Creating a new Organizational Unit (OU) is for AWS account management and structure, not for establishing network connectivity between test environments and an on-premises network via a Transit Gateway.

DConvert the test environment EC2 instances into Docker images. Use AWS CloudFormation to

Converting EC2 instances to Docker images changes the application packaging but does not directly address the networking requirements for communicating with an on-premises server through a Transit Gateway.

Concept tested: AWS Transit Gateway for Hybrid Connectivity with Dynamic Environments

Source: https://docs.aws.amazon.com/vpc/latest/tgw/what-is-transit-gateway.html

Community Discussion

No community discussion yet for this question.

Full SAP-C02 Practice