0

Is there any way I could watch for any AWS Personalize status change?

For example I have a Lambda function creating a Dataset Import Job, and I would like to trigger another action once this job is finished but I cannot find a way to "listen" to this event or to "trigger" a notification once it's ready.

I checked for an AWS CloudWatch event but it seems that it's not supporting AWS Personalize:

enter image description here

Any idea how I could achieve this? Thank you

Pingolin
  • 3,161
  • 6
  • 25
  • 40
  • Why don't you trigger the next action from inside the Lambda function once the job is finished? – Lejdi Prifti Oct 07 '21 at 09:07
  • I don't think there is a way to listen to the status change unless checking the status in a loop (which is what I am doing right now). Also those tasks can take quite some time :/ – Pingolin Oct 07 '21 at 09:08
  • Why not check the status at the end of the import job? You store the information before the job and check after the job, without polling all the time – Lejdi Prifti Oct 07 '21 at 09:12
  • How do I know when the import job is finished? – Pingolin Oct 07 '21 at 09:51

1 Answers1

0

Personalize currently does not generate events when asynchronous processes such as dataset imports, solution version creation, and campaign updates complete. Instead, you can poll the Personalize API and check the status for asynchronous jobs. For import jobs, the DescribeDatasetImportJob API can be called to check the status for a particular job. When the job's status changes to ACTIVE, the import is complete.

It's common to use AWS Step Functions with Personalize to encapsulate this polling process and to chain together multiple steps (import, train, create/update campaign).

The Maintaining Personalized Experiences with ML solution (which uses Step Functions internally) can be used to make managing Personalize much easier.

James J
  • 621
  • 3
  • 6