Effortlessly manage your AWS Database Migration Service (DMS) replication tasks using this automation script, built with TypeScript and the AWS SDK for JavaScript. Save costs and streamline your data migrations!
- ✅ Validates Required Environment Variables – Ensures all necessary configurations are set.
- ✅ Initializes AWS DMS Client – Seamless integration with AWS.
- ✅ Manages Replication Tasks – Automates the start and stop of tasks efficiently.
- ✅ Real-Time Status Updates – Monitors and updates the task status every 60 seconds (configurable).
Why let an expensive dms.r5.32xlarge instance run indefinitely? This script automates the start and stop of DMS replication tasks, allowing you to:
- 🚀 Use a dms.r6i.32xlarge instance for faster data transfers if you fancy.
- 🔄 Manually downgrade the instance post-migration to minimize costs.
- 💸 Avoid unnecessary charges by stopping tasks when not needed.
Because a little automation goes a long way in saving costs! 🤖💵
git clone git@github.com:kcflan/aws-dms-automation.git
cd aws-dms-automation
npm install
Create an .env file in the root directory and fill it out using the .env.example as a guide.
Required Environment Variables:
🌍 REPLICATION_REGION: AWS region where your DMS replication task is located.
🔑 REPLICATION_ACCESS_KEY_ID: Your AWS access key ID.
🔒 REPLICATION_SECRET_ACCESS_KEY: Your AWS secret access key.
📜 REPLICATION_TASK_ARN: The ARN of the DMS replication task.
🖥️ REPLICATION_INSTANCE_ARN: The ARN of the DMS replication instance.
Optional Environment Variables:
🕰️ DELAY_SECONDS: (default every 60 seconds for a display message)
🔄 RESTART_AFTER_FAILURE: (default false, set true if you want the script to keep going and retry on a failed task)
npm run build
npm run start
Build the Docker Image
npm run docker:build
Run the Docker Container
npm run docker:run
This project is licensed under the MIT License. See the LICENSE file for more details.
Happy automating, you frugal bees! 🎉🚀🪙🐝