https://github.com/guysnacho/ssg-s3
Welcome to the Black Belt AWS Storefront Initiative. Eventually a zero-hero course for getting a Next.js site from static deploys into S3 to a Fargate hosted storefront.
https://github.com/guysnacho/ssg-s3
aws aws-cloudfront aws-ec2 aws-s3 githib-actions terraform
Last synced: 3 months ago
JSON representation
Welcome to the Black Belt AWS Storefront Initiative. Eventually a zero-hero course for getting a Next.js site from static deploys into S3 to a Fargate hosted storefront.
- Host: GitHub
- URL: https://github.com/guysnacho/ssg-s3
- Owner: Guysnacho
- Created: 2024-07-14T08:12:40.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-03T14:41:48.000Z (about 1 year ago)
- Last Synced: 2025-10-22T09:25:22.617Z (8 months ago)
- Topics: aws, aws-cloudfront, aws-ec2, aws-s3, githib-actions, terraform
- Language: HCL
- Homepage: https://blackbelt-init.notion.site
- Size: 609 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Static Site Generation (SSG) meets AWS S3
[](https://github.com/Guysnacho/ssg-s3/actions/workflows/main.yml)
This repo is to help me actually build this AWS course. ~Shouldn't be too hard~ This has and will continue to be a learning experience. Follow along, check the releases, make a fork, go crazy, but check the [Project Home](https://blackbelt-init.notion.site/) for more details. ✨
## Project Layout
- Terraform Package
- Web package
- Github workflows
- Applies terraform infra changes after commits to main branch
- Bundles our app into static site files and a Docker image
- Deploys uploads static site to S3 to be served by CloudFront
- Uploads our Docker Image to the run context
- Updates an SSM parameter's value to this artifact's URL
- Important note - by default, an artifact upload will only live for 90 days. Keep this in mind if you want to roll changes back to a given date past that.
- Fixtures - Useful references and SQL scripts for seeding your database.
### Local Setup
1. Signup for [Terraform HCP](https://app.terraform.io/public/signup/account)
2. Install [tf cli](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)
3. Install [aws cli](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
4. Build starter [Next](https://nextjs.org/) site
1. [Configure ssg export](https://nextjs.org/docs/pages/building-your-application/deploying/static-exports)
5. Setup bucket, cloudfront, provider, outputs, whatever else locally
6. Add GitHub action secrets
7. Test workflows
8. Sip water