AWS-DMS-task-restart-and-status-checker GitHub Details, Stars and Alternatives | OpenRepoFinder
nathadriele / repository
AWS-DMS-task-restart-and-status-checker
The AWS DMS Task Restart and Status Checker is a Python script designed to restart various AWS Database Migration Service (DMS) tasks and check their status. This script leverages AWS SDK (Boto3) and Mage.ai for DMS task integration and management, ensuring efficient and reliable task handling.
A transparent discovery signal based on current public GitHub metadata.
Recent activity35% weight
72
Community adoption25% weight
12
Maintenance state20% weight
100
License clarity10% weight
0
Project information10% weight
75
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
README preview
AWS DMS Task Restart and Status Checker (Backup)
Overview
AWS DMS Task Restart and Status Checker is a Python-based automation project designed to monitor, restart, and validate AWS Database Migration Service replication tasks.
The project uses Boto3 to interact with AWS DMS and Mage.ai to orchestrate the execution as a data pipeline block. It supports scenarios where multiple DMS replication tasks need to be restarted and cases where a task should only be restarted when it is in a failed state.
This solution is useful for data engineering workflows that depend on stable, automated, and observable database migration pipelines.
Main Features
Monitor AWS DMS replication task status.
Restart one or multiple DMS replication tasks.
Restart tasks only when they are in failed states.
Validate task execution using Mage.ai test blocks.
Store AWS credentials securely through Mage.ai secrets.
Support automated recovery for unstable DMS tasks.
Improve reliability in ETL and data migration pipelines.
Contains a Python script designed to validate data replication tasks in AWS Database Migration Service (DMS). The script checks for potential issues such as missing or duplicate data in the tables being replicated.
Automated script developed in Mage.ai to monitor and validate the status of AWS DMS CDC tasks, ensuring data integrity and synchronization. Sends notifications for any detected validation issues.
If the task reaches an acceptable state, the function returns:
{'status': 1}
If the task reaches a failed state, the function returns:
{'status': 0}
Testing
Mage.ai allows testing pipeline block outputs using the @test decorator.
For the multiple-task restart approach, the test validates whether:
The output is a dictionary.
Each DMS task returned the expected status.
Example:
@test
def test_output(output, *args) -> None:
expected_status = 'starting'
assert isinstance(output, dict), 'Output is not a dictionary'
for task_arn, status in output.items():
assert status == expected_status, (
f'Task {task_arn} did not start correctly. Status: {status}'
)
For the conditional restart approach, a recommended test is:
@test
def test_output(output, *args) -> None:
assert isinstance(output, dict), 'Output must be a dictionary'
assert 'status' in output, 'Output must contain the status key'
assert output['status'] in [0, 1], 'Status must be either 0 or 1'
Example requirements.txt
boto3
mage-ai
Contribution to Data Engineering
This project contributes to data engineering workflows by automating the operational management of AWS DMS replication tasks. It reduces manual intervention, improves reliability, and provides a reusable pattern for monitoring and recovering data migration processes.
By integrating AWS DMS, Boto3, and Mage.ai, the project demonstrates a practical approach to building cloud-native automation for ETL and data migration pipelines.