Skip to main content

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:
You’ll be prompted for the following information:
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:
Expected output:
If you see your account information, AWS CLI is properly configured!
If you receive an authentication error, double-check your Access Key ID and Secret Access Key.

AWS Region Selection

Choose the AWS region closest to your users for optimal performance.
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. Most AWS accounts have a default VPC that works out of the box.

Get Default VPC ID

Expected output:
Save this VPC ID - you’ll need it for Terraform configuration.

Get Default Subnets

Retrieve all subnets in your default VPC:
Expected output:
Select at least 2 subnets from different availability zones (e.g., us-east-1a and us-east-1b).
Example subnet selection:

Option 2: Create Custom VPC

If you prefer to isolate the llms.txt Generator in its own VPC:

Create VPC

Enable DNS Hostnames

Create Subnets

Create Internet Gateway

Configure Route Table

If creating a custom VPC, update the security group configuration in Terraform to allow outbound internet access.

Network Configuration Summary

Before proceeding, ensure you have identified:
  • VPC ID: vpc-xxxxxxxxxxxxx
  • Region: us-east-1 (or your chosen region)
  • Internet Access: Enabled (via Internet Gateway)
  • Subnet 1 ID: subnet-xxxxxxxxxxxxx
  • Subnet 1 AZ: us-east-1a
  • Subnet 2 ID: subnet-yyyyyyyyyyyyy
  • Subnet 2 AZ: us-east-1b
Subnets must be in different availability zones for ECS high availability.
  • DNS Hostnames: Enabled
  • DNS Resolution: Enabled
Verify with:

Security Considerations

IAM Permissions

The IAM user or role running Terraform needs these permissions:
  • 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
For production, use a more restrictive custom policy. For initial deployment, 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):
You should see a route to an Internet Gateway (igw-xxxxx):

Next Steps

Database & Storage Setup

Configure Supabase database and Cloudflare R2 storage