Skip to content

SydneyDockerMeetupAWS/serverless-rekognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NoOps presentations

The source code for NoOps presentation in ASW SYD12.

Description

Dev environment

Env

Application architecture

App

Prerequisites

Rekognition collection

Since AWS Rekognition is not supported by AWS CloudFormation yet the collection should be created manually and passed to the template as a parameter:

aws rekognition create-collection --collection-id "noops-poc" --region us-west-2

S3 bucket

You need s3 bucket for temporary artifacts produced by aws cloudformation package command

aws s3api create-bucket --bucket noops-wip-pdx --region us-west-2

How to deploy

  • Get the code:
git clone https://github.com/SydneyDockerMeetupAWS/serverless-rekognition.git
  • Create lambda packages
aws cloudformation package --template-file template.yml  --s3-bucket noops-wip-pdx  --output-template-file out.yml
  • Deploy
aws cloudformation deploy --template-file out.yml --stack-name noopsPOC --capabilities CAPABILITY_IAM --region us-west-2

How to use

Add pictures to the collection

Prepare pictures and run using aws cli:

aws s3 cp ../pic/jolie3.jpg s3://<imagesbucket>/users/ --metadata Name=Angelina,Surname=Jolie,id=whoknows@example.com
  • where is the name of the bucket created by the CFN deploy above.
  • you can add as many pictures with the same id as you want

Search using image

  • Upload image on s3 (use the same bucket but the different prefix):
aws s3 cp ../pic/jolie4.jpg s3://<imagesbucket>/test/
  • invoke the Search Lambda function
 aws --region us-west-2 lambda invoke --function-name <noopsPOC-Search> --invocation-type RequestResponse --payload "{ \"bucket\": \"<imagesbucket>\", \"key\": \"test/jolie4.jpg\" }" test.txt

About

Sample Service using AWS Serverless and Rekognition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published