1

I have a use case where I manually trigger an AWS Step Function to migrate data between two different databases using the AWS DMS service. The Step Function execution creates a resource called ReplicationInstance. The problem is that the creation of the ReplicationInstance takes more than 18 minutes. Currently, I'm using an estimated wait time of 20 minutes, but this is not efficient.

I want to improve this process by pausing the creation of the replication task until the ReplicationInstance is successfully created. To achieve this, I'm using an EventBridge rule to detect when the ReplicationInstance status becomes active. My goal is to automate the process of capturing the task token from the Step Function and sending it back when the event "ReplicationInstance is active" is triggered.

The figure below illustrates the problem I'm facing. enter image description here Can anyone provide guidance or examples on how to automate the task token capture and return process within AWS Step Functions?

1 Answer 1

0

One approach is to invoke a Lambda function within the Step Function and coordinate between the Step Function and EventBridge.

Another idea is to separate the process into two Step Functions. This way, you can execute the second part of the tasks directly through an EventBridge event by setting the second Step Function as a target in the EventBridge rule.

This separation allows for better management and efficiency, ensuring the replication task only starts once the ReplicationInstance is active.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.