I wrote a library that helps you set up:
- An S3 bucket to host your SPA/SSG app.
- A CloudFront distribution configured for optimal caching and security.
- GitHub integration for automatic deployment via CodePipeline and CodeBuild.
- Redirects and rewrites using CloudFront Functions.
- Custom domain setup with SSL certificates and Route53 DNS records.
It's designed to make deploying front-end applications to AWS as straightforward as possible, using infrastructure-as-code with TypeScript.
As a front-end developer working with AWS, I found the process of setting up infrastructure for SPAs to be repetitive and time-consuming.
While AWS offers powerful tools like Amplify, configuring them correctly for best practices requires boilerplate code and careful attention to detail. CDK-SPA aims to streamline this process, allowing developers to focus on building their applications rather than managing infrastructure.
If you just need a React/Vue SPA deployed securely in 10 minutes, check out the repository.