Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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.

NotificationsYou must be signed in to change notification settings

nathadriele/AWS-DMS-task-restart-and-status-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

image

Overview

The AWS DMS Task Restart and Status Checker is a Python script designed to restart multiple AWS Database Migration Service (DMS) tasks and verify their statuses. This script leverages AWS SDK (Boto3) and Mage.ai for seamless integration and management of DMS tasks, ensuring efficient and reliable task handling.

Prerequisites

  • Before using this script, ensure you have the following:
    • AWS Account: Access to an AWS account with DMS service enabled.
    • IAM Permissions: Appropriate IAM permissions to restart DMS tasks and describe their statuses.
    • Mage.ai: Installed and configured in your environment.
    • AWS Credentials: Stored securely and accessible throughget_secret_value function.

Installation

  1. Clone the Repository:
gitclonehttps://github.com/nathadriele/AWS-DMS-task-restart-and-status-checker.gitcddms-task-manager
  1. Install Dependencies:Make sure you have boto3 and mage-ai installed:
pipinstallboto3mage-ai

Code Explanation

Load Data Function

Theload_data function is decorated with@data_loader from Mage.ai. It initializes a list of DMS task ARNs and a Boto3 DMS client using credentials fetched viaget_secret_value. The function iterates over the task ARNs, restarting each task and collecting their statuses into a dictionary, which is then returned.

Restart Task Function

Therestart_task function handles the logic for restarting a specific DMS task using its ARN. It prints confirmation of the restart and retrieves the task's status, which is returned to the caller.

Test Output Function

Thetest_output function is decorated with@test and is used to validate the functionality of theload_data function. It ensures that the output is a dictionary and that each task has the expected status('starting').

Testing

To test the script, ensure you have appropriate credentials and ARNs configured. Then, run the script and observe the printed outputs for task restart confirmations and statuses. Thetest_output function will validate the results automatically.

Contribution to Data Engineering

This script offers a streamlined approach to managing AWS DMS tasks by automating restarts and status checks. It leverages Boto3 for seamless cloud integration and incorporates automated testing to guarantee reliable execution. These capabilities enhance efficiency in data migration and data engineering workflows.

Contributions are welcome!

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp