AWS DMS examples using AWS CLI
The following code examples show you how to perform actions and implement common scenarios by using the AWS Command Line Interface with AWS 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 add-tags-to-resource.
- AWS CLI
-
To add tags to a resource
The following
add-tags-to-resourceexample adds tags to a replication instance.aws dms add-tags-to-resource \ --resource-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE\ --tagsKey=Environment,Value=PRODKey=Project,Value=dbMigrationThis command produces no output.
For more information, see Tagging Resources in the AWS Database Migration Service User Guide.
-
For API details, see AddTagsToResource
in AWS CLI Command Reference.
-
The following code example shows how to use cancel-metadata-model-conversion.
- AWS CLI
-
To cancel a metadata model conversion
The following
cancel-metadata-model-conversionexample cancels a metadata model conversion operation.aws dms cancel-metadata-model-conversion \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --request-identifiera1b2c3d4-5678-90ab-cdef-EXAMPLE11111Output:
{ "Request": { "Status": "CANCELING", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" } }For more information, see Converting database schemas in the AWS Database Migration Service User Guide.
-
For API details, see CancelMetadataModelConversion
in AWS CLI Command Reference.
-
The following code example shows how to use cancel-metadata-model-creation.
- AWS CLI
-
To cancel a metadata model creation
The following
cancel-metadata-model-creationexample cancels a metadata model creation operation.aws dms cancel-metadata-model-creation \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --request-identifiera1b2c3d4-5678-90ab-cdef-EXAMPLE11111Output:
{ "Request": { "Status": "CANCELING", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" } }For more information, see Creating statement metadata models in the AWS Database Migration Service User Guide.
-
For API details, see CancelMetadataModelCreation
in AWS CLI Command Reference.
-
The following code example shows how to use create-data-provider.
- AWS CLI
-
Example 1: To create a Microsoft SQL Server data provider
The following
create-data-providerexample creates a Microsoft SQL Server data provider.aws dms create-data-provider \ --data-provider-nameexample-data-provider\ --enginesqlserver\ --description"Example data provider for documentation"\ --settingsMicrosoftSqlServerSettings={ServerName=example-source-server.us-east-1.rds.amazonaws.com,Port=1433,DatabaseName=ExampleDatabase,SslMode=verify-full,CertificateArn=arn:aws:dms:us-east-1:123456789012:cert:EXAMPLEABCDEFGHIJKLMNOPQRS}Output:
{ "DataProvider": { "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS", "DataProviderCreationTime": "2026-01-09T12:30:00.000000+00:00", "Description": "Example data provider for documentation", "Engine": "sqlserver", "Settings": { "MicrosoftSqlServerSettings": { "ServerName": "example-source-server.us-east-1.rds.amazonaws.com", "Port": 1433, "DatabaseName": "ExampleDatabase", "SslMode": "verify-full", "CertificateArn": "arn:aws:dms:us-east-1:123456789012:cert:EXAMPLEABCDEFGHIJKLMNOPQRS" } } } }For more information, see Working with data providers in the AWS Database Migration Service User Guide.
Example 2: To create a virtual data provider
The following
create-data-providerexample creates a virtual data provider, which doesn't require a connection to the database.aws dms create-data-provider \ --data-provider-nameexample-virtual-data-provider\ --engineaurora-postgresql\ --description"Example data provider for documentation"\ --virtual \ --settingsPostgreSqlSettings={ServerName=virtual,Port=5432,DatabaseName=virtual,SslMode=none}Output:
{ "DataProvider": { "DataProviderName": "example-virtual-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS", "DataProviderCreationTime": "2026-01-09T12:30:00.000000+00:00", "Description": "Example data provider for documentation", "Engine": "aurora-postgresql", "Virtual": true, "Settings": { "PostgreSqlSettings": { "ServerName": "virtual", "Port": 5432, "DatabaseName": "virtual", "SslMode": "none" } } } }For more information, see Working with virtual data providers in the AWS Database Migration Service User Guide.
-
For API details, see CreateDataProvider
in AWS CLI Command Reference.
-
The following code example shows how to use create-endpoint.
- AWS CLI
-
To create an endpoint
The following
create-endpointexample creates an endpoint for an Amazon S3 source.aws dms create-endpoint \ --endpoint-typesource\ --engine-names3\ --endpoint-identifiersrc-endpoint\ --s3-settingsfile://s3-settings.jsonContents of
s3-settings.json:{ "BucketName":"my-corp-data", "BucketFolder":"sourcedata", "ServiceAccessRoleArn":"arn:aws:iam::123456789012:role/my-s3-access-role" }Output:
{ "Endpoint": { "EndpointIdentifier": "src-endpoint", "EndpointType": "SOURCE", "EngineName": "s3", "EngineDisplayName": "Amazon S3", "ExtraConnectionAttributes": "bucketFolder=sourcedata;bucketName=my-corp-data;compressionType=NONE;csvDelimiter=,;csvRowDelimiter=\\n;", "Status": "active", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:GUVAFG34EECUOJ6QVZ56DAHT3U", "SslMode": "none", "ServiceAccessRoleArn": "arn:aws:iam::123456789012:role/my-s3-access-role", "S3Settings": { "ServiceAccessRoleArn": "arn:aws:iam::123456789012:role/my-s3-access-role", "CsvRowDelimiter": "\\n", "CsvDelimiter": ",", "BucketFolder": "sourcedata", "BucketName": "my-corp-data", "CompressionType": "NONE", "EnableStatistics": true } } }For more information, see Working with AWS DMS Endpoints in the AWS Database Migration Service User Guide.
-
For API details, see CreateEndpoint
in AWS CLI Command Reference.
-
The following code example shows how to use create-event-subscription.
- AWS CLI
-
To list event subscriptions
The following
create-event-subscriptionexample creates an event subscription to an Amazon SNS topic (my-sns-topic).aws dms create-event-subscription \ --subscription-namemy-dms-events\ --sns-topic-arnarn:aws:sns:us-east-1:123456789012:my-sns-topicOutput:
{ "EventSubscription": { "CustomerAwsId": "123456789012", "CustSubscriptionId": "my-dms-events", "SnsTopicArn": "arn:aws:sns:us-east-1:123456789012:my-sns-topic", "Status": "creating", "SubscriptionCreationTime": "2020-05-21 21:58:38.598", "Enabled": true } }For more information, see Working with Events and Notifications in the AWS Database Migration Service User Guide.
-
For API details, see CreateEventSubscription
in AWS CLI Command Reference.
-
The following code example shows how to use create-instance-profile.
- AWS CLI
-
To create an instance profile
The following
create-instance-profileexample creates an instance profile.aws dms create-instance-profile \ --instance-profile-nameexample-instance-profile\ --description"Example instance profile for documentation"\ --subnet-group-identifierexample-replication-subnet-group\ --vpc-security-groups"sg-0123456789abcdef0"\ --kms-key-arnarn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111\ --network-typeIPV4\ --no-publicly-accessibleOutput:
{ "InstanceProfile": { "InstanceProfileArn": "arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS", "KmsKeyArn": "arn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "PubliclyAccessible": false, "NetworkType": "IPV4", "InstanceProfileName": "example-instance-profile", "Description": "Example instance profile for documentation", "InstanceProfileCreationTime": "2026-01-09T12:30:00.000000+00:00", "SubnetGroupIdentifier": "example-replication-subnet-group", "VpcSecurityGroups": [ "sg-0123456789abcdef0" ] } }For more information, see Working with instance profiles in the AWS Database Migration Service User Guide.
-
For API details, see CreateInstanceProfile
in AWS CLI Command Reference.
-
The following code example shows how to use create-migration-project.
- AWS CLI
-
To create a migration project
The following
create-migration-projectexample creates a migration project.aws dms create-migration-project \ --migration-project-nameexample-migration-project\ --description"Example migration project for documentation"\ --source-data-provider-descriptorsDataProviderIdentifier=arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS,SecretsManagerSecretId=arn:aws:secretsmanager:us-east-1:123456789012:secret:example-source-secret-A1B2C3,SecretsManagerAccessRoleArn=arn:aws:iam::123456789012:role/example-secrets-manager-role\ --target-data-provider-descriptorsDataProviderIdentifier=arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS,SecretsManagerSecretId=arn:aws:secretsmanager:us-east-1:123456789012:secret:example-target-secret-A1B2C3,SecretsManagerAccessRoleArn=arn:aws:iam::123456789012:role/example-secrets-manager-role\ --instance-profile-identifierarn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS\ --transformation-rules '{"rules":[{"rule-type":"transformation","rule-id":"1","rule-name":"1","rule-target":"schema","rule-action":"rename","object-locator":{"schema-name":"ExampleSchema"},"value":"TargetSchema"}]}' \ --schema-conversion-application-attributesS3BucketPath=s3://amzn-s3-demo-bucket,S3BucketRoleArn=arn:aws:iam::123456789012:role/example-s3-access-roleOutput:
{ "MigrationProject": { "MigrationProjectName": "example-migration-project", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "MigrationProjectCreationTime": "2026-01-09T12:30:00.000000+00:00", "SourceDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-source-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "TargetDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-target-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "InstanceProfileArn": "arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS", "InstanceProfileName": "example-instance-profile", "TransformationRules": "{\"rules\":[{\"rule-type\":\"transformation\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"rule-target\":\"schema\",\"rule-action\":\"rename\",\"object-locator\":{\"schema-name\":\"ExampleSchema\"},\"value\":\"TargetSchema\"}]}", "Description": "Example migration project for documentation", "SchemaConversionApplicationAttributes": { "S3BucketPath": "s3://amzn-s3-demo-bucket", "S3BucketRoleArn": "arn:aws:iam::123456789012:role/example-s3-access-role" } } }For more information, see Working with migration projects in the AWS Database Migration Service User Guide.
-
For API details, see CreateMigrationProject
in AWS CLI Command Reference.
-
The following code example shows how to use create-replication-instance.
- AWS CLI
-
To create a replication instance
The following
create-replication-instanceexample creates a replication instance.aws dms create-replication-instance \ --replication-instance-identifiermy-repl-instance\ --replication-instance-classdms.t2.micro\ --allocated-storage5Output:
{ "ReplicationInstance": { "ReplicationInstanceIdentifier": "my-repl-instance", "ReplicationInstanceClass": "dms.t2.micro", "ReplicationInstanceStatus": "creating", "AllocatedStorage": 5, "VpcSecurityGroups": [ { "VpcSecurityGroupId": "sg-f839b688", "Status": "active" } ], "ReplicationSubnetGroup": { "ReplicationSubnetGroupIdentifier": "default", "ReplicationSubnetGroupDescription": "default", "VpcId": "vpc-136a4c6a", "SubnetGroupStatus": "Complete", "Subnets": [ { "SubnetIdentifier": "subnet-da327bf6", "SubnetAvailabilityZone": { "Name": "us-east-1a" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-42599426", "SubnetAvailabilityZone": { "Name": "us-east-1d" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-bac383e0", "SubnetAvailabilityZone": { "Name": "us-east-1c" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-6746046b", "SubnetAvailabilityZone": { "Name": "us-east-1f" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-d7c825e8", "SubnetAvailabilityZone": { "Name": "us-east-1e" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-cbfff283", "SubnetAvailabilityZone": { "Name": "us-east-1b" }, "SubnetStatus": "Active" } ] }, "PreferredMaintenanceWindow": "sat:12:35-sat:13:05", "PendingModifiedValues": {}, "MultiAZ": false, "EngineVersion": "3.3.2", "AutoMinorVersionUpgrade": true, "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/f7bc0f8e-1a3a-4ace-9faa-e8494fa3921a", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:ZK2VQBUWFDBAWHIXHAYG5G2PKY", "PubliclyAccessible": true } }For more information, see Working with an AWS DMS Replication Instance in the AWS Database Migration Service User Guide.
-
For API details, see CreateReplicationInstance
in AWS CLI Command Reference.
-
The following code example shows how to use create-replication-subnet-group.
- AWS CLI
-
To create a subnet group
The following
create-replication-subnet-groupexample creates a group consisting of 3 subnets.aws dms create-replication-subnet-group \ --replication-subnet-group-identifiermy-subnet-group\ --replication-subnet-group-description"my subnet group"\ --subnet-idssubnet-da327bf6subnet-bac383e0subnet-d7c825e8Output:
{ "ReplicationSubnetGroup": { "ReplicationSubnetGroupIdentifier": "my-subnet-group", "ReplicationSubnetGroupDescription": "my subnet group", "VpcId": "vpc-136a4c6a", "SubnetGroupStatus": "Complete", "Subnets": [ { "SubnetIdentifier": "subnet-da327bf6", "SubnetAvailabilityZone": { "Name": "us-east-1a" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-bac383e0", "SubnetAvailabilityZone": { "Name": "us-east-1c" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-d7c825e8", "SubnetAvailabilityZone": { "Name": "us-east-1e" }, "SubnetStatus": "Active" } ] } }For more information, see Setting Up a Network for a Replication Instance in the AWS Database Migration Service User Guide.
-
For API details, see CreateReplicationSubnetGroup
in AWS CLI Command Reference.
-
The following code example shows how to use create-replication-task.
- AWS CLI
-
To create a replication task
The following
create-replication-taskexample creates a replication task.aws dms create-replication-task \ --replication-task-identifiermovedata\ --source-endpoint-arnarn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA\ --target-endpoint-arnarn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U\ --replication-instance-arn$RI_ARN\ --migration-typefull-load\ --table-mappingsfile://table-mappings.jsonContents of
table-mappings.json:{ "rules": [ { "rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": { "schema-name": "prodrep", "table-name": "%" }, "rule-action": "include", "filters": [] } ] }Output:
{ "ReplicationTask": { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted... , "ReplicationTaskSettings": ...output omitted... , "Status": "creating", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" } }For more information, see Working with AWS DMS Tasks in the AWS Database Migration Service User Guide.
-
For API details, see CreateReplicationTask
in AWS CLI Command Reference.
-
The following code example shows how to use delete-connection.
- AWS CLI
-
To delete a connection
The following
delete-connectionexample disassociates an endpoint from a replication instance.aws dms delete-connection \ --endpoint-arnarn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA\ --replication-instance-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUEOutput:
{ "Connection": { "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "Status": "deleting", "EndpointIdentifier": "src-database-1", "ReplicationInstanceIdentifier": "my-repl-instance" } }For more information, see https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Endpoints.Creating.html in the AWS Database Migration Service User Guide.
-
For API details, see DeleteConnection
in AWS CLI Command Reference.
-
The following code example shows how to use delete-data-provider.
- AWS CLI
-
To delete a data provider
The following
delete-data-providerexample deletes a data provider identified by its ARN.aws dms delete-data-provider \ --data-provider-identifierarn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRSOutput:
{ "DataProvider": { "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS", "DataProviderCreationTime": "2026-01-09T12:30:00.000000+00:00", "Description": "Example data provider for documentation", "Engine": "sqlserver", "Settings": { "MicrosoftSqlServerSettings": { "ServerName": "example-source-server.us-east-1.rds.amazonaws.com", "Port": 1433, "DatabaseName": "ExampleDatabase", "SslMode": "verify-full", "CertificateArn": "arn:aws:dms:us-east-1:123456789012:cert:EXAMPLEABCDEFGHIJKLMNOPQRS" } } } }For more information, see Working with data providers in the AWS Database Migration Service User Guide.
-
For API details, see DeleteDataProvider
in AWS CLI Command Reference.
-
The following code example shows how to use delete-endpoint.
- AWS CLI
-
To delete an endpoint
The following
delete-endpointexample deletes an endpoint.aws dms delete-endpoint \ --endpoint-arnarn:aws:dms:us-east-1:123456789012:endpoint:OUJJVXO4XZ4CYTSEG5XGMN2R3YOutput:
{ "Endpoint": { "EndpointIdentifier": "src-endpoint", "EndpointType": "SOURCE", "EngineName": "s3", "EngineDisplayName": "Amazon S3", "ExtraConnectionAttributes": "bucketFolder=sourcedata;bucketName=my-corp-data;compressionType=NONE;csvDelimiter=,;csvRowDelimiter=\\n;", "Status": "deleting", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:OUJJVXO4XZ4CYTSEG5XGMN2R3Y", "SslMode": "none", "ServiceAccessRoleArn": "arn:aws:iam::123456789012:role/my-s3-access-role", "S3Settings": { "ServiceAccessRoleArn": "arn:aws:iam::123456789012:role/my-s3-access-role", "CsvRowDelimiter": "\\n", "CsvDelimiter": ",", "BucketFolder": "sourcedata", "BucketName": "my-corp-data", "CompressionType": "NONE", "EnableStatistics": true } } }For more information, see Working with AWS DMS Endpoints in the AWS Database Migration Service User Guide.
-
For API details, see DeleteEndpoint
in AWS CLI Command Reference.
-
The following code example shows how to use delete-event-subscription.
- AWS CLI
-
To delete an event subscription
The following
delete-event-subscriptionexample deletes a subscription to an Amazon SNS topic.aws dms delete-event-subscription \ --subscription-name"my-dms-events"Output:
{ "EventSubscription": { "CustomerAwsId": "123456789012", "CustSubscriptionId": "my-dms-events", "SnsTopicArn": "arn:aws:sns:us-east-1:123456789012:my-sns-topic", "Status": "deleting", "SubscriptionCreationTime": "2020-05-21 21:58:38.598", "Enabled": true } }For more information, see Working with Events and Notifications in the AWS Database Migration Service User Guide.
-
For API details, see DeleteEventSubscription
in AWS CLI Command Reference.
-
The following code example shows how to use delete-instance-profile.
- AWS CLI
-
To delete an instance profile
The following
delete-instance-profileexample deletes an instance profile identified by its ARN.aws dms delete-instance-profile \ --instance-profile-identifierarn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRSOutput:
{ "InstanceProfile": { "InstanceProfileArn": "arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS", "KmsKeyArn": "arn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "PubliclyAccessible": false, "NetworkType": "IPV4", "InstanceProfileName": "example-instance-profile", "Description": "Example instance profile for documentation", "InstanceProfileCreationTime": "2026-01-09T12:30:00.000000+00:00", "SubnetGroupIdentifier": "example-replication-subnet-group", "VpcSecurityGroups": [ "sg-0123456789abcdef0" ] } }For more information, see Working with instance profiles in the AWS Database Migration Service User Guide.
-
For API details, see DeleteInstanceProfile
in AWS CLI Command Reference.
-
The following code example shows how to use delete-migration-project.
- AWS CLI
-
To delete a migration project
The following
delete-migration-projectexample deletes a migration project identified by its ARN.aws dms delete-migration-project \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRSOutput:
{ "MigrationProject": { "MigrationProjectName": "example-migration-project", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "MigrationProjectCreationTime": "2026-01-09T12:30:00.000000+00:00", "SourceDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-source-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "TargetDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-target-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "InstanceProfileArn": "arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS", "InstanceProfileName": "example-instance-profile", "TransformationRules": "{\"rules\":[{\"rule-type\":\"transformation\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"rule-target\":\"schema\",\"rule-action\":\"rename\",\"object-locator\":{\"schema-name\":\"ExampleSchema\"},\"value\":\"TargetSchema\"}]}", "Description": "Example migration project for documentation", "SchemaConversionApplicationAttributes": { "S3BucketPath": "s3://amzn-s3-demo-bucket", "S3BucketRoleArn": "arn:aws:iam::123456789012:role/example-s3-access-role" } } }For more information, see Working with migration projects in the AWS Database Migration Service User Guide.
-
For API details, see DeleteMigrationProject
in AWS CLI Command Reference.
-
The following code example shows how to use delete-replication-instance.
- AWS CLI
-
To delete a replication instance
The following
delete-replication-instanceexample deletes a replication instance.aws dms delete-replication-instance \ --replication-instance-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUEOutput:
{ "ReplicationInstance": { "ReplicationInstanceIdentifier": "my-repl-instance", "ReplicationInstanceClass": "dms.t2.micro", "ReplicationInstanceStatus": "deleting", "AllocatedStorage": 5, "InstanceCreateTime": 1590011235.952, "VpcSecurityGroups": [ { "VpcSecurityGroupId": "sg-f839b688", "Status": "active" } ], "AvailabilityZone": "us-east-1e", "ReplicationSubnetGroup": { "ReplicationSubnetGroupIdentifier": "default", "ReplicationSubnetGroupDescription": "default", "VpcId": "vpc-136a4c6a", "SubnetGroupStatus": "Complete", "Subnets": [ { "SubnetIdentifier": "subnet-da327bf6", "SubnetAvailabilityZone": { "Name": "us-east-1a" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-42599426", "SubnetAvailabilityZone": { "Name": "us-east-1d" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-bac383e0", "SubnetAvailabilityZone": { "Name": "us-east-1c" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-6746046b", "SubnetAvailabilityZone": { "Name": "us-east-1f" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-d7c825e8", "SubnetAvailabilityZone": { "Name": "us-east-1e" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-cbfff283", "SubnetAvailabilityZone": { "Name": "us-east-1b" }, "SubnetStatus": "Active" } ] }, "PreferredMaintenanceWindow": "wed:11:42-wed:12:12", "PendingModifiedValues": {}, "MultiAZ": true, "EngineVersion": "3.3.2", "AutoMinorVersionUpgrade": true, "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/f7bc0f8e-1a3a-4ace-9faa-e8494fa3921a", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "ReplicationInstancePublicIpAddress": "54.225.120.92", "ReplicationInstancePrivateIpAddress": "172.31.30.121", "ReplicationInstancePublicIpAddresses": [ "54.225.120.92", "3.230.18.248" ], "ReplicationInstancePrivateIpAddresses": [ "172.31.30.121", "172.31.75.90" ], "PubliclyAccessible": true, "SecondaryAvailabilityZone": "us-east-1b" } }For more information, see Working with an AWS DMS Replication Instance in the AWS Database Migration Service User Guide.
-
For API details, see DeleteReplicationInstance
in AWS CLI Command Reference.
-
The following code example shows how to use delete-replication-subnet-group.
- AWS CLI
-
To delete a subnet group
The following
delete-replication-subnet-groupexample deletes a subnet group.aws dms delete-replication-subnet-group \ --replication-subnet-group-identifiermy-subnet-groupOutput:
(none)For more information, see Setting Up a Network for a Replication Instance in the AWS Database Migration Service User Guide.
-
For API details, see DeleteReplicationSubnetGroup
in AWS CLI Command Reference.
-
The following code example shows how to use delete-replication-task.
- AWS CLI
-
To delete a replication task
The following
delete-replication-taskexample deletes a replication task.aws dms delete-replication-task \ --replication-task-arnarn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FIIOutput:
{ "ReplicationTask": { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted..., "ReplicationTaskSettings": ...output omitted..., "Status": "deleting", "StopReason": "Stop Reason FULL_LOAD_ONLY_FINISHED", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskStartDate": 1590789988.677, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" } }For more information, see Working with AWS DMS Tasks in the AWS Database Migration Service User Guide.
-
For API details, see DeleteReplicationTask
in AWS CLI Command Reference.
-
The following code example shows how to use describe-account-attributes.
- AWS CLI
-
To describe account attributes
The following
describe-account-attributesexample lists the attributes for your AWS account.aws dms describe-account-attributesOutput:
{ "AccountQuotas": [ { "AccountQuotaName": "ReplicationInstances", "Used": 1, "Max": 20 }, { "AccountQuotaName": "AllocatedStorage", "Used": 5, "Max": 10000 }, ...remaining output omitted... ], "UniqueAccountIdentifier": "cqahfbfy5xee" }-
For API details, see DescribeAccountAttributes
in AWS CLI Command Reference.
-
The following code example shows how to use describe-certificates.
- AWS CLI
-
To list the available certificates
The following
describe-certificatesexample lists the available certificates in your AWS account.aws dms describe-certificatesOutput:
{ "Certificates": [ { "CertificateIdentifier": "my-cert", "CertificateCreationDate": 1543259542.506, "CertificatePem": "-----BEGIN CERTIFICATE-----\nMIID9DCCAtygAwIBAgIBQjANBgkqhkiG9w0BAQ ...U" ... remaining output omittted ... } ] }For more information, see Using SSL in the AWS Database Migration Service User Guide.
-
For API details, see DescribeCertificates
in AWS CLI Command Reference.
-
The following code example shows how to use describe-connections.
- AWS CLI
-
To describe connections
The following
describe-connectionsexample lists the connections that you have tested between a replication instance and an endpoint.aws dms describe-connectionsOutput:
{ "Connections": [ { "Status": "successful", "ReplicationInstanceIdentifier": "test", "EndpointArn": "arn:aws:dms:us-east-arn:aws:dms:us-east-1:123456789012:endpoint:ZW5UAN6P4E77EC7YWHK4RZZ3BE", "EndpointIdentifier": "testsrc1", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:6UTDJGBOUS3VI3SUWA66XFJCJQ" } ] }For more information, see Creating Source and Target Endpoints in the AWS Database Migration Service User Guide.
-
For API details, see DescribeConnections
in AWS CLI Command Reference.
-
The following code example shows how to use describe-conversion-configuration.
- AWS CLI
-
To describe a conversion configuration
The following
describe-conversion-configurationexample retrieves the conversion configuration for a migration project.aws dms describe-conversion-configuration \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRSOutput:
{ "MigrationProjectIdentifier": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "ConversionConfiguration": "{\"Common project settings\":{\"ShowSeverityLevelInSql\":\"CRITICAL\",\"EnableGenAiConversion\":false},\"MSSQL_TO_AURORA_POSTGRESQL\":{\"ConvertProceduresToFunction\":true,\"UniqueIndexGeneration\":true,\"CaseSensitivityNames\":false},\"Conversion version\":{\"MSSQL_TO_AURORA_POSTGRESQL_target_engine_version\":\"15\"}}" }For more information, see Specifying schema conversion settings in the AWS Database Migration Service User Guide.
-
For API details, see DescribeConversionConfiguration
in AWS CLI Command Reference.
-
The following code example shows how to use describe-data-providers.
- AWS CLI
-
To describe data providers
The following
describe-data-providersexample retrieves the details of a data provider identified by its ARN.aws dms describe-data-providers \ --filtersName=data-provider-identifier,Values=arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRSOutput:
{ "DataProviders": [ { "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS", "DataProviderCreationTime": "2026-01-09T12:30:00.000000+00:00", "Description": "Example data provider for documentation", "Engine": "sqlserver", "Settings": { "MicrosoftSqlServerSettings": { "ServerName": "example-source-server.us-east-1.rds.amazonaws.com", "Port": 1433, "DatabaseName": "ExampleDatabase", "SslMode": "verify-full", "CertificateArn": "arn:aws:dms:us-east-1:123456789012:cert:EXAMPLEABCDEFGHIJKLMNOPQRS" } } } ] }For more information, see Working with data providers in the AWS Database Migration Service User Guide.
-
For API details, see DescribeDataProviders
in AWS CLI Command Reference.
-
The following code example shows how to use describe-endpoint-types.
- AWS CLI
-
To list the available endpoint types
The following
describe-endpoint-typesexample lists the MySQL endpoint types that are available.aws dms describe-endpoint-types \ --filters"Name=engine-name,Values=mysql"Output:
{ "SupportedEndpointTypes": [ { "EngineName": "mysql", "SupportsCDC": true, "EndpointType": "source", "EngineDisplayName": "MySQL" }, { "EngineName": "mysql", "SupportsCDC": true, "EndpointType": "target", "EngineDisplayName": "MySQL" } ] }For more information, see Working with AWS DMS Endpoints <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Endpoints.html>`__ in the AWS Database Migration Service User Guide.
-
For API details, see DescribeEndpointTypes
in AWS CLI Command Reference.
-
The following code example shows how to use describe-endpoints.
- AWS CLI
-
To describe endpoints
The following
describe-endpointsexample lists the endpoints in your AWS account.aws dms describe-endpointsOutput:
{ "Endpoints": [ { "Username": "dms", "Status": "active", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:SF2WOFLWYWKVEOHID2EKLP3SJI", "ServerName": "ec2-52-32-48-61.us-west-2.compute.amazonaws.com", "EndpointType": "SOURCE", "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/94d5c4e7-4e4c-44be-b58a-c8da7adf57cd", "DatabaseName": "test", "EngineName": "mysql", "EndpointIdentifier": "pri100", "Port": 8193 }, { "Username": "admin", "Status": "active", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:TJJZCIH3CJ24TJRU4VC32WEWFR", "ServerName": "test.example.com", "EndpointType": "SOURCE", "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/2431021b-1cf2-a2d4-77b2-59a9e4bce323", "DatabaseName": "EMPL", "EngineName": "oracle", "EndpointIdentifier": "test", "Port": 1521 } ] }For more information, see Working with AWS DMS Endpoints in the AWS Database Migration Service User Guide.
-
For API details, see DescribeEndpoints
in AWS CLI Command Reference.
-
The following code example shows how to use describe-event-categories.
- AWS CLI
-
To describe event categories
The following
describe-event-categoriesexample lists the available event categories.aws dms describe-event-categoriesOutput:
{ "EventCategoryGroupList": [ { "SourceType": "replication-instance", "EventCategories": [ "low storage", "configuration change", "maintenance", "deletion", "creation", "failover", "failure" ] }, { "SourceType": "replication-task", "EventCategories": [ "configuration change", "state change", "deletion", "creation", "failure" ] } ] }For more information, see Working with Events and Notifications in the AWS Database Migration Service User Guide.
-
For API details, see DescribeEventCategories
in AWS CLI Command Reference.
-
The following code example shows how to use describe-event-subscriptions.
- AWS CLI
-
To describe event subscriptions
The following
describe-event-subscriptionsexample lists the event subscriptions to an Amazon SNS topic.aws dms describe-event-subscriptionsOutput:
{ "EventSubscriptionsList": [ { "CustomerAwsId": "123456789012", "CustSubscriptionId": "my-dms-events", "SnsTopicArn": "arn:aws:sns:us-east-1:123456789012:my-sns-topic", "Status": "deleting", "SubscriptionCreationTime": "2020-05-21 22:28:51.924", "Enabled": true } ] }For more information, see Working with Events and Notifications in the AWS Database Migration Service User Guide.
-
For API details, see DescribeEventSubscriptions
in AWS CLI Command Reference.
-
The following code example shows how to use describe-events.
- AWS CLI
-
To list DMS events
The following
describe-eventsexample lists the events that originated from a replication instance.aws dms describe-events \ --source-type"replication-instance"Output:
{ "Events": [ { "SourceIdentifier": "my-repl-instance", "SourceType": "replication-instance", "Message": "Replication application shutdown", "EventCategories": [], "Date": 1590771645.776 } ] }For more information, see Working with Events and Notifications in the AWS Database Migration Service User Guide.
-
For API details, see DescribeEvents
in AWS CLI Command Reference.
-
The following code example shows how to use describe-extension-pack-associations.
- AWS CLI
-
To describe extension pack associations
The following
describe-extension-pack-associationsexample retrieves the status of operations that apply an extension pack to the target database, identified by their request IDs.aws dms describe-extension-pack-associations \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333Output:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Progress": { "ProgressPercent": 50.0, "ProgressStep": "IN_PROGRESS" } }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "The database user in your target secret does not have sufficient privileges. Grant the required privileges and try again." } } } ] }For more information, see Using extension packs in the AWS Database Migration Service User Guide.
-
For API details, see DescribeExtensionPackAssociations
in AWS CLI Command Reference.
-
The following code example shows how to use describe-instance-profiles.
- AWS CLI
-
To describe instance profiles
The following
describe-instance-profilesexample retrieves the details of an instance profile identified by its ARN.aws dms describe-instance-profiles \ --filtersName=instance-profile-identifier,Values=arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRSOutput:
{ "InstanceProfiles": [ { "InstanceProfileArn": "arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS", "KmsKeyArn": "arn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "PubliclyAccessible": false, "NetworkType": "IPV4", "InstanceProfileName": "example-instance-profile", "Description": "Example instance profile for documentation", "InstanceProfileCreationTime": "2026-01-09T12:30:00.000000+00:00", "SubnetGroupIdentifier": "example-replication-subnet-group", "VpcSecurityGroups": [ "sg-0123456789abcdef0" ] } ] }For more information, see Working with instance profiles in the AWS Database Migration Service User Guide.
-
For API details, see DescribeInstanceProfiles
in AWS CLI Command Reference.
-
The following code example shows how to use describe-metadata-model-assessments.
- AWS CLI
-
To describe metadata model assessments
The following
describe-metadata-model-assessmentsexample retrieves the status of metadata model assessment operations identified by their request IDs.aws dms describe-metadata-model-assessments \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333Output:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Progress": { "ProgressPercent": 50.0, "TotalObjects": 100, "ProgressStep": "ANALYZING", "ProcessedObject": { "Name": "ExampleTable", "Type": "table", "EndpointType": "SOURCE" } } }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "No objects were found according to the specified selection rules. Please review your selection rules and try again." } } } ] }For more information, see Creating database migration assessment reports in the AWS Database Migration Service User Guide.
-
For API details, see DescribeMetadataModelAssessments
in AWS CLI Command Reference.
-
The following code example shows how to use describe-metadata-model-children.
- AWS CLI
-
To describe metadata model children
The following
describe-metadata-model-childrenexample retrieves the child metadata models of theExampleSchemaschema from the source metadata tree.aws dms describe-metadata-model-children \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"}, "rule-action": "explicit"}]}' \ --originSOURCEOutput:
{ "MetadataModelChildren": [ { "MetadataModelName": "Tables", "SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"1\", \"rule-name\": \"1\", \"object-locator\": {\"server-name\": \"example-source-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"ExampleSchema\", \"category-name\": \"Tables\"}, \"rule-action\": \"explicit\"}]}" }, { "MetadataModelName": "Views", "SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"2\", \"rule-name\": \"2\", \"object-locator\": {\"server-name\": \"example-source-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"ExampleSchema\", \"category-name\": \"Views\"}, \"rule-action\": \"explicit\"}]}" }, { "MetadataModelName": "Functions", "SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"3\", \"rule-name\": \"3\", \"object-locator\": {\"server-name\": \"example-source-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"ExampleSchema\", \"category-name\": \"Functions\"}, \"rule-action\": \"explicit\"}]}" }, { "MetadataModelName": "Sequences", "SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"4\", \"rule-name\": \"4\", \"object-locator\": {\"server-name\": \"example-source-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"ExampleSchema\", \"category-name\": \"Sequences\"}, \"rule-action\": \"explicit\"}]}" } ] }For more information, see Navigating the metadata model tree in the AWS Database Migration Service User Guide.
-
For API details, see DescribeMetadataModelChildren
in AWS CLI Command Reference.
-
The following code example shows how to use describe-metadata-model-conversions.
- AWS CLI
-
To describe metadata model conversions
The following
describe-metadata-model-conversionsexample retrieves the status of metadata model conversion operations identified by their request IDs.aws dms describe-metadata-model-conversions \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333Output:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Progress": { "ProgressPercent": 50.0, "TotalObjects": 100, "ProgressStep": "CONVERTING", "ProcessedObject": { "Name": "ExampleTable", "Type": "table", "EndpointType": "SOURCE" } } }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "No objects were found according to the specified selection rules. Please review your selection rules and try again." } } } ] }For more information, see Converting database schemas in the AWS Database Migration Service User Guide.
-
For API details, see DescribeMetadataModelConversions
in AWS CLI Command Reference.
-
The following code example shows how to use describe-metadata-model-creations.
- AWS CLI
-
To describe metadata model creations
The following
describe-metadata-model-creationsexample retrieves the status of metadata model creation operations identified by their request IDs.aws dms describe-metadata-model-creations \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333Output:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "No objects were found according to the specified selection rules. Please review your selection rules and try again." } } } ] }For more information, see Creating statement metadata models in the AWS Database Migration Service User Guide.
-
For API details, see DescribeMetadataModelCreations
in AWS CLI Command Reference.
-
The following code example shows how to use describe-metadata-model-exports-as-script.
- AWS CLI
-
To describe metadata model exports as script
The following
describe-metadata-model-exports-as-scriptexample retrieves the status of operations that export metadata models as data definition language (DDL) scripts, identified by their request IDs.aws dms describe-metadata-model-exports-as-script \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333Output:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "ExportSqlDetails": { "S3ObjectKey": "s3://amzn-s3-demo-bucket/example-migration-project/ExampleScript.zip", "ObjectURL": "https://amzn-s3-demo-bucket.s3.us-east-1.amazonaws.com/example-migration-project/ExampleScript.zip" } }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Progress": { "ProgressPercent": 50.0, "TotalObjects": 100, "ProgressStep": "IN_PROGRESS", "ProcessedObject": { "EndpointType": "TARGET" } } }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "No objects were found according to the specified selection rules. Please review your selection rules and try again." } } } ] }For more information, see Saving your converted code to a SQL file in the AWS Database Migration Service User Guide.
-
For API details, see DescribeMetadataModelExportsAsScript
in AWS CLI Command Reference.
-
The following code example shows how to use describe-metadata-model-exports-to-target.
- AWS CLI
-
To describe metadata model exports to target
The following
describe-metadata-model-exports-to-targetexample retrieves the status of operations that export converted metadata models to the target database, identified by their request IDs.aws dms describe-metadata-model-exports-to-target \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333Output:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Progress": { "ProgressPercent": 50.0, "TotalObjects": 100, "ProgressStep": "APPLYING", "ProcessedObject": { "EndpointType": "TARGET" } } }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "No objects were found according to the specified selection rules. Please review your selection rules and try again." } } } ] }For more information, see Applying your converted code in the AWS Database Migration Service User Guide.
-
For API details, see DescribeMetadataModelExportsToTarget
in AWS CLI Command Reference.
-
The following code example shows how to use describe-metadata-model-imports.
- AWS CLI
-
To describe metadata model imports
The following
describe-metadata-model-importsexample retrieves the status of metadata import operations identified by their request IDs.aws dms describe-metadata-model-imports \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --filtersName=request-id,Values=a1b2c3d4-5678-90ab-cdef-EXAMPLE11111,a1b2c3d4-5678-90ab-cdef-EXAMPLE22222,a1b2c3d4-5678-90ab-cdef-EXAMPLE33333Output:
{ "Requests": [ { "Status": "SUCCESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }, { "Status": "IN_PROGRESS", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Progress": { "ProgressPercent": 50.0, "TotalObjects": 100, "ProgressStep": "IN_PROGRESS", "ProcessedObject": { "EndpointType": "SOURCE" } } }, { "Status": "FAILED", "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "Error": { "defaultErrorDetails": { "Message": "No objects were found according to the specified selection rules. Please review your selection rules and try again." } } } ] }For more information, see Navigating the metadata model tree in the AWS Database Migration Service User Guide.
-
For API details, see DescribeMetadataModelImports
in AWS CLI Command Reference.
-
The following code example shows how to use describe-metadata-model.
- AWS CLI
-
To describe a metadata model
The following
describe-metadata-modelexample retrieves detailed information about theExampleTabletable in theExampleSchemaschema from the source metadata tree, including its SQL definition and references to the corresponding converted metadata models in the target database.aws dms describe-metadata-model \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema", "table-name": "ExampleTable"}, "rule-action": "explicit"}]}' \ --originSOURCEOutput:
{ "MetadataModelName": "ExampleTable", "MetadataModelType": "table", "TargetMetadataModels": [ { "MetadataModelName": "exampletable", "SelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"1\", \"rule-name\": \"1\", \"object-locator\": {\"server-name\": \"example-target-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"exampleschema\", \"table-name\": \"exampletable\"}, \"rule-action\": \"explicit\"}]}" } ], "Definition": "CREATE TABLE ExampleTable (ExampleColumn INTEGER NOT NULL);" }For more information, see Navigating the metadata model tree in the AWS Database Migration Service User Guide.
-
For API details, see DescribeMetadataModel
in AWS CLI Command Reference.
-
The following code example shows how to use describe-migration-projects.
- AWS CLI
-
To describe migration projects
The following
describe-migration-projectsexample retrieves the details of a migration project identified by its ARN.aws dms describe-migration-projects \ --filtersName=migration-project-identifier,Values=arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRSOutput:
{ "MigrationProjects": [ { "MigrationProjectName": "example-migration-project", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "MigrationProjectCreationTime": "2026-01-09T12:30:00.000000+00:00", "SourceDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-source-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "TargetDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-target-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "InstanceProfileArn": "arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS", "InstanceProfileName": "example-instance-profile", "TransformationRules": "{\"rules\":[{\"rule-type\":\"transformation\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"rule-target\":\"schema\",\"rule-action\":\"rename\",\"object-locator\":{\"schema-name\":\"ExampleSchema\"},\"value\":\"TargetSchema\"}]}", "Description": "Example migration project for documentation", "SchemaConversionApplicationAttributes": { "S3BucketPath": "s3://amzn-s3-demo-bucket", "S3BucketRoleArn": "arn:aws:iam::123456789012:role/example-s3-access-role" } } ] }For more information, see Working with migration projects in the AWS Database Migration Service User Guide.
-
For API details, see DescribeMigrationProjects
in AWS CLI Command Reference.
-
The following code example shows how to use describe-orderable-replication-instances.
- AWS CLI
-
To describe orderable replication instances
The following
describe-orderable-replication-instancesexample lists replication instance types that you can order.aws dms describe-orderable-replication-instancesOutput:
{ "OrderableReplicationInstances": [ { "EngineVersion": "3.3.2", "ReplicationInstanceClass": "dms.c4.2xlarge", "StorageType": "gp2", "MinAllocatedStorage": 5, "MaxAllocatedStorage": 6144, "DefaultAllocatedStorage": 100, "IncludedAllocatedStorage": 100, "AvailabilityZones": [ "us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d", "us-east-1e", "us-east-1f" ] }, { "EngineVersion": "3.3.2", "ReplicationInstanceClass": "dms.c4.4xlarge", "StorageType": "gp2", "MinAllocatedStorage": 5, "MaxAllocatedStorage": 6144, "DefaultAllocatedStorage": 100, "IncludedAllocatedStorage": 100, "AvailabilityZones": [ "us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d", "us-east-1e", "us-east-1f" ] }, ...remaining output omitted... }For more information, see Working with an AWS DMS Replication Instance in the AWS Database Migration Service User Guide.
-
For API details, see DescribeOrderableReplicationInstances
in AWS CLI Command Reference.
-
The following code example shows how to use describe-refresh-schemas-status.
- AWS CLI
-
To list the refresh status for an endpoint
The following
describe-refresh-schemas-statusexample returns the status of a previous refresh request.aws dms describe-refresh-schemas-status \ --endpoint-arnarn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWAOutput:
{ "RefreshSchemasStatus": { "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "Status": "successful", "LastRefreshDate": 1590786544.605 } }-
For API details, see DescribeRefreshSchemasStatus
in AWS CLI Command Reference.
-
The following code example shows how to use describe-replication-instances.
- AWS CLI
-
To describe replication instances
The following
describe-replication-instancesexample lists the replication instances in your AWS account.aws dms describe-replication-instancesOutput:
{ "ReplicationInstances": [ { "ReplicationInstanceIdentifier": "my-repl-instance", "ReplicationInstanceClass": "dms.t2.micro", "ReplicationInstanceStatus": "available", "AllocatedStorage": 5, "InstanceCreateTime": 1590011235.952, "VpcSecurityGroups": [ { "VpcSecurityGroupId": "sg-f839b688", "Status": "active" } ], "AvailabilityZone": "us-east-1e", "ReplicationSubnetGroup": { "ReplicationSubnetGroupIdentifier": "default", "ReplicationSubnetGroupDescription": "default", "VpcId": "vpc-136a4c6a", "SubnetGroupStatus": "Complete", "Subnets": [ { "SubnetIdentifier": "subnet-da327bf6", "SubnetAvailabilityZone": { "Name": "us-east-1a" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-42599426", "SubnetAvailabilityZone": { "Name": "us-east-1d" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-bac383e0", "SubnetAvailabilityZone": { "Name": "us-east-1c" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-6746046b", "SubnetAvailabilityZone": { "Name": "us-east-1f" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-d7c825e8", "SubnetAvailabilityZone": { "Name": "us-east-1e" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-cbfff283", "SubnetAvailabilityZone": { "Name": "us-east-1b" }, "SubnetStatus": "Active" } ] }, "PreferredMaintenanceWindow": "wed:11:42-wed:12:12", "PendingModifiedValues": { "MultiAZ": true }, "MultiAZ": false, "EngineVersion": "3.3.2", "AutoMinorVersionUpgrade": true, "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/f7bc0f8e-1a3a-4ace-9faa-e8494fa3921a", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "ReplicationInstancePublicIpAddress": "3.230.18.248", "ReplicationInstancePrivateIpAddress": "172.31.75.90", "ReplicationInstancePublicIpAddresses": [ "3.230.18.248" ], "ReplicationInstancePrivateIpAddresses": [ "172.31.75.90" ], "PubliclyAccessible": true, "FreeUntil": 1590194829.267 } ] }For more information, see Working with an AWS DMS Replication Instance in the AWS Database Migration Service User Guide.
-
For API details, see DescribeReplicationInstances
in AWS CLI Command Reference.
-
The following code example shows how to use describe-replication-subnet-groups.
- AWS CLI
-
To display the available subnet groups
The following
describe-replication-subnet-groupsexample lists the available subnet groups.aws dms describe-replication-subnet-groups \ --filter"Name=replication-subnet-group-id,Values=my-subnet-group"Output:
{ "ReplicationSubnetGroups": [ { "ReplicationSubnetGroupIdentifier": "my-subnet-group", "ReplicationSubnetGroupDescription": "my subnet group", "VpcId": "vpc-136a4c6a", "SubnetGroupStatus": "Complete", "Subnets": [ { "SubnetIdentifier": "subnet-da327bf6", "SubnetAvailabilityZone": { "Name": "us-east-1a" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-bac383e0", "SubnetAvailabilityZone": { "Name": "us-east-1c" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-d7c825e8", "SubnetAvailabilityZone": { "Name": "us-east-1e" }, "SubnetStatus": "Active" } ] } ] }For more information, see Setting Up a Network for a Replication Instance in the AWS Database Migration Service User Guide.
-
For API details, see DescribeReplicationSubnetGroups
in AWS CLI Command Reference.
-
The following code example shows how to use describe-replication-task-assessment-results.
- AWS CLI
-
To list the results of replication task assessmentss
The following
describe-replication-task-assessment-resultsexample lists the results of a prior task assesssment.aws dms describe-replication-task-assessment-resultsOutput:
{ "ReplicationTaskAssessmentResults": [ { "ReplicationTaskIdentifier": "moveit2", "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII", "ReplicationTaskLastAssessmentDate": 1590790230.0, "AssessmentStatus": "No issues found", "AssessmentResultsFile": "moveit2/2020-05-29-22-10" } ] }For more information, see Creating a Task Assessment Report in the AWS Database Migration Service User Guide.
-
For API details, see DescribeReplicationTaskAssessmentResults
in AWS CLI Command Reference.
-
The following code example shows how to use describe-replication-tasks.
- AWS CLI
-
To describe a replication task
The following
describe-replication-tasksexample describes current replication tasks.aws dms describe-replication-tasksOutput:
{ "ReplicationTasks": [ { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted... , "ReplicationTaskSettings": ...output omitted... , "Status": "stopped", "StopReason": "Stop Reason FULL_LOAD_ONLY_FINISHED", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskStartDate": 1590619805.212, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII", "ReplicationTaskStats": { "FullLoadProgressPercent": 100, "ElapsedTimeMillis": 0, "TablesLoaded": 0, "TablesLoading": 0, "TablesQueued": 0, "TablesErrored": 0, "FreshStartDate": 1590619811.528, "StartDate": 1590619811.528, "StopDate": 1590619842.068 } } ] }For more information, see Working with AWS DMS Tasks in the AWS Database Migration Service User Guide.
-
For API details, see DescribeReplicationTasks
in AWS CLI Command Reference.
-
The following code example shows how to use describe-schemas.
- AWS CLI
-
To describe database schemas
The following
describe-schemasexample lists the available tables at an endpoint.aws dms describe-schemas \ --endpoint-arn"arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA"Output:
{ "Schemas": [ "prodrep" ] }For more information, see This is the topic title
in the AWS Database Migration Service User Guide. -
For API details, see DescribeSchemas
in AWS CLI Command Reference.
-
The following code example shows how to use export-metadata-model-assessment.
- AWS CLI
-
To export a conversion assessment report
The following
export-metadata-model-assessmentexample exports a conversion assessment report for all objects in theExampleSchemaschema.aws dms export-metadata-model-assessment \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"}, "rule-action": "explicit"}]}' \ --file-nameexample-assessment-report\ --assessment-report-typespdfcsvOutput:
{ "PdfReport": { "S3ObjectKey": "example-migration-project/example-assessment-report.pdf", "ObjectURL": "https://amzn-s3-demo-bucket.s3.amazonaws.com/example-migration-project/example-assessment-report.pdf" }, "CsvReport": { "S3ObjectKey": "example-migration-project/example-assessment-report.zip", "ObjectURL": "https://amzn-s3-demo-bucket.s3.amazonaws.com/example-migration-project/example-assessment-report.zip" } }For more information, see Creating database migration assessment reports in the AWS Database Migration Service User Guide.
-
For API details, see ExportMetadataModelAssessment
in AWS CLI Command Reference.
-
The following code example shows how to use get-target-selection-rules.
- AWS CLI
-
To convert source selection rules to target selection rules
The following
get-target-selection-rulesexample converts source selection rules that select theExampleTabletable in theExampleSchemaschema into target selection rules that reference its converted counterpart.aws dms get-target-selection-rules \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "database-name": "ExampleDatabase", "schema-name": "ExampleSchema", "table-name": "ExampleTable"}, "rule-action": "explicit"}]}'Output:
{ "TargetSelectionRules": "{\"rules\": [{\"rule-type\": \"selection\", \"rule-id\": \"1\", \"rule-name\": \"1\", \"object-locator\": {\"server-name\": \"example-target-server.us-east-1.rds.amazonaws.com\", \"schema-name\": \"exampledatabase_exampleschema\", \"table-name\": \"exampletable\"}, \"rule-action\": \"explicit\"}]}" }For more information, see Using selection rules in the AWS Database Migration Service User Guide.
-
For API details, see GetTargetSelectionRules
in AWS CLI Command Reference.
-
The following code example shows how to use list-tags-for-resource.
- AWS CLI
-
To list the tags for a resource
The following
list-tags-for-resourceexample lists the tags for a replication instance.aws dms list-tags-for-resource \ --resource-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUEOutput:
{ "TagList": [ { "Key": "Project", "Value": "dbMigration" }, { "Key": "Environment", "Value": "PROD" } ] }For more information, see Tagging Resources in the AWS Database Migration Service User Guide.
-
For API details, see ListTagsForResource
in AWS CLI Command Reference.
-
The following code example shows how to use modify-conversion-configuration.
- AWS CLI
-
To modify a conversion configuration
The following
modify-conversion-configurationexample enables generative AI assisted conversion and updates a conversion path setting for a migration project.aws dms modify-conversion-configuration \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --conversion-configuration '{"Common project settings":{"EnableGenAiConversion":true},"MSSQL_TO_AURORA_POSTGRESQL":{"ConvertProceduresToFunction":false}}'Output:
{ "MigrationProjectIdentifier": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS" }For more information, see Specifying schema conversion settings in the AWS Database Migration Service User Guide.
-
For API details, see ModifyConversionConfiguration
in AWS CLI Command Reference.
-
The following code example shows how to use modify-data-provider.
- AWS CLI
-
To modify a data provider
The following
modify-data-providerexample updates the description and server name of a data provider.aws dms modify-data-provider \ --data-provider-identifierarn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS\ --description"Updated data provider description"\ --enginesqlserver\ --settingsMicrosoftSqlServerSettings={ServerName=new-source-server.us-east-1.rds.amazonaws.com}Output:
{ "DataProvider": { "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS", "DataProviderCreationTime": "2026-01-09T12:30:00.000000+00:00", "Description": "Updated data provider description", "Engine": "sqlserver", "Settings": { "MicrosoftSqlServerSettings": { "ServerName": "new-source-server.us-east-1.rds.amazonaws.com", "Port": 1433, "DatabaseName": "ExampleDatabase", "SslMode": "verify-full", "CertificateArn": "arn:aws:dms:us-east-1:123456789012:cert:EXAMPLEABCDEFGHIJKLMNOPQRS" } } } }For more information, see Working with data providers in the AWS Database Migration Service User Guide.
-
For API details, see ModifyDataProvider
in AWS CLI Command Reference.
-
The following code example shows how to use modify-endpoint.
- AWS CLI
-
To modify an endpoint
The following
modify-endpointexample adds an extra connection attribute to an endpoint.aws dms modify-endpoint \ --endpoint-arn"arn:aws:dms:us-east-1:123456789012:endpoint:GUVAFG34EECUOJ6QVZ56DAHT3U"\ --extra-connection-attributes"compressionType=GZIP"Output:
{ "Endpoint": { "EndpointIdentifier": "src-endpoint", "EndpointType": "SOURCE", "EngineName": "s3", "EngineDisplayName": "Amazon S3", "ExtraConnectionAttributes": "compressionType=GZIP;csvDelimiter=,;csvRowDelimiter=\\n;", "Status": "active", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:GUVAFG34EECUOJ6QVZ56DAHT3U", "SslMode": "none", "ServiceAccessRoleArn": "arn:aws:iam::123456789012:role/my-s3-access-role", "S3Settings": { "ServiceAccessRoleArn": "arn:aws:iam::123456789012:role/my-s3-access-role", "CsvRowDelimiter": "\\n", "CsvDelimiter": ",", "BucketFolder": "", "BucketName": "", "CompressionType": "GZIP", "EnableStatistics": true } } }For more information, see Working with AWS DMS Endpoints <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Endpoints.html>`__ in the AWS Database Migration Service User Guide.
-
For API details, see ModifyEndpoint
in AWS CLI Command Reference.
-
The following code example shows how to use modify-event-subscription.
- AWS CLI
-
To modify an event subscription
The following
modify-event-subscriptionexample changes the source type of an event subscription.aws dms modify-event-subscription \ --subscription-name"my-dms-events"\ --source-typereplication-taskOutput:
{ "EventSubscription": { "CustomerAwsId": "123456789012", "CustSubscriptionId": "my-dms-events", "SnsTopicArn": "arn:aws:sns:us-east-1:123456789012:my-sns-topic", "Status": "modifying", "SubscriptionCreationTime": "2020-05-29 17:04:40.262", "SourceType": "replication-task", "Enabled": true } }For more information, see Working with Events and Notifications in the AWS Database Migration Service User Guide.
-
For API details, see ModifyEventSubscription
in AWS CLI Command Reference.
-
The following code example shows how to use modify-instance-profile.
- AWS CLI
-
To modify an instance profile
The following
modify-instance-profileexample updates the description and network type of an instance profile.aws dms modify-instance-profile \ --instance-profile-identifierarn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS\ --description"Updated instance profile description"\ --network-typeDUALOutput:
{ "InstanceProfile": { "InstanceProfileArn": "arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS", "KmsKeyArn": "arn:aws:kms:us-east-1:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "PubliclyAccessible": false, "NetworkType": "DUAL", "InstanceProfileName": "example-instance-profile", "Description": "Updated instance profile description", "InstanceProfileCreationTime": "2026-01-09T12:30:00.000000+00:00", "SubnetGroupIdentifier": "example-replication-subnet-group", "VpcSecurityGroups": [ "sg-0123456789abcdef0" ] } }For more information, see Working with instance profiles in the AWS Database Migration Service User Guide.
-
For API details, see ModifyInstanceProfile
in AWS CLI Command Reference.
-
The following code example shows how to use modify-migration-project.
- AWS CLI
-
To modify a migration project
The following
modify-migration-projectexample updates the source data provider and description of a migration project.aws dms modify-migration-project \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --description"Updated migration project description"\ --source-data-provider-descriptorsDataProviderIdentifier=arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRSOutput:
{ "MigrationProject": { "MigrationProjectName": "example-migration-project", "MigrationProjectArn": "arn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS", "MigrationProjectCreationTime": "2026-01-09T12:30:00.000000+00:00", "SourceDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-source-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "TargetDataProviderDescriptors": [ { "SecretsManagerSecretId": "arn:aws:secretsmanager:us-east-1:123456789012:secret:example-target-secret-A1B2C3", "SecretsManagerAccessRoleArn": "arn:aws:iam::123456789012:role/example-secrets-manager-role", "DataProviderName": "example-data-provider", "DataProviderArn": "arn:aws:dms:us-east-1:123456789012:data-provider:EXAMPLEABCDEFGHIJKLMNOPQRS" } ], "InstanceProfileArn": "arn:aws:dms:us-east-1:123456789012:instance-profile:EXAMPLEABCDEFGHIJKLMNOPQRS", "InstanceProfileName": "example-instance-profile", "TransformationRules": "{\"rules\":[{\"rule-type\":\"transformation\",\"rule-id\":\"1\",\"rule-name\":\"1\",\"rule-target\":\"schema\",\"rule-action\":\"rename\",\"object-locator\":{\"schema-name\":\"ExampleSchema\"},\"value\":\"TargetSchema\"}]}", "Description": "Updated migration project description", "SchemaConversionApplicationAttributes": { "S3BucketPath": "s3://amzn-s3-demo-bucket", "S3BucketRoleArn": "arn:aws:iam::123456789012:role/example-s3-access-role" } } }For more information, see Working with migration projects in the AWS Database Migration Service User Guide.
-
For API details, see ModifyMigrationProject
in AWS CLI Command Reference.
-
The following code example shows how to use modify-replication-instance.
- AWS CLI
-
To modify a replication instance
The following
modify-replication-instanceexample modifies a replication instance so that it uses a Multi-AZ deployment.aws dms modify-replication-instance \ --replication-instance-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE\ --multi-azOutput:
{ "ReplicationInstance": { "ReplicationInstanceIdentifier": "my-repl-instance", "ReplicationInstanceClass": "dms.t2.micro", "ReplicationInstanceStatus": "available", "AllocatedStorage": 5, "InstanceCreateTime": 1590011235.952, ...output omitted... "PendingModifiedValues": { "MultiAZ": true }, "MultiAZ": false, "EngineVersion": "3.3.2", "AutoMinorVersionUpgrade": true, "KmsKeyId": "arn:aws:kms:us-east-1:123456789012:key/f7bc0f8e-1a3a-4ace-9faa-e8494fa3921a", ...output omitted... } }For more information, see Working with an AWS DMS Replication Instance in the AWS Database Migration Service User Guide.
-
For API details, see ModifyReplicationInstance
in AWS CLI Command Reference.
-
The following code example shows how to use modify-replication-subnet-group.
- AWS CLI
-
To modify a subnet group
The following
modify-replication-subnet-groupexample changes the lists of subnets associated with a subnet group.aws dms modify-replication-subnet-group \ --replication-subnet-group-identifiermy-subnet-group\ --subnet-idsubnet-da327bf6subnet-bac383e0Output:
{ "ReplicationSubnetGroup": { "ReplicationSubnetGroupIdentifier": "my-subnet-group", "ReplicationSubnetGroupDescription": "my subnet group", "VpcId": "vpc-136a4c6a", "SubnetGroupStatus": "Complete", "Subnets": [ { "SubnetIdentifier": "subnet-da327bf6", "SubnetAvailabilityZone": { "Name": "us-east-1a" }, "SubnetStatus": "Active" }, { "SubnetIdentifier": "subnet-bac383e0", "SubnetAvailabilityZone": { "Name": "us-east-1c" }, "SubnetStatus": "Active" } ] } }For more information, see Setting Up a Network for a Replication Instance in the AWS Database Migration Service User Guide.
-
For API details, see ModifyReplicationSubnetGroup
in AWS CLI Command Reference.
-
The following code example shows how to use modify-replication-task.
- AWS CLI
-
To modify a replication task
The following
modify-replication-taskexample changes the table mappings for a task.aws dms modify-replication-task \ --replication-task-arn"arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII"\ --table-mappingsfile://table-mappings.jsonContents of
table-mappings.json:{ "rules": [ { "rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": { "schema-name": "prodrep", "table-name": "ACCT_%" }, "rule-action": "include", "filters": [] } ] }Output:
{ "ReplicationTask": { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted..., "ReplicationTaskSettings": ...output omitted..., "Status": "modifying", "StopReason": "Stop Reason FULL_LOAD_ONLY_FINISHED", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskStartDate": 1590789424.653, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" } }For more information, see Working with AWS DMS Tasks in the AWS Database Migration Service User Guide.
-
For API details, see ModifyReplicationTask
in AWS CLI Command Reference.
-
The following code example shows how to use reboot-replication-instance.
- AWS CLI
-
To reboot a replication instance
The following
reboot-replication-instanceexample reboots a replication instance.aws dms reboot-replication-instance \ --replication-instance-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUEOutput:
{ "ReplicationInstance": { "ReplicationInstanceIdentifier": "my-repl-instance", "ReplicationInstanceClass": "dms.t2.micro", "ReplicationInstanceStatus": "rebooting", "AllocatedStorage": 5, "InstanceCreateTime": 1590011235.952, ... output omitted ... } }For more information, see Working with an AWS DMS Replication Instance in the AWS Database Migration Service User Guide.
-
For API details, see RebootReplicationInstance
in AWS CLI Command Reference.
-
The following code example shows how to use refresh-schemas.
- AWS CLI
-
To refresh database schemas
The following
refresh-schemasexample requests that AWS DMS refresh the list of schemas at an endpoint.aws dms refresh-schemas \ --replication-instance-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE\ --endpoint-arn"arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA"Output:
{ "RefreshSchemasStatus": { "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "Status": "refreshing", "LastRefreshDate": 1590019949.103 } }-
For API details, see RefreshSchemas
in AWS CLI Command Reference.
-
The following code example shows how to use reload-tables.
- AWS CLI
-
To refresh the list of tables available at an endpoint
The following
reload-tablesexample reloads the list of available tables at an endpoint.aws dms reload-tables \ --replication-task-arn"arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII"\ --tables-to-reload"SchemaName=prodrep,TableName=ACCT_BAL"Output:
{ "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" }-
For API details, see ReloadTables
in AWS CLI Command Reference.
-
The following code example shows how to use remove-tags-from-resource.
- AWS CLI
-
To remove tags from a replication instance
The following
remove-tags-from-resourceexample removes tags from a replication instance.aws dms remove-tags-from-resource \ --resource-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE\ --tag-keysEnvironmentProjectThis command produces no output.
For more information, see Tagging Resources in the AWS Database Migration Service User Guide.
-
For API details, see RemoveTagsFromResource
in AWS CLI Command Reference.
-
The following code example shows how to use start-extension-pack-association.
- AWS CLI
-
To apply an extension pack to the target database
The following
start-extension-pack-associationexample queues the application of an extension pack to the target database.aws dms start-extension-pack-association \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRSOutput:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }For more information, see Using extension packs in the AWS Database Migration Service User Guide.
-
For API details, see StartExtensionPackAssociation
in AWS CLI Command Reference.
-
The following code example shows how to use start-metadata-model-assessment.
- AWS CLI
-
To assess all objects in a schema
The following
start-metadata-model-assessmentexample queues an assessment of the conversion complexity for all objects in theExampleSchemaschema.aws dms start-metadata-model-assessment \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection","rule-id": "1","rule-name": "1","object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"},"rule-action": "explicit"}]}'Output:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }For more information, see Creating database migration assessment reports in the AWS Database Migration Service User Guide.
-
For API details, see StartMetadataModelAssessment
in AWS CLI Command Reference.
-
The following code example shows how to use start-metadata-model-conversion.
- AWS CLI
-
To convert all objects in a schema
The following
start-metadata-model-conversionexample queues a conversion of all objects in theExampleSchemaschema to the target database format.aws dms start-metadata-model-conversion \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection","rule-id": "1","rule-name": "1","object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"},"rule-action": "explicit"}]}'Output:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }For more information, see Converting database schemas in the AWS Database Migration Service User Guide.
-
For API details, see StartMetadataModelConversion
in AWS CLI Command Reference.
-
The following code example shows how to use start-metadata-model-creation.
- AWS CLI
-
To create a metadata model for a SQL statement
The following
start-metadata-model-creationexample queues the creation of a metadata model for a SQL statement. The selection rule specifies the schema where the metadata model is placed, and--metadata-model-nameprovides a unique identifier for use in subsequent operations.aws dms start-metadata-model-creation \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection", "rule-id": "1", "rule-name": "1", "object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "database-name": "ExampleDatabase", "schema-name": "ExampleSchema"}, "rule-action": "explicit"}]}' \ --metadata-model-nameExampleStatement\ --properties StatementProperties={Definition="SELECT * FROM ExampleTable;"}Output:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }For more information, see Creating statement metadata models in the AWS Database Migration Service User Guide.
-
For API details, see StartMetadataModelCreation
in AWS CLI Command Reference.
-
The following code example shows how to use start-metadata-model-export-as-script.
- AWS CLI
-
To export converted metadata models as DDL scripts
The following
start-metadata-model-export-as-scriptexample queues an export of converted metadata models for all objects in theExampleSchemaschema as data definition language (DDL) scripts to the Amazon S3 bucket associated with the migration project.aws dms start-metadata-model-export-as-script \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection","rule-id": "1","rule-name": "1","object-locator": {"server-name": "example-target-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"},"rule-action": "explicit"}]}' \ --originTARGET\ --file-nameExampleScriptOutput:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }For more information, see Saving your converted code to a SQL file in the AWS Database Migration Service User Guide.
-
For API details, see StartMetadataModelExportAsScript
in AWS CLI Command Reference.
-
The following code example shows how to use start-metadata-model-export-to-target.
- AWS CLI
-
To export converted metadata models to the target database
The following
start-metadata-model-export-to-targetexample queues an export of converted metadata models for all objects in theExampleSchemaschema to the target database.aws dms start-metadata-model-export-to-target \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection","rule-id": "1","rule-name": "1","object-locator": {"server-name": "example-target-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"},"rule-action": "explicit"}]}' \ --overwrite-extension-packOutput:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }For more information, see Applying your converted code in the AWS Database Migration Service User Guide.
-
For API details, see StartMetadataModelExportToTarget
in AWS CLI Command Reference.
-
The following code example shows how to use start-metadata-model-import.
- AWS CLI
-
To import metadata from the source database
The following
start-metadata-model-importexample queues a metadata import for all objects in theExampleSchemaschema from the source database.aws dms start-metadata-model-import \ --migration-project-identifierarn:aws:dms:us-east-1:123456789012:migration-project:EXAMPLEABCDEFGHIJKLMNOPQRS\ --selection-rules '{"rules": [{"rule-type": "selection","rule-id": "1","rule-name": "1","object-locator": {"server-name": "example-source-server.us-east-1.rds.amazonaws.com", "schema-name": "ExampleSchema"},"rule-action": "explicit"}]}' \ --originSOURCE\ --no-refreshOutput:
{ "RequestIdentifier": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" }For more information, see Navigating the metadata model tree in the AWS Database Migration Service User Guide.
-
For API details, see StartMetadataModelImport
in AWS CLI Command Reference.
-
The following code example shows how to use start-replication-task-assessment.
- AWS CLI
-
To start a task assessment
The following
start-replication-task-assessmentexample starts a replication task assessment.aws dms start-replication-task-assessment \ --replication-task-arnarn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FIIOutput:
{ "ReplicationTask": { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted..., "ReplicationTaskSettings": ...output omitted..., "Status": "testing", "StopReason": "Stop Reason FULL_LOAD_ONLY_FINISHED", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskStartDate": 1590789988.677, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" } }For more information, see Creating a Task Assessment Report in the AWS Database Migration Service User Guide.
-
For API details, see StartReplicationTaskAssessment
in AWS CLI Command Reference.
-
The following code example shows how to use start-replication-task.
- AWS CLI
-
To start a replication task
The following
command-nameexample lists the available widgets in your AWS account.aws dms start-replication-task \ --replication-task-arnarn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII\ --start-replication-task-typereload-targetOutput:
{ "ReplicationTask": { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted... , "ReplicationTaskSettings": ...output omitted... , "Status": "starting", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskStartDate": 1590619805.212, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" } }For more information, see Working with AWS DMS Tasks in the AWS Database Migration Service User Guide.
-
For API details, see StartReplicationTask
in AWS CLI Command Reference.
-
The following code example shows how to use stop-replication-task.
- AWS CLI
-
To stop a task
The following
stop-replication-taskexample stops a task.aws dms stop-replication-task \ --replication-task-arnarn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FIIOutput:
{ "ReplicationTask": { "ReplicationTaskIdentifier": "moveit2", "SourceEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "TargetEndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:EOM4SFKCZEYHZBFGAGZT3QEC5U", "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "MigrationType": "full-load", "TableMappings": ...output omitted..., "ReplicationTaskSettings": ...output omitted..., "Status": "stopping", "ReplicationTaskCreationDate": 1590524772.505, "ReplicationTaskStartDate": 1590789424.653, "ReplicationTaskArn": "arn:aws:dms:us-east-1:123456789012:task:K55IUCGBASJS5VHZJIINA45FII" } }For more information, see Working with AWS DMS Tasks in the AWS Database Migration Service User Guide.
-
For API details, see StopReplicationTask
in AWS CLI Command Reference.
-
The following code example shows how to use test-connection.
- AWS CLI
-
To test a connection to an endpoint
The following
test-connectionexample tests whether an endpoint can be accessed from a replication instance.aws dms test-connection \ --replication-instance-arnarn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE\ --endpoint-arnarn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWAOutput:
{ "Connection": { "ReplicationInstanceArn": "arn:aws:dms:us-east-1:123456789012:rep:T3OM7OUB5NM2LCVZF7JPGJRNUE", "EndpointArn": "arn:aws:dms:us-east-1:123456789012:endpoint:6GGI6YPWWGAYUVLKIB732KEVWA", "Status": "testing", "EndpointIdentifier": "src-database-1", "ReplicationInstanceIdentifier": "my-repl-instance" } }For more information, see Creating source and target endpoints in the AWS Database Migration Service User Guide.
-
For API details, see TestConnection
in AWS CLI Command Reference.
-