TrickSumo / portfolio-generator

Portfolio generator using REACT, AUTH0 and AWS S3, CloudFront, Lambda, DynamoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

portfolio-generator

Portfolio generator using REACT, AUTH0 and AWS S3, CloudFront, Lambda, DynamoDB

LOCAL SETUP

  1. Create 3 AWS Lambda Functions with following Permissios (Content of functions is in AWS Lambda folder):-
  • cloudFront_cache_invalidator --> CreateInvalidation For CloudFront
  • porfolio_destroyer ----> S3 Full Write Access, DynamoDB Full Access
  • portfolio_creator ----> S3 Full Write Access, DynamoDB Full Access
  • portfolio_editor ----> DynamoDB Full Access
  • s3_signed_url ---------> S3 Full Access
  1. Update lamda function URL settings for all 3:-
Function URL Config=>

* Auth Tyep: NONE
* Confiure CORS: Enable
* Allow origin: *
* Expose Headers: access-control-allow-origin
* Allow headers: content-type
* Allowed Methods: GET, POST
  1. Update function URLs in .env file. Also get AUTH0 credentails and update it in .env file.
  1. Create S3 bucket and use OAI + Cloudfront to make it publicaly available. Also update bucket name and cloudfront distribution id in lambda functions

  2. Add below CORS policy in s3 bucket (Bucket >> Permissions >> Cross-origin resource sharing (CORS)):-

[ { "AllowedHeaders": [ "" ], "AllowedMethods": [ "PUT", "POST" ], "AllowedOrigins": [ "" ], "ExposeHeaders": [], "MaxAgeSeconds": 3000 } ]

  1. Create DynamoDB table with "email_hash" as partition key. Update database name in creator and destroyer functions.

  2. Install REACT dependecies and run

npm i
npm start 

About

Portfolio generator using REACT, AUTH0 and AWS S3, CloudFront, Lambda, DynamoDB


Languages

Language:JavaScript 67.4%Language:Python 23.4%Language:CSS 4.8%Language:HTML 3.5%Language:Shell 0.9%