event of datasync task state change not working

0

I have a datasync task which is triggered by lambda2. This task is used to copy s3 bucket data to on prem smb share. I have an event bridge rule with a pattern to match the task status change event having state as AVAILABLE. If it is AVAILABLE, and event matches, it triggers lambda1 which in turns call lambda2, which finally start the task again. My problem is, this flow works fine once, but when all data are copied and the status comes back to AVAILABLE state, it does not trigger lambda1. I am totally clueless and do not know if running to available state change is even generating any event to match the pattern or not. I have added an additional target as cloudwatch log group but it logs only matched event and hence it does not logs the last AVAILABLE event. What should I do to capture the any event generated by the task to compare my pattern if at all it is not matching. Does aws has option to capture unmatched event for a resource so that i can handle it? Is there any work around to that? please help

1 Answer
0

you can monitor task status with eventbridge. Datasync provides a skd to check the status of task .

describeAgent(params = {}, callback) ⇒ AWS.Request Returns metadata about an DataSync agent, such as its name, endpoint type, and status.

checkout below link ,shoudl be helpful.

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DataSync.html https://docs.aws.amazon.com/datasync/latest/userguide/events.html

Sachin
answered 6 months ago
profile picture
EXPERT
reviewed 23 days ago
  • Thanks. It seems the resources in the pattern is not matching with the event generated. Tried everything (content based filtering, wild card etc.) to match the event but nothing seems working.

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.

Guidelines for Answering Questions