This CDK project deploys an AppSync API, Amazon DynamoDB tables, and an Amazon Cognito User Pool configured to create the infrastructure for a chat application. It is paired with a React front-end for a full-stack serverless project.
- Clone the repo
git clone https://github.com/full-stack-serverless/cdk-appsync-chat.git
-
Change into the
cdk-appsync-chat
directory -
Install dependencies in main folder:
npm install
# or
yarn
- Deploy to AWS
cdk deploy
Once the project has been deployed, you'll be given the resources needed to configure the client-side React application.
Outputs:
CdkAppsyncChatStack.UserPoolClientId = 4tojuqrgrctupmj28812nmgi2t
CdkAppsyncChatStack.UserPoolId = us-east-1_vS2Qv9tob
CdkAppsyncChatStack.GraphQLAPIURL = https://w6eiaujspbbcvovbqzn2w4zxhu.appsync-api.us-east-1.amazonaws.com/graphql
- Clone the client application
git clone https://github.com/full-stack-serverless/chat-app.git
- Change into the client directory and install dependencies:
cd chat-app
npm install
# or
yarn
-
Open src/aws-exports-example.js and update with the outputs from CDK.
-
Rename aws-exports-example.js to aws-exports.js.
-
Run the app
npm start