Skip to content

tharindu-wj/serverless-photo-gallery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Photo Gallery App

Serverless web application built to showcase and share photos. Admin users can upload and others can see the photos. There is an option to share public photos as well.

Solution Diagram

alt text

Run Application

Prerequisites

Automated Scripts

# Build lambdas and frontend locally
npm run build

# Package Cloudformation resources
npm run package

# Deploy resources to AWS
npm run deploy

Manual Tasks

Please follow below steps manually since those are yet to be implemented

  • Grant API Gateway permission to invoke Lambda function
  • Copy output CognitoSignupURL to index.html a tag with id #cognitoSignupUrl
  • Copy output HttpApiEndpoint to /frontend/src/config baseUrl
  • Run npm run build from the root directory
  • Upload /frontend index.html, error.html, and dist/ to static site S3 bucket
  • Create a user with username john in Cognito user pool
  • Run the front end and login using above credentials Note: Logout feature yet to be implemented. So delete the local storage cognitoToken manually to logout

Improvements to be done

  • Role base authentication for admins and normal users
  • Proper script to build lambdas and frontend
  • Create API gateway lambdas event sources by cloudformation
  • Automate uploading frontend files to static S3 bucket
  • Frontend UI, folder structure and JS codes
  • Lambda error handling, responses and logs
  • Should not get S3 signed url every time we send a get photos request. Generated signed url can be reuse till it expires
  • Use DynamoDB queries instead of scan

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published