This is a PoC Web Application for appa. It contains:
- Cognito User Auth Pool
- Amplify Web Stack
Dashboard Page | Analytics Page |
---|---|
Visit cdk.context.json
and update the following values:
{
"adminEmail": "enter the admin email address here",
"projectName": "appaWeb -- you can update or change this project name",
"deployWebStack": true,
"deployQuicksightStack": true,
"quicksightAccountId": "enter quicksight account id here",
"quicksightDashboard": "enter quicksight dashboard id here"
}
For a full summary or prerequisites visit AWS CDK Prerequisites. Please note that to use Quicksight Dashboard integration with this architecture you will need to manually create a Quicksight account and set up Quicksight dashboards using the Quicksight console.
Running this application requires node
, aws-cli
, and aws cdk
Visit nodejs for directions on installing node for your operating system
Visit AWS CLI to set up the AWS CLI for your environment
npm install -g aws-cdk
# if the above command gives you a permissions error
sudo npm install -g aws-cdk
aws configure
cdk deploy --all
The cdk.json
file tells the CDK Toolkit how to execute your app.
This application builds the following AWS CDK stacks:
- WebStack
- SharedResourcesStack
This stack deploys an AWS Amplify application, with a CodeCommit repository that triggers an automatic build and CodePipeline. The Amplify App will be hosted at a dev subdomain. Please note that this domain is ephemeral, so if you destroy the application and rebuild the url will change.
This Stack utilizes the AmplifyDeploy
CDK construct and integrates an AWS Cognito User Pool for authorization within the web application. Please note that to add new users you will need to retrieve the AWS Amplify Domain and URL from the AWS Amplify section of the AWS Console. To add new users please follow the instructions for creating Cognito user accounts as an administrator.
This stack deploys shared resources that are utilized across all stacks. This will currently include an AWS Cognito User Pool built from the CognitoAuth
CDK construct
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template