AWS Lambda to Amazon Rekognition

AWS Lambda → Amazon Rekognition

Create a Lambda function that uses Amazon Rekognition.

This pattern uses an EventBridge event rule to trigger a Lambda Function. The Lambda runs an image analysis on the image specified in the incoming event.
Lambda uses Amazon Rekognition to run an analysis on that image. The image analysis used for demo is text recognition.

< 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/lambda-rekognition-rust

Deploy

sam deploy --guided --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM


Testing

Use the AWS CLI to invoke the Lambda function. The function name is in the outputs of the AWS SAM deployment (the key is QueuePublisherFunction):
1. Invoke the Lambda function to publish a message to the SQS queue: aws lambda invoke --function-name ENTER_YOUR_FUNCTION_NAME outfile.txt.
2. Retrieve the message from the SQS queue, using the queue URL from the AWS SAM deployment outputs: aws sqs receive-message --queue-url ENTER_YOUR_QUEUE_URL

Cleanup

See the GitHub repo for testing instructions.

Created by:

Daniele Frasca

Daniele Frasca

I am Daniele Frasca serverless enthusiast. I build and architect serverless applications at scale.