Tutorial Deployment AWS
Hi Mukesh, I am totally new on AWS and i know a lot about Azure. I created an AWS account. What are the next steps i must do to be able to let terraform publish the fullstackhero to AWS ?
Hi Wim, welcome aboard! Good news: there's a full step-by-step tutorial that takes you from "nothing installed" to a running deployment:
https://fullstackhero.net/docs/deployment/aws-terraform/
Since you already know Azure, here's a quick translation of what the Terraform stands up:
| AWS (what the kit uses) | Azure equivalent |
|---|---|
| ECS Fargate (API container) | Azure Container Apps |
| ALB + WAF | Application Gateway + WAF |
| RDS PostgreSQL | Azure Database for PostgreSQL |
| ElastiCache Redis | Azure Cache for Redis |
| S3 + CloudFront (the two React SPAs) | Blob Storage static site + Front Door/CDN |
| Secrets Manager | Key Vault |
| IAM user / SSO role | Service principal / Entra ID |
Your next steps, in order
- Create an IAM principal with credentials. In the AWS console go to IAM → create a user (or set up IAM Identity Center / SSO if you prefer). For a first run, attaching the
AdministratorAccesspolicy is the simplest — you can scope it down later. Generate an access key. - Install and configure the AWS CLI v2, then run
aws configureand paste in that access key + a default region (e.g.us-east-1). Verify withaws sts get-caller-identity— if that returns your account ID, auth is working. - Install the tooling: Terraform >= 1.15.4 (this is a hard floor — older versions are rejected at
init), Node 20+, andjq(only needed for the bash script; the PowerShell one doesn't need it). - Bootstrap the Terraform state bucket (one-time per account):
cd deploy/terraform/bootstrap terraform init terraform apply -var bucket_name=<your-unique-name>-fsh-tfstate - Configure your environment under
deploy/terraform/apps/starter/envs/dev/us-east-1/: put the state bucket name intobackend.hcl, and editterraform.tfvars— at minimum the S3 bucket names, which must be globally unique across all of AWS. - Run the one-command deploy from
deploy/terraform/apps/starter/:./deploy.ps1 -Environment dev -Region us-east-1 # Windows
This provisions everything, runs the DB migrator as a one-shot ECS task (with seeding in dev), builds both React apps, publishes them to S3/CloudFront, and prints the URLs at the end. You don't need to build any containers yourself — it pulls the public GHCR images by default../deploy.sh dev us-east-1 # macOS/Linux
One thing to watch as an AWS newcomer: cost 💸
Unlike an idle Azure dev subscription, this stack runs a NAT gateway, RDS, ElastiCache, and Fargate 24/7 — even the dev sizing costs real money per hour. When you're done experimenting, tear it down with ./destroy.ps1 (or terraform destroy) so you're not billed overnight.
Everything above is covered in more detail in the tutorial, including the exact tfvars values and troubleshooting. If you get stuck at any specific step, paste the error here and I'll help you through it.
Hi Mukesh,
I am trying to use the deploy script and i am stuck on this error:
rds_endpoint = "dev-eu-west-1-postgres.cx02aeyuku1e.eu-west-1.rds.amazonaws.com"
rds_port = 5432
rds_secret_arn = "arn:aws:secretsmanager:eu-west-1:997916277888:secret:rds!db-a2f061c8-4444-44b0-a633-43cb6b367843-W5cKPq"
redis_connection_string =
-
Die "migrator ($label) exited $exitCode — $reason (logs: CloudWat ... -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
- FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Die