Reputation: 179
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.
Upvotes: 1
Views: 712
Reputation: 8887
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.
Upvotes: 3
Reputation: 3281
I'm not sure how creating a lambda function would help. Are you trying to view the analysis job's logging / print contents?
Perhaps you could maybe create a script that checks every so often for the output.tar.gz file in s3, to know the job is finished.
Upvotes: 2