https://github.com/mikaeelkhalid/react-deployment-aws-cdk
This repository contains an AWS CDK stack for deploying a React application. It uses the AWS Cloud Development Kit (CDK) to create an S3 bucket for storing the application files, and a CloudFront distribution for serving the files to the public.
https://github.com/mikaeelkhalid/react-deployment-aws-cdk
aws aws-cdk cloudfront iac reactjs typescript
Last synced: 8 months ago
JSON representation
This repository contains an AWS CDK stack for deploying a React application. It uses the AWS Cloud Development Kit (CDK) to create an S3 bucket for storing the application files, and a CloudFront distribution for serving the files to the public.
- Host: GitHub
- URL: https://github.com/mikaeelkhalid/react-deployment-aws-cdk
- Owner: mikaeelkhalid
- Created: 2023-01-28T17:59:00.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-03T10:27:17.000Z (over 2 years ago)
- Last Synced: 2025-04-19T19:10:05.046Z (about 1 year ago)
- Topics: aws, aws-cdk, cloudfront, iac, reactjs, typescript
- Language: TypeScript
- Homepage:
- Size: 55.7 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Welcome to CDK React App Deployment [Typescript]
[](#)
This repository contains an AWS CDK stack for deploying a React application. It creates an S3 bucket for storing the application files and a CloudFront distribution for serving the files to the public.
This project has CI/CD and an improved version here: [react-deployment-cicd-aws-cdk](https://github.com/mikaeelkhalid/react-deployment-cicd-aws-cdk).
### Usage
To use this stack, you must have the AWS CDK CLI installed and configured on your machine.
1. Clone the repository: https://github.com/mikaeelkhalid/react-deployment-aws-cdk.git
2. Run `npm install` in the repository's root directory to install the necessary dependencies
3. Run `cdk deploy` to deploy the stack to your AWS account
4. Run `cdk destroy` to destroy & clean up resources.
### Stack Components
An S3 bucket named `react-deployment-bucket` is created for storing the application files. The bucket is configured as a website and sets to allow public read access.
A CloudFront distribution is created and configured to use the S3 bucket as its origin.
Outputs
1. `WebsiteURL`: The URL is hosted in the S3 bucket.
2. `CloudFrontDistributionDomainName`: The domain name of the CloudFront distribution.
This repo is part of the following blog post: https://blog.mikaeels.com/deploy-react-app-with-aws-cdk