React Website AWS CDK
A Python CDK stack that serves a React single-page app from a private S3 bucket through CloudFront, on your own domain with an existing ACM certificate.

About
react-website-aws-cdk is a small AWS CDK v2 app written in Python. It defines one stack that hosts a built React single-page app: a private S3 bucket holds the files and a CloudFront distribution serves them over HTTPS on your own domain. The bucket blocks every form of public access and is encrypted with S3-managed keys. CloudFront reads it through an origin access identity, so the distribution is the only way in. The stack does not create the certificate. You issue it in AWS Certificate Manager first, in us-east-1 because CloudFront only accepts certificates from that region, and pass its ARN in.
How it works
app.py loads a .env file, builds the stack name from the application and environment values, and creates ReactWebsiteStack. The stack creates the bucket, an origin access identity with read access to it, and a CloudFront distribution in front of it. The distribution uses the imported certificate, answers on the domain from the .env file, and uses price class All, so every CloudFront edge location serves it.
The deploy returns two CloudFormation outputs. The bucket name is where the React build goes. The CloudFront domain name is the target for your DNS record. Uploading the build is a separate step, for example aws s3 sync on the build folder followed by a CloudFront invalidation.
Limits worth knowing
The stack does not create DNS records. Point the domain at the distribution yourself, with a Route 53 alias record or a CNAME at another DNS provider. It also does not upload the site, so a CI job has to sync the build and invalidate the cache after each release.
It uses an origin access identity, which AWS now treats as legacy. New distributions should use origin access control, which also works with SSE-KMS encrypted buckets. The repository's unit test is still the CDK sample placeholder and asserts nothing, and the code pins aws-cdk-lib 2.57.0, so expect to update dependencies before using it today.