Skip to main content

AWS

Deploy Ever Gauzy on Amazon Web Services using ECS, RDS, and S3.

ComponentAWS Service
API ServerECS Fargate or EC2
Web AppS3 + CloudFront or ECS
DatabaseRDS PostgreSQL
File StorageS3
Load BalancerALB
DNSRoute 53
SecretsSecrets Manager
CacheElastiCache Redis

ECS Fargate Setup

Task Definition

{
"family": "gauzy-api",
"networkMode": "awsvpc",
"requiresCompatibilities": ["FARGATE"],
"cpu": "1024",
"memory": "2048",
"containerDefinitions": [
{
"name": "gauzy-api",
"image": "ghcr.io/ever-co/gauzy-api:latest",
"portMappings": [{ "containerPort": 3000, "protocol": "tcp" }],
"environment": [
{ "name": "DB_TYPE", "value": "postgres" },
{
"name": "DB_HOST",
"value": "gauzy-db.cluster-xxx.region.rds.amazonaws.com"
}
],
"secrets": [
{
"name": "DB_PASS",
"valueFrom": "arn:aws:secretsmanager:region:account:secret:gauzy/db-pass"
},
{
"name": "JWT_SECRET",
"valueFrom": "arn:aws:secretsmanager:region:account:secret:gauzy/jwt"
}
],
"healthCheck": {
"command": [
"CMD-SHELL",
"curl -f http://localhost:3000/api/health || exit 1"
],
"interval": 30,
"timeout": 5,
"retries": 3
}
}
]
}

RDS Configuration

# Create PostgreSQL instance
aws rds create-db-instance \
--db-instance-identifier gauzy-db \
--engine postgres \
--engine-version 16 \
--db-instance-class db.t3.medium \
--master-username gauzy_admin \
--master-user-password your-secure-password \
--allocated-storage 50 \
--storage-encrypted

S3 File Storage

# .env
FILE_PROVIDER=S3
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
AWS_S3_BUCKET=gauzy-uploads
AWS_REGION=us-east-1

Static Hosting (Web App)

Host the Angular webapp on S3 + CloudFront:

# Build webapp
yarn build:prod:webapp

# Upload to S3
aws s3 sync dist/apps/gauzy/ s3://gauzy-webapp/ --delete

# Create CloudFront distribution
aws cloudfront create-distribution \
--origin-domain-name gauzy-webapp.s3.amazonaws.com