Version 5 (V5) of the Amazon Tools for PowerShell has been released!
For information about breaking changes and migrating your applications, see the migration topic.
Amazon DMS examples using Tools for PowerShell V5
The following code examples show you how to perform actions and implement common scenarios by using the Amazon Tools for PowerShell V5 with Amazon DMS.
Actions are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios.
Each example includes a link to the complete source code, where you can find instructions on how to set up and run the code in context.
Topics
Actions
The following code example shows how to use New-DMSReplicationTask
.
- Tools for PowerShell V5
-
Example 1: This example creates a new Amazon Database Migration Service replication task that uses CdcStartTime instead of CdcStartPosition. The MigrationType is set to "full-load-and-cdc", meaning the target table must be empty. The new task is tagged with a tag that has a key of Stage and a key value of Test. For more information about the values used by this cmdlet, see Creating a Task (https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.Creating.html) in the Amazon Database Migration Service User Guide.
New-DMSReplicationTask -ReplicationInstanceArn "arn:aws:dms:us-east-1:123456789012:rep:EXAMPLE66XFJUWATDJGBEXAMPLE"` -CdcStartTime "2019-08-08T12:12:12"` -CdcStopPosition "server_time:2019-08-09T12:12:12"` -MigrationType "full-load-and-cdc"` -ReplicationTaskIdentifier "task1"` -ReplicationTaskSetting ""` -SourceEndpointArn "arn:aws:dms:us-east-1:123456789012:endpoint:EXAMPLEW5UANC7Y3P4EEXAMPLE"` -TableMapping "file:////home/testuser/table-mappings.json"` -Tag @{"Key"="Stage";"Value"="Test"}` -TargetEndpointArn "arn:aws:dms:us-east-1:123456789012:endpoint:EXAMPLEJZASXWHTWCLNEXAMPLE"
-
For API details, see CreateReplicationTask
in Amazon Tools for PowerShell Cmdlet Reference (V5).
-