All commands assume you have proper aws credentials
A simple CDK & React example to deploy an AppSync API with Cognito as auth. Uses AWS Amplify schema directives to transform the graphql schema.
- Checkout the blog post
- Watch the demo/walkthrough
- Cognito User Pool
- Cognito Identity Pool
- AppSync API
- AppSync Resolvers
- AppSync Datasources
- DynamoDB Table
- IAM Roles
- Posts - uses @model and @auth directives to declare a simple dynamodb backed type
- Todos - uses @http directive to grab todos from https://jsonplaceholder.typicode.com/
- Clone The Repository
git clone https://github.com/kcwinner/cdk-appsync-react-demo.git
cd cdk-appsync-react-demo
- Initialize The Project
npx projen
- Test And Deploy
npm run test
npm run deploy
- Generate Exports && GraphQL Types
cd frontend
yarn run generate-exports
yarn run codegen
- Run the frontend locally
yarn run dev