Which solution will meet these requirements in the MOST cost-effective manner?
Convert the RDS database to an Amazon Aurora Serverless database. Use an AWS Lambda function to start and stop the EC2 instances before and after tests.
Put the EC2 instances into an Auto Scaling group. Schedule scaling to run at the start of the deployment tests.
Replace the EC2 instances with EC2 Spot Instances and the RDS database with an RDS Reserved Instance.
Subscribe Amazon CloudWatch Events to CodePipeline to trigger AWS Systems Manager Automation documents that start and stop all EC2 and RDS instances before and after deployment tests.
Explanations:
Amazon Aurora Serverless is designed for variable or unpredictable workloads and may not be the best fit for a SQL Server database. Additionally, Aurora Serverless is a different database solution, not part of the current architecture, which violates the requirement to not change architecture components.
Using an Auto Scaling group for EC2 instances is not the most cost-effective option since it is typically meant for scaling based on demand, and does not address the need to only run during testing. Scheduling scaling would not stop the instances during non-testing times, leading to unnecessary costs.
Spot Instances are not ideal for applications requiring high availability, such as during deployment tests, as Spot Instances can be terminated by AWS with little notice. This would disrupt testing and is not suitable for a stable testing environment.
Using CloudWatch Events to trigger AWS Systems Manager Automation to start and stop EC2 and RDS instances before and after tests is the most cost-effective solution. It ensures resources only run during the testing periods, minimizing costs. The existing architecture components remain unchanged.