Cloudformation - DMS Replication task
0
Cloudformation DMS replication task, TableMappings: , doesn't take json. Error Invalid JSON but I have checked in JSON checker, JSON is valid. Please let me know if there is any way to provided JSON file has input. sample JSON File.
{
"rules": [
{
"rule-type": "selection",
"rule-id": "528656830",
"rule-name": "528624433",
"object-locator": {
"schema-name": "APPLSYS",
"table-name": "FND_CURRENCIES"
},
"rule-action": "include",
"filters": []
}
]
}
asked 24 days ago16 views
1 Answers
1
Hi,
The property TableMappings of the resource AWS::DMS::ReplicationTask accepts a single String:
As the double quote (") is a String delimiter in the CloudFormation YAML Syntax you need to escape the double quotes of your JSON string, as shown in the example:
AWSTemplateFormatVersion: 2010-09-09 Resources: myReplicationTask: Properties: MigrationType: full-load ReplicationInstanceArn: ReplicationInstance SourceEndpointArn: SourceEndpoint TableMappings: "{ \"rules\": [ { \"rule-type\": \"selection\", \"rule-id\": \"1\", \"rule-name\": \"1\", \"object-locator\": { \"schema-name\": \"%\", \"table-name\": \"%\" }, \"rule-action\": \"include\" } ] }" TargetEndpointArn: TargetEndpoint Type: "AWS::DMS::ReplicationTask"
Relevant questions
dms create replication task SYSTEM ERROR MESSAGE:An internal error
asked a year agoAWS DMS Replication Task
asked a month agoIs supported Timestamptz datatype in DMS postgres replication?
asked 3 years agoCloudformation - DMS Replication task
asked 24 days agoHow to use regex in ECS task definition JSON?
asked 4 months agoDMS task fails when Postgres DateStyle parameter is not ISO
asked 25 days agoPresigned POST File Submission Invalid JSON
asked 5 years agoResolution for Fatal error when using DMS for on-going replication from RDS Postgres to S3
Accepted Answerasked a year agodefining the name of task definition json to run ecs task in github actions
asked 2 years agoDMS Task Fails with RECOVERABLE_ERROR but no other info
asked 3 years ago
Thanks, actually I got the solution before your reply. JSON was correctly formatted, it wasn't taking it as string, hence JSON had to be within single quote.
TableMappings: '{ "rules": [ { "rule-type": "selection", "rule-id": "528656830", "rule-name": "528624433", "object-locator": { "schema-name": "APPLSYS", "table-name": "FND_CURRENCIES" }, "rule-action": "include", "filters": [] } } ] }'