Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

AWS Lambda to Amazon Comprehend using REST API

Created with SnapAmazon API GatewayAWS LambdaAmazon Comprehend

REST API backed by a Lambda function that invokes the Comprehend DetectSentiment API.

This sample project deploys an Amazon API Gateway REST API with an AWS Lambda integration.
The Lambda function is written in Python, calls the Amazon Comprehend DetectSentiment API, and returns a response containing the detected sentiment.

< Back to all patterns


GitHub icon Visit the GitHub repo for this pattern.

Download

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

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Pascal Vogel

Presented by Pascal Vogel

Pascal Vogel is a Solutions Architect at Amazon Web Services (AWS).

Diana Cheng

Presented by Diana Cheng

Diana Cheng is a Senior Solutions Architect at Amazon Web Services (AWS).