All Projects → awslabs → Serverless Photo Recognition

awslabs / Serverless Photo Recognition

Licence: apache-2.0
A collection of 3 lambda functions that are invoked by Amazon S3 or Amazon API Gateway to analyze uploaded images with Amazon Rekognition and save picture labels to ElasticSearch (written in Kotlin)

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Serverless Photo Recognition

Aws Serverless Auth Reference App
Serverless reference app and backend API, showcasing authentication and authorization patterns using Amazon Cognito, Amazon API Gateway, AWS Lambda, and AWS IAM.
Stars: ✭ 724 (+109.86%)
Mutual labels:  aws, serverless, aws-lambda, aws-apigateway, amazon-cognito
Serverless Docker Image Resize
Simple serverless image resize on-the-fly - Deploy with one command - Built with AWS Lambda and S3
Stars: ✭ 114 (-66.96%)
Mutual labels:  aws, serverless, aws-lambda, aws-s3
Lambcycle
🐑🛵 A declarative lambda middleware with life cycle hooks 🐑🛵
Stars: ✭ 88 (-74.49%)
Mutual labels:  aws, serverless, aws-lambda, lambda-functions
Aws Lambda List
A list of hopefully useful AWS lambdas and lambda-related resources.
Stars: ✭ 130 (-62.32%)
Mutual labels:  aws, serverless, aws-lambda, lambda-functions
Aws Lambda Typescript
This sample uses the Serverless Application Framework to implement an AWS Lambda function in TypeScript, deploy it via CloudFormation, publish it through API Gateway to a custom domain registered on Route53, and document it with Swagger.
Stars: ✭ 228 (-33.91%)
Mutual labels:  aws, serverless, aws-lambda, aws-apigateway
Aws Github Actions
Deploy 🚀 to AWS ☁️ with GitHub Actions!
Stars: ✭ 70 (-79.71%)
Mutual labels:  aws, serverless, aws-lambda, aws-s3
Architect
The simplest, most powerful way to build serverless applications
Stars: ✭ 1,925 (+457.97%)
Mutual labels:  aws, serverless, aws-lambda, aws-apigateway
Aws Lambda Dotnet
Libraries, samples and tools to help .NET Core developers develop AWS Lambda functions.
Stars: ✭ 945 (+173.91%)
Mutual labels:  aws, serverless, aws-lambda, aws-apigateway
Serverless Sam
Serverless framework plugin to export AWS SAM templates for a service
Stars: ✭ 143 (-58.55%)
Mutual labels:  aws, serverless, aws-lambda, aws-apigateway
Awsmobile Cli
CLI experience for Frontend developers in the JavaScript ecosystem.
Stars: ✭ 147 (-57.39%)
Mutual labels:  aws, aws-lambda, aws-s3, aws-apigateway
Serverless Plugin Canary Deployments
Canary deployments for your Serverless application
Stars: ✭ 283 (-17.97%)
Mutual labels:  aws, serverless, aws-lambda, lambda-functions
Serverless Es Logs
A Serverless plugin to transport logs to ElasticSearch
Stars: ✭ 51 (-85.22%)
Mutual labels:  aws, serverless, aws-lambda, elasticsearch
Amplify Js
A declarative JavaScript library for application development using cloud services.
Stars: ✭ 8,539 (+2375.07%)
Mutual labels:  aws, aws-s3, aws-apigateway, amazon-cognito
Aws Serverless Airline Booking
Airline Booking is a sample web application that provides Flight Search, Flight Payment, Flight Booking and Loyalty points including end-to-end testing, GraphQL and CI/CD. This web application was the theme of Build on Serverless Season 2 on AWS Twitch running from April 24th until end of August in 2019.
Stars: ✭ 1,290 (+273.91%)
Mutual labels:  aws, serverless, aws-lambda, lambda-functions
Chalice
Python Serverless Microframework for AWS
Stars: ✭ 8,513 (+2367.54%)
Mutual labels:  aws, serverless, aws-lambda, aws-apigateway
Lambda Toolkit
*DO NOT USE* - This project was done during my initial python and lambda's studies. I would recommend you the `serverless framework`.
Stars: ✭ 114 (-66.96%)
Mutual labels:  aws, serverless, aws-lambda, lambda-functions
Serverless Aws Alias
Alias support for Serverless 1.x
Stars: ✭ 171 (-50.43%)
Mutual labels:  aws, serverless, aws-lambda, lambda-functions
Cloudmagick
CloudMagick is a serverless application which provides a dynamic image transformation like the small light module of apache2
Stars: ✭ 11 (-96.81%)
Mutual labels:  aws, serverless, aws-lambda, aws-apigateway
Shadowreader
Serverless load testing for replaying website traffic. Powered by AWS Lambda.
Stars: ✭ 138 (-60%)
Mutual labels:  aws, serverless, aws-lambda, aws-s3
Archive aws Lambda Go Net
Network I/O interface for AWS Lambda Go runtime.
Stars: ✭ 151 (-56.23%)
Mutual labels:  aws, serverless, aws-lambda, aws-apigateway

Author: Vladimir Budilov

You can watch the video explanation of this architecture here

Serverless Photo Recognition

What is it?

A collection of 3 lambda functions that are invoked by Amazon S3, Amazon API Gateway, and directly (RESTful calls) to analyze uploaded images in S3 with Amazon Rekognition and save picture metadata to ElasticSearch

Before you start

  1. When you run the setup script your account will start incurring AWS infrastructure costs.
  2. This project was written a while back, before CloudFormation was available for all of the services in use, hence my use of the AWS CLI. If I were to write this today I would use CDK to create all of the resources (from IAM roles to ElasticSearch service). Check out this project for a reference.

The Architecture

Adding an image

Adding an image

Removing an image

Remove an image

Searching images

Search images

Tech Stack

Required Tools

AWS Services Involved In This Architecture

AWS Setup

Before we start, let’s make sure that your working environment is setup to run the script. Here's what you'll need:

  • An AWS Account with a default VPC
  • Java 8
  • The latest AWS CLI (Tested with aws-cli/1.11.29 Python/2.7.12)
  • Linux or Mac OS to run the setup script (the setup script won't work on Windows)

The following command will setup all of the needed resources, as well as print out the sample command that you can run to test your configuration:

# Clone it from github
git clone --depth 1 https://github.com/awslabs/serverless-photo-recognition.git
# Run the installation script
cd serverless-photo-recognition/setup
./setupEnvironment.sh

Running the installation script will modify the /src/main/kotlin/com/budilov/Properties.kt file with the newly-generated values. If you need to rerun the script, just revert the changes (otherwise the script will fail).

It will also create a deletion script under the tmp directory

At the end of the script, you'll see 3 commands (customized with your environment variables) that you can run to test out your configuration. Run the commands and see the functionality in action (copying and running the below commands will fail...use the ones that the script has generated):

-> Upload a picture
--------------------
aws s3 cp new-york.jpg s3://rekognition-20170307160632/usercontent/us-east-1:c61126b8-7f7b-48e8-8534-4c3a21dfef4e/

-> Sample search command
You might need to pipe the output to 'native2ascii -encoding UTF-8 -reverse' if you
want to copy and paste the signed url in the browser since curl encodes url output
-------------------------
curl -X POST -H "Authorization: $(aws cognito-idp admin-initiate-auth  --user-pool-id us-east-1_AEzYFK4mc --client-id 734810igh3bfdj4n33tfm9o08s --cli-input-json file:///tmp/authflow.json --query AuthenticationResult.IdToken --output text)" -H "search-key: building" -H "Cache-Control: no-cache" "https://57zt8cwa6j.execute-api.us-east-1.amazonaws.com/prod/picture/search/"

-> Remove the picture
----------------------
aws s3 rm s3://rekognition-20170307160632/usercontent/us-east-1:c61126b8-7f7b-48e8-8534-4c3a21dfef4e/new-york.jpg
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].