Create an AWS Step Functions workflow to integrate with Amazon Comprehend.
This CDK application deploys a Step Functions workflow, that takes in a payload and sends it to the sentiment analysis API of the Amazon Comprehend service.
The output of the Sentiment Analysis API returns the overall sentiment ((Positive, Negative, Neutral, or Mixed) of the text we have provided. This pattern exactly shows how we can use AWS Step Functions SDK integrations to call any of the over two hundred AWS services directly from your state machine. The application contains the minimum IAM resources required to run the workflow.