- Newest
- Most votes
- Most comments
Hello,
Thank you for writing on re:Post.
From the case description, I understand that you are getting below error while creating the resource type 'AWS::DMS::ReplicationConfig' and therefore you want guidance on how to resolve this error.
Error: Properties validation failed for resource DMSReplicationConfig with message: [#/TableMappings: expected type: JSONObject, found: String]
Please note that, the resource type "AWS::DMS::ReplicationConfig" property 'TableMappings' is expecting a JSON object. To solve this issue, we can pass the 'TableMappings' property values as Json directly and in your case you will require to remove the extra '|' pipe sign and it will work. Further, you can also provide the list of JSON Objects to 'TableMappings' property.
I tried with the below code and noted no validation errors on my end. I was able to upload the template and get to stack creation with no issues. Please check the below snippets:
Example 1:
Resources:
ReplicationConfig:
Type: AWS::DMS::ReplicationConfig
Properties:
ReplicationConfigIdentifier: DMSReplicationConfig
ComputeConfig:
MaxCapacityUnits: '16'
MinCapacityUnits: '8'
MultiAZ: 'false'
ReplicationType: full-load-and-cdc
SourceEndpointArn: arn:aws:dms:us-east-1:<acc-id>:endpoint:OA7LVK3IJZBPHP5BNNCFHHBBU
TargetEndpointArn: arn:aws:dms:us-east-1:<acc-id>:endpoint:UIRGNKSFJVAYLCDNSJJITBPE
TableMappings:
rules:
- rule-type: selection
rule-id: '713963603'
rule-name: '713963603'
object-locator:
schema-name: '%'
table-name: '%'
rule-action: include
filters: []
- rule-id: '063767275'
rule-name: '063767275'
rule-type: selection
rule-action: include
object-locator:
schema-name: public
table-name: team
filters: []
Example 2:
Resources:
ReplicationConfig:
Type: AWS::DMS::ReplicationConfig
Properties:
ReplicationConfigIdentifier: DMSReplicationConfig1
ComputeConfig:
MaxCapacityUnits: '16'
MinCapacityUnits: '8'
MultiAZ: 'false'
ReplicationType: full-load-and-cdc
SourceEndpointArn: arn:aws:dms:us-east-1:<acc-id>:endpoint:OA7LVK3IJZBPHP5BNNCFHHBBU
TargetEndpointArn: arn:aws:dms:us-east-1:<acc-id>:endpoint:UIRGNKSFJVAYLCDNSJJITBPE
TableMappings: { "rules": [ { "rule-type": "selection", "rule-id": "1", "rule-name": "SchemaMapping", "object-locator": { "schema-name": "otp" }, "rule-action": "include" }, { "rule-type": "selection", "rule-id": "2", "rule-name": "TableMapping", "object-locator": { "schema-name": "otp", "table-name": "audit" }, "rule-action": "include" }, { "rule-type": "selection", "rule-id": "3", "rule-name": "TableMapping", "object-locator": { "schema-name": "otp", "table-name": "client" }, "rule-action": "include" } ] }
Relevant content
- asked a year ago
- asked a month ago
- asked 3 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago