AWS Step Functions to Amazon Comprehend

Step Functions → Amazon Comprehend

Create an AWS Step Functions workflow to integrate with Amazon Comprehend.

Start the Step Functions Express Workflow using the start-sync-execution API command with a message string in English for sentiment analysis in the input payload.
The Express Workflow invokes Amazon Comprehend, which returns the sentiment of the input text.
If the integration works, the sentiment analysis is returned in Step Function's execution results within a output object.
If the integration fails, the Step Functions workflow will retry up to 5 times before exiting with a status: FAILED response.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/sfn-comprehend-sam

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Biswanath Mukherjee

Biswanath Mukherjee

Sr. Solutions Architect working at AWS India.

Follow on LinkedIn