Skip to content

Latest commit

 

History

History
 
 

galleria

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

galleria

Serverless photo gallery

Demo: https://galleria.evanchiu.com

Deploy with CloudFormation

Prerequisites: Node.js and AWS CLI installed

  • Create an AWS Account and IAM User with the AdministratorAccess AWS Managed Policy
  • Run aws configure to put store that user's credentials in ~/.aws/credentials
  • Create an S3 bucket for storing the Lambda code and store its name in a shell variable with:
    • export CODE_BUCKET=bucket
  • Create an S3 bucket from which to read the thumbnails, store its name in shell variable:
    • export THUMB_BUCKET=bucket
  • Create an S3 bucket from which to read the full size images, store its name in shell variable:
    • export FULL_BUCKET=bucket
  • Npm install:
    • npm install
  • Build:
    • npm run build
  • Upload package to S3, transform the CloudFormation template:
    • npm run package
  • Deploy to CloudFormation:
    • npm run deploy

Deploy from the AWS Serverless Application Repository

  • Create the code, thumnail, and full size buckets
  • Hit "Deploy" from the application page

Use

  • Go to API Gateway in the AWS Console to find the invoke URL and open it in your browser.
  • Optionally, you can set up a custom domain

Links

License

© 2017-2019 Evan Chiu. This project is available under the terms of the MIT license.