A development team needs identical, on-demand environments composed of EC2 instances and an RDS database. Environments should be provisioned only when needed and must be torn down every night to reduce costs. What is the MOST operationally efficient design to satisfy these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Provide the shared CloudFormation template so developers can deploy environments on demand. Schedule a nightly EventBridge rule that invokes a Lambda function to delete those CloudFormation stacks..
Why this is the answer
The correct option is the most operationally efficient because it leverages CloudFormation for both provisioning and de-provisioning. Developers can easily create identical environments using a shared CloudFormation template. The nightly EventBridge rule triggering a Lambda function to delete the CloudFormation stacks ensures that all resources provisioned by the stack are removed, effectively tearing down the environments and minimizing costs. The first incorrect option is inefficient because stopping processes doesn't fully de-provision resources, leading to continued EC2 and RDS costs. The third incorrect option is less efficient because managing individual CLI scripts for creation and then relying on a Lambda to terminate individual instances is prone to errors and doesn't guarantee a clean tear-down of all associated resources. The fourth incorrect option is incorrect because CloudFormation doesn't have a direct "instruct to delete every resource" command; deleting the stack is the correct approach.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed