Amazon Web Services
Learn about deployments of the next-enterprise boilerplate applications directly to the AWS Cloud
AWS provider features overview
- Automated provisioning of AWS infrastructure
- Scalable & secure setup using:
- VPC
- Elastic Container Service (ECS)
- Elastic Container Registry (ECR)
- Application Load Balancer
- S3 + CloudFront for static assets
- AWS WAF (Web Application Firewall)
- Redis Cluster for caching
- CI/CD (GitHub Actions) ready
- Deploying the
next-enterprise
application - Deploying the Storybook
- Destroying the stack
- Deploying the
Getting started
Pre-installation checks
Make sure you have the enterprise-cli
installed. Read more here
Pre-run environment checks
Ensure your current working directory is an actual next-enterprise
boilerplate, alternatively, read more about next-enterprise
installation process here
GitHub Auth
Confirm that you're correctly authenticated with GitHub CLI. You can quickly check this by running:
If you're not authenticated, you'll be prompted to do so by running:
and following the instructions.
Continue interaction with the CLI
Follow the instructions displayed in the terminal!. The result of successful prepare
command should be freshly set up next-enterprise
-based repository with all the CI/CD configuration and IaC (Terraform)
Actual deployment
Newly created GitHub repository -> Actions -> select one of the workflows (e.g. Deploy Stack) -> Run Workflow
Going forward - production environment
The enterprise-cli
installs a pre-configured development environment. To create a production environment, follow these steps:
-
Duplicate the Terraform Configuration
- Copy the contents of the
terraform/dev
folder. - Rename the new folder to
terraform/prod
.
- Copy the contents of the
-
Update Configuration References
- Replace all occurrences of
dev
withprod
. - Replace all occurrences of
development
withproduction
.
- Replace all occurrences of
-
Create the Production Environment in GitHub
- Go to your repository:
Settings > Environments > New Environment - Name it
production
.
- Go to your repository:
-
Add Production Secrets Under Settings > Secrets and variables > Actions, and select the
production
environment, add the following secrets for the production AWS tenant:AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
-
Add Production Environment Variables
Add the following environment variables to the
production
environment: -
Duplicate CI/CD Pipelines
- Copy the GitHub Actions workflows related to infrastructure and Storybook deployment.
- Update:
- Workflow names and environment references to production
- Any file paths or settings that reference
dev
ordevelopment
This ensures the production environment is isolated and configured consistently with your development setup.