What is the MOST operationally efficient solution that meets these requirements?
Provide developers with access to the same AWS CloudFormation template so that they can provision their development environment when necessary. Schedule a nightly cron job on each development instance to stop all running processes to reduce CPU utilization to nearly zero.
Provide developers with access to the same AWS CloudFormation template so that they can provision their development environment when necessary. Schedule a nightly Amazon EventBridge (Amazon CloudWatch Events) rule to invoke an AWS Lambda function to delete the AWS CloudFormation stacks.
Provide developers with CLI commands so that they can provision their own development environment when necessary. Schedule a nightly Amazon EventBridge (Amazon CloudWatch Events) rule to invoke an AWS Lambda function to terminate all EC2 instances and the DB instance.
Provide developers with CLI commands so that they can provision their own development environment when necessary. Schedule a nightly Amazon EventBridge (Amazon CloudWatch Events) rule to cause AWS CloudFormation to delete all of the development environment resources.
Explanations:
Using a cron job to stop all running processes on the EC2 instances does not meet the requirement of terminating resources to minimize costs. Stopping processes doesn’t stop billing for EC2 and RDS instances, and the environments might not be identical when they are resumed.
Using a CloudFormation template allows developers to provision identical environments. The use of an EventBridge rule to invoke a Lambda function that deletes the CloudFormation stacks ensures that the environments are terminated every night, minimizing costs and maintaining operational efficiency.
While CLI commands could be used to provision environments, the solution doesn’t ensure identical environments because it doesn’t use CloudFormation for automated and repeatable infrastructure provisioning. Also, manually terminating EC2 and DB instances could lead to mistakes or misconfigurations.
While using CLI commands to provision environments is feasible, CloudFormation should be used for consistency. Also, the statement about using EventBridge to trigger CloudFormation deletions is incorrect because EventBridge should trigger a Lambda function to delete CloudFormation stacks, not directly manage them via CloudFormation commands.