amazon-web-servicesamazon-s3aws-lambdaamazon-comprehend

AWS: How to know when asynchronous comprehend job finishes?


Is there a way to know when a comprehend asynchronous job finishes?

For example:

I need to read the output of a sentiment analysis job when it finishes, but not by blocking the program and waiting. I think there should be a way to trigger a lambda function or something similar.

Note that when the job finishes it writes the results to s3_bucket in a file called output.tar.gz

Thanks.


Solution

  • You can trigger a lambda function when the file is created.

    Configuring Amazon S3 Event Notifications has general information on triggering events from S3.

    Configuring Notifications with Object Key Name Filtering shows how to use the filtering to match an object key.