How to use EventBridge Scheduler to automate DMS Replication Task runs on a weekly cadence?

0

I created a DMS replication task. All of the pre-migration assessments passed except for one. There is a table in my source data that failed with 'Table has LOBs but no primary key', but the table this error appeared on has a primary key, it's just not recognized in the Premigration assessment for some reason. When I manually ran the initial run, it completed successfully and data was refreshed in the necessary tables.

I followed the instructions from this post, https://repost.aws/knowledge-center/dms-automate-tasks-specific-intervals, to try to automate the runs on a weekly cadence by creating an EventBridge Schedule using the EventBridge Scheduler. Beginng from step 6 from that post, I did the following:

  • Searched for 'startreplicationtask' in the API search field and chose StartReplicationTask.
  • Input the ReplicationTaskArn for my DMS task.
  • Input "resume-processing" as the StartReplicationTaskType.
  • Enabled the schedule state.
  • Left the ' Action after schedule completion' option as 'None'.
  • I left all the fields as default options in the 'Retry policy and dead-letter queue (DLQ)' section.
  • I did Not define a Customized encryption for this task.
  • Under 'Permissions', I chose an existing IAM role that has the permissions defined to assume the role for "events.amazonaws.com", "apidestinations.events.amazonaws.com", "dms.amazonaws.com", "redshift.amazonaws.com", and "scheduler.amazonaws.com". The same role also has Permission Policies for AmazonDMSRedshiftS3Role, AmazonEventBridgeFullAccess, AmazonEventBridgeSchedulerFullAccess, AmazonRedshiftDataFullAccess, AmazonRedshiftFullAccess, and CloudWatchEventsFullAccess and IAMFullAccess.

However, this DMS task has not triggered automatically using the Schedule that is defined. Are there other components within the AWS Ecosystem that need to be defined and tied to this task in conjunction with the EventBridge Scheduler to get this to automate its runs successfully?

Please advise.

2 Antworten
1
Akzeptierte Antwort

Hello.

If you suspect an IAM policy error, you should check the CloudTrail event history as described in the documentation you shared.
https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events-console.html

Also, I think the IAM you set up does not have enough permissions for the EventBridge scheduler to execute "StartReplicationTask".
The "AmazonDMSRedshiftS3Role" and "AmazonEventBridgeFullAccess", "AmazonEventBridgeSchedulerFullAccess", "AmazonRedshiftDataFullAccess", "AmazonRedshiftFullAccess", "CloudWatchEventsFullAccess", "IAMFullAccess" settings you have set do not have permission to execute the DMS "StartReplicationTask".
Please try attaching the following IAM policy once.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": "dms:*",
      "Resource": "*"
    }
  ]
}

If this policy is successful, then narrow down the permissions and check if the policy below works.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "VisualEditor0",
      "Effect": "Allow",
      "Action": "dms:StartReplicationTask",
      "Resource": "*"
    }
  ]
}
profile picture
EXPERTE
beantwortet vor einem Monat
  • The DMS task triggered but only ran for about 1.5 minutes and didn't actually migrate any data. When I checked the logs, this is the message near the end of the logs: "No records received to load or apply on target , waiting for data from upstream (streamcomponent.c:1991)". Is this normal behavior for DMS tasks on EventBridge Scheduler? If the data has no updated rows, the "StartReplicationTaskType" set to "resume-processing" just won't run the DMS task even if it's defined as a Full Load to migrate existing data from the source?

0

there could be different reasons for task not getting triggered. you can refer to https://repost.aws/knowledge-center/eventbridge-rules-troubleshoot to troubleshoot the eventbridge rule execution.

AWS
beantwortet vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen