This is a demo website using Serverless architecture that allow you to upload photos from your camera/disk to an S3 bucket and trigger a backend processing that will extract tags from the photo, by using Amazon Rekognition service.
In order to run this website you'll need an AWS Account with access to create AWS IAM, S3, CloudFront, DynamoDB, Lambda, API Gateway, Rekognition and Cognito resources.
Your account credentials should be added to your local environment. Run aws configure
to configure your account.
This demo is using the Serverless Framework for application management and deployment. Please refer to the Quick Start page for installation details.
This is a plugin to sync local directories and S3 prefixes for Serverless Framework. In this demo it is being used for syncing the static website code (under /static-site) to S3.
Run npm install
in your Serverless project.
$ npm install --save serverless-s3-sync
Each time you deploy this app to AWS your AWS settings and services will be changed. You should manage those parameters in /static-site/js/config.js.
Please make sure you provide the next parameters before deploying you app:
AWS.config.region
AWSPoolID
apiURL
In addition to /static-site/js/js.config
you will have to generate an SSL key using AWS Certificate Manager (ACM) and provide the resource name (ARN) in serverless.yml
. Search /serverless.yml for AcmCertificateArn
and update to the ARN of your certificate.
To customize your application and make it yours, please update staticSiteName
to the domain you would like to use for your app. This domain is needed to create your SSL certificate and CloudFront distribution.
You can manage your DNS record in Amazon Route53 but this is out of scope of this project.
To deploy your application run
$ serverless deploy
This will create all needed services to run the demo app. The first deployment can take a lot of time (~30 min) due to CloudFormation distribution creation. After your deployment is done, you can access the app at https://[staticSiteName]
.