This CDK project deploys an Amazon Cognito User Pool configured to create the infrasstructure for a basic application for user authentication. It is paired with a React front-end for a full-stack serverless project.
- Clone the repo
git clone [email protected]:full-stack-serverless/cdk-authentication.git
-
Change into the
cdk-authentication
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 = your_userpool_client_id
CdkAppsyncChatStack.UserPoolId = us-east-1_your_userpool_id
- Clone the client application
git clone https://github.com/full-stack-serverless/react-custom-authentication-aws.git
- Change into the client directory and install dependencies:
cd react-custom-authentication-aws
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