Skip to content

Fully serverless CMS using AWS Appsync, Aurora Serverless, Serverless Framework and React

Notifications You must be signed in to change notification settings

yai333/AppsyncServerlessCMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless CMS

Concept proof prototype of serverless CMS using AWS Appsync, Aurora Serverless, Cognito, Serverless Framework and React

Alt text

Stack

  • Serverless Framework
  • AWS Appsync
  • AWS Cognito
  • AWS Aurora Serverless
  • AWS Lambda
  • React

File Structure

  • /nodejs - Backend
  • /Frontend - React frontend

Deploy backend appsync api

  • Change admin email, database name, database username database user password in nodejs/serverless.yml

    eg.

    custom:
      poolName: ${self:provider.stage}SimpleCMS
      dbName: "simpleCMS"
      dbUserName: "root"
      dbPassword: "Password"
      systemUserEmail: "dev@neami.app"
    
    
  • Set up AWS credentials

    $ aws configure
    
  • Install Serverless framework

    $ npm install -g serverless
    
  • Deploy

    $ sls deploy --stage dev
    

Set up Cognito and Appsync config

  • Setup Appsync endpoints and AWS config in frontend/src/config/config.js, replace YOUR_IDENTITY_POOLID, YOUR_COGNITO_POOLID, YOUR_COGNITO_POOLID_CLIENTID to related values
const AWSConfig = {
  amp: {
    region: "ap-southeast-2",
    identityPoolId: "YOUR_IDENTITY_POOLID",
    userPoolId: "YOUR_COGNITO_POOLID",
    userPoolWebClientId: "YOUR_COGNITO_POOLID_CLIENTID",
    mandatorySignIn: false
  },
  appSync: {
    url: "YOUR_APPSYNC_ENDPOINT",
    region: "ap-southeast-2"
  }
};
  • Install dependencies

    $ npm install
    
  • Run app

    $ npm start
    
  • Build app

    $ npm run build
    
  • Deploy app to AWS S3 bucket

    $ aws s3 cp build s3://YOUR_BUCKET_NAME
    

About

Fully serverless CMS using AWS Appsync, Aurora Serverless, Serverless Framework and React

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published