[{"data":1,"prerenderedAt":67},["ShallowReactive",2],{"pattern-lambda-rekognition":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":11,"deploy":13,"description":16,"extension":17,"framework":18,"gitHub":19,"highlight":6,"introBox":28,"language":33,"level":34,"meta":35,"patternArch":36,"resources":49,"s3URL":6,"services":58,"stem":59,"testing":60,"videoId":27,"__hash__":66},"patterns\u002Fpatterns\u002Flambda-rekognition.json","AWS Lambda to Amazon Rekognition",null,{"headline":8,"text":9},"Cleanup",[10],"See the GitHub repo for testing instructions.",[12],"content\u002Fcontributors\u002Fjyoti-rathi.json",{"text":14},[15],"sam deploy --guided --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM","Create a Lambda function that uses Amazon Rekognition.","json","AWS SAM",{"template":20,"payloads":25},{"projectFolder":21,"repoURL":22,"templateURL":23,"templateFile":24},"lambda-rekognition","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Flambda-rekognition","serverless-patterns\u002Flambda-rekognition","template.yaml",[26],{"headline":27,"payloadURL":27},"",{"headline":29,"text":30,"test":27},"How it works",[31,32],"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.","Node.js","100",{},{"icon1":37,"icon2":42,"line1":46},{"x":38,"y":39,"service":40,"label":41},20,50,"lambda","AWS Lambda",{"x":43,"y":39,"service":44,"label":45},80,"rekognition","Amazon Rekognition",{"from":47,"to":48,"label":27},"icon1","icon2",{"headline":50,"bullets":51},"Additional resources",[52,55],{"text":53,"link":54},"Creating a serverless face blurring service for photos in Amazon S3","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fcreating-a-serverless-face-blurring-service-for-photos-in-amazon-s3\u002F",{"text":56,"link":57},"Using Amazon Rekognition in web apps","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fhappy-path",{"from":40,"to":44},"patterns\u002Flambda-rekognition",{"headline":61,"text":62},"Testing",[63,64,65],"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: \u003Ccode>aws lambda invoke --function-name ENTER_YOUR_FUNCTION_NAME outfile.txt\u003C\u002Fcode>.","2. Retrieve the message from the SQS queue, using the queue URL from the AWS SAM deployment outputs: \u003Ccode>aws sqs receive-message --queue-url ENTER_YOUR_QUEUE_URL\u003C\u002Fcode>","V24TtLnsaup3dSYm9qOZfVYFPP1RiGOvbkB9ndVkbJw",1778846886468]