Cloudscape is an open source design system for the cloud. Cloudscape offers user interface guidelines, front-end components, design resources, and development tools for building intuitive, engaging, and inclusive user experiences at scale.
Vite.js is a modern, fast front-end build tool that significantly improves the developer experience when building web applications.
Verify that your environment satisfies the following prerequisites:
You have:
- An AWS account
AdministratorAccesspolicy granted to your AWS account (for production, we recommend restricting access as needed)- Both console and programmatic access
- NodeJS 20+ installed
- If you are using
nvmyou can run the following before proceeding -
nvm install 20 && nvm use 20
- If you are using
- AWS CLI installed and configured to use with your AWS account
- Typescript 3.8+ installed
- AWS CDK CLI installed
- Docker installed
- N.B.
buildxis also required. For Windows and macOSbuildxis included in Docker Desktop
- N.B.
If you'd like to use GitHub Codespaces to deploy the solution, you will need the following before proceeding:
- An AWS account
- An IAM User with:
AdministratorAccesspolicy granted to your user (for production, we recommend restricting access as needed)- Take note of
Access keyandSecret access key.
To get started, click on the button below.
Once in the Codespaces terminal, set up the AWS Credentials by running
aws configureAWS Access Key ID [None]: <the access key from the IAM user generated above>
AWS Secret Access Key [None]: <the secret access key from the IAM user generated above>
Default region name: <the region you plan to deploy the solution to>
Default output format: jsonYou are all set for deployment; you can now jump to deployment.
- Clone the repository
git clone https://github.com/aws-samples/cloudscape-examples- Move into the cloned repository
cd cloudscape-examples/fullstack-vite-cdk-cognito-auth3. Install the project dependencies by running this command
npm install- (Optional) Bootstrap AWS CDK on the target account and region
Note: This is required if you have never used AWS CDK on this account and region combination. (More information on CDK bootstrapping).
npx cdk bootstrap aws://{targetAccountId}/{targetRegion}You can now deploy by running:
npx cdk deployYou can view the progress of your CDK deployment in the CloudFormation console in the selected region.
- Once deployed, take note of the
UserInterfaceDomainNamethat use can use to access the app.
...
Outputs:
InfrastructureStack.UserInterfaceDomainName = https://dxxxxxxxxxxxxx.cloudfront.net
...- Create a user in Cognito to be able to access the app.
Before you can connect to the backend from the local machine, you should deploy the backend part and then download the aws-exports.json file with the configuration parameters from the website.
https://dxxxxxxxxxxxxx.cloudfront.net/aws-exports.json
Save aws-exports.json file to fullstack-vite-cdk-cognito-auth/user-interface/public folder.
- Move into the user interface folder
cd user-interface- Install the project dependencies by running:
npm install- To start the development server, run:
npm run devThis command will start a local development server at http://localhost:3000 (or a different port if 3000 is in use). The server will hot-reload if you make edits to any of the source files.



