AWS CLI Configuration
Configure the AWS CLI with your credentials to enable Terraform and Docker to interact with AWS services.Configure AWS Credentials
Run the AWS configuration wizard:1
AWS Access Key ID
Enter the Access Key ID from your IAM user:
2
AWS Secret Access Key
Enter the Secret Access Key from your IAM user:
3
Default Region
Choose your preferred AWS region (us-east-1 recommended):
4
Output Format
Set output format to JSON:
Verify AWS Access
Confirm your AWS credentials are correctly configured:If you see your account information, AWS CLI is properly configured!
AWS Region Selection
Choose the AWS region closest to your users for optimal performance.Recommended Regions
This guide uses
us-east-1 in examples. Replace with your chosen region throughout the deployment.VPC and Subnet Configuration
ECS Fargate requires a VPC and at least 2 subnets in different availability zones for high availability.Option 1: Use Default VPC (Recommended)
Most AWS accounts have a default VPC that works out of the box.Get Default VPC ID
Save this VPC ID - you’ll need it for Terraform configuration.
Get Default Subnets
Retrieve all subnets in your default VPC:Select at least 2 subnets from different availability zones (e.g., us-east-1a and us-east-1b).
Option 2: Create Custom VPC
Advanced: Create a new VPC for the project
Advanced: Create a new VPC for the project
Network Configuration Summary
Before proceeding, ensure you have identified:VPC Information
VPC Information
- VPC ID:
vpc-xxxxxxxxxxxxx - Region:
us-east-1(or your chosen region) - Internet Access: Enabled (via Internet Gateway)
Subnet Information
Subnet Information
- Subnet 1 ID:
subnet-xxxxxxxxxxxxx - Subnet 1 AZ:
us-east-1a - Subnet 2 ID:
subnet-yyyyyyyyyyyyy - Subnet 2 AZ:
us-east-1b
DNS Resolution
DNS Resolution
- DNS Hostnames: Enabled
- DNS Resolution: Enabled
Security Considerations
IAM Permissions
The IAM user or role running Terraform needs these permissions:Required IAM Policies
Required IAM Policies
- EC2: Full access (VPC, subnets, security groups)
- ECS: Full access (clusters, services, task definitions)
- ECR: Full access (repositories, images)
- IAM: Create/manage roles and policies
- Application Load Balancer: Full access
- CloudWatch: Logs and metrics
- Lambda: Full access
- EventBridge: Full access
- ACM: Certificate management
- S3: Bucket creation and object storage
AdministratorAccess simplifies setup.AWS Service Limits
Check your AWS account limits for key services:Default limits are typically sufficient. Request increases if you plan to run multiple environments.
Testing Network Connectivity
Verify Subnet Internet Access
Ensure your subnets can reach the internet (required for ECS to pull Docker images):igw-xxxxx):
Next Steps
Database & Storage Setup
Configure Supabase database and Cloudflare R2 storage