Which solution will meet these requirements with the FEWEST changes to the application?
Modify the CloudFormation template to use Amazon Aurora PostgreSQL as the DB engine.
Modify the CloudFormation template to use Amazon DynamoDB as the database. Activate storage auto scaling during creation of the tables.
Modify the Cloud Formation template to activate storage auto scaling on the existing DB instances.
Create a CloudWatch alarm to monitor DB instance storage space. Configure the alarm to invoke the VACUUM command.
Explanations:
Modifying the CloudFormation template to use Amazon Aurora PostgreSQL would require significant changes to the application since Aurora has different management and operational characteristics compared to standard PostgreSQL. This change involves migrating data and possibly altering application code, which goes beyond the scope of “the fewest changes.”
Switching to Amazon DynamoDB would involve a fundamental change in the data model and access patterns, as DynamoDB is a NoSQL database and would require extensive modifications to the application that currently relies on PostgreSQL. This does not meet the requirement of minimal changes.
Activating storage auto scaling on the existing DB instances in the CloudFormation template allows the database storage to automatically increase as needed without requiring changes to the application or manual intervention. This solution directly addresses the problem of running low on disk space with minimal changes to the deployment process.
While creating a CloudWatch alarm to monitor DB instance storage space could be beneficial, simply invoking the VACUUM command via an alarm does not directly prevent low storage situations. VACUUM helps reclaim space but does not expand storage, which is the main issue being addressed. Therefore, this option does not effectively solve the problem at hand.