Opportunity Name:
Clean up idle DMS instances
AWS Resource Type:
AWS Database Migration Service (DMS)
Opportunity Description:
AWS Database Migration Service (DMS) instances incur hourly costs whether or not they are used. This FF identifies DMS instances that have been idle for an extended period of time, creates a backup of each instance’s configuration, and terminates the instances.
Criteria for identifying the opportunity:
An opportunity is identified if the following criteria are met:
- The instance was created >90 days ago.
- There is currently no activity on the instance. Any replication tasks associated with the instance must be in one of the following states: 'failed', 'failed-move', 'ready', or 'stopped'.
- The instance has not run a replication task in the last 90 days.
Potential savings (range in % on annual basis):
This FF will save almost 100% of idle DMS instance costs. There is no S3 storage cost involved: before an instance is touched, CloudFix's finder captures a small JSON snapshot of the replication instance's configuration and the configuration of each of its replication tasks, and retains it with the recommendation so it can be used to recreate the instance later if needed.
What happens when the Fixer is executed?
The Fixer calls the DMS DeleteReplicationTask API to delete each replication task associated with the instance.
Next, the Fixer calls the DMS DeleteReplicationInstance API to delete the replication instance.
The Fixer itself does not write a backup file to S3. The configuration snapshot used for rollback is captured earlier, by CloudFix’s finder, at the moment it identifies the instance as idle — before either delete call above runs — and is retained with the recommendation rather than as a file in your AWS account.
Is it possible to rollback once CloudFix implements the fixer?
Yes. There is no automated rollback, but rollback can be triggered manually by executing the SSM Automation document "Cloudfix-Runbook-DMSCleanupIdleInstances-Rollback-prod" to recreate the DMS instance and (optionally) its associated replication tasks.
Parameters:
- ResourceDescription: The JSON configuration snapshot of the deleted replication instance and its tasks, as captured by CloudFix when the opportunity was originally identified
- RestoreTasks: Restore the previous replication tasks as well (true or false; defaults to true)
The rollback is done by manually executing this Rollback Runbook from the AWS Console. Contact CloudFix Support if you need help.
Can CloudFix implement the fix automatically once I accept the recommendation?
Yes.
Does this fix require downtime?
No.
Priyanka Bhotika
Comments