Skip to content

How do I use create-replication-config with an instance profile

0

I am using create-replication-config to create a serverless dms task. The task creates but I wish to reference an existing instance profile rather than listing all the properties of --compute-config. I also cannot see in the documentation for create-replication-config where to specify the Target Table Preparation Mode. Thanks for your help

1 Answer
2
Accepted Answer

To use create-replication-config with an existing instance profile for a serverless DMS task, you would typically include the instance profile ARN in the --compute-config parameter. However, the current AWS DMS Serverless API does not directly support specifying an instance profile in the create-replication-config command.

Instead, you need to provide the necessary VPC and security group information directly in the --compute-config parameter. This includes specifying the ReplicationSubnetGroupId and VpcSecurityGroupIds. For example:

--compute-config '{
  "MaxCapacityUnits": 4,
  "MultiAZ": false,
  "ReplicationSubnetGroupId": "your-subnet-group-id",
  "VpcSecurityGroupIds": ["your-security-group-id"]
}'

Regarding the Target Table Preparation Mode, this setting is typically specified in the replication task settings, which are part of the --replication-settings parameter in the create-replication-config command. You can include it like this:

--replication-settings '{
  "TargetMetadata": {
    "TargetSchema": "",
    "SupportLobs": true,
    "FullLobMode": false,
    "LobChunkSize": 64,
    "LimitedSizeLobMode": true,
    "LobMaxSize": 32
  },
  "FullLoadSettings": {
    "TargetTablePrepMode": "DROP_AND_CREATE"
  }
  // ... other settings ...
}'

In this example, the TargetTablePrepMode is set to "DROP_AND_CREATE", but you can change this to other valid options like "TRUNCATE" or "DO_NOTHING" based on your requirements.

Remember to adjust these settings according to your specific needs and environment configuration.

Sources
Orchestrate an AWS DMS Serverless replication task using AWS CLI | AWS Database Blog

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.