This blog post talks about a tool that automates creation of AWS CloudFormation templates for AWS Database Migration Service (AWS DMS) tasks. AWS Training. If you are looking for how to create CloudFormation templates for your DMS tasks and don’t have knowledge of CloudFormation, read on. DBA Training. Many times during database migration activities where AWS DMS is involved, you encounter the common task of creating AWS Cloud ( Cloud DBA) Formation templates to provision DMS tasks. Creating AWS Cloud Formation templates requires knowledge of writing Cloud Formation templates in either JSON or YAML.
Good news! You don’t need to know how to write ( Cloud DBA) Cloud Formation templates at all, and still you can create Cloud Formation templates to provision AWS DMS tasks. AWS Training. All you need is some basic knowledge of Microsoft Excel and how to run a Python script using a terminal or command window. DBA Training.
In this post, we present a small command line tool written in Python. The tool takes a Microsoft Excel workbook having names of tables to be migrated, Amazon Resource Names (ARNs) of DMS endpoints, and DMS replication instances to be used as input. The tool generates CloudFormation templates for required DMS tasks as output. However, this tool doesn’t address creation of DMS endpoints and replication instances. AWS Training.
Prerequisites and assumptions
To use this tool, you need the following:
Microsoft Excel 2016 or later installed on your machine.Python, version 2.7 or later. To install Python 2.7.15, go to The Python.org download page.The xlrd Python module. If you don’t have it installed already, install it using pip from the command prompt or terminal with this command: pip install xlrdMake sure that both the DMS source and target endpoints and DMS replication instance are already created. DBA Training.
About the tool
All information about DMS tasks that need to be created should be incorporated in the Excel template. Before jumping into the details for the Excel template, let’s look at the list of items that are needed to create a DMS task. AWS Training.
The basic information needed to create a DMS task is this:
DMS task name Source endpoint Target endpoint
Replication instance to be used Schema name of tables to be migrated Names of tables to be migrated
You provide this information to the tool as an Excel template. DBA Training.
About the Excel template
The Excel template to provide as input to the tool should include two worksheets named DMS-Tasks and DMS-Tags. The rest of each worksheet represents a DMS task whose CloudFormation template you plan to create. AWS Training.
DMS-Tasks sheet
The DMS-Tasks sheet contains information about DMS tasks to be generated by the tool. To illustrate, if you plan to generate CloudFormation templates for two DMS tasks, there are two rows in the sheet. There is one row for each DMS task, which holds the information mentioned in each column, as described following. AWS Training.
Comments