ECS
Step 1: Upload Certificate to ECS Container Instances
Using AWS CLI (SSM)
# Copy certificate to ECS container instances
aws ssm send-command \
--document-name "AWS-RunShellScript" \
--parameters 'commands=["mkdir -p /opt/ssl-certs","wget -O /opt/ssl-certs/global-bundle.pem https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem","chmod 644 /opt/ssl-certs/global-bundle.pem"]' \
--targets "Key=tag:aws:autoscaling:groupName,Values=your-ecs-asg"
Using AWS Console (SSM Run Command)
- Navigate to AWS Systems Manager Console → Run Command
- Click Run command
- Select AWS-RunShellScript document
- In Command parameters, enter:
mkdir -p /opt/ssl-certs
wget -O /opt/ssl-certs/global-bundle.pem https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem
chmod 644 /opt/ssl-certs/global-bundle.pem - In Targets section:
- Choose Specify instance tags
- Tag key:
aws:autoscaling:groupName
- Tag value:
your-ecs-asg
- Click Run
- Wait for command execution to complete on all instances
Step 2: Update ECS Task Definition
Using AWS CLI
Create a new task definition file tooljet-task-updated.json
:
{
"family": "tooljet-task",
"taskDefinition": {
"containerDefinitions": [
{
"name": "tooljet",
"environment": [
{
"name": "PG_HOST",
"value": "your-rds-endpoint.region.rds.amazonaws.com"
},
{
"name": "PGSSLMODE",
"value": "require"
},
{
"name": "NODE_EXTRA_CA_CERTS",
"value": "/certs/global-bundle.pem"
}
],
"mountPoints": [
{
"sourceVolume": "ssl-certs",
"containerPath": "/certs",
"readOnly": true
}
]
}
],
"volumes": [
{
"name": "ssl-certs",
"host": {
"sourcePath": "/opt/ssl-certs"
}
}
]
}
}
Register the updated task definition:
aws ecs register-task-definition --cli-input-json file://tooljet-task-updated.json
Using AWS Console
- Navigate to ECS Console → Task Definitions
- Select your ToolJet task definition
- Click Create new revision
- Scroll to Container definitions and click on your ToolJet container
- In Environment section, add/update environment variables:
PG_HOST
:your-rds-endpoint.region.rds.amazonaws.com
PGSSLMODE
:require
NODE_EXTRA_CA_CERTS
:/certs/global-bundle.pem
- In Storage and Logging section:
- Mount points: Add mount point
- Source volume:
ssl-certs
- Container path:
/certs
- Read only: ✅ Checked
- Source volume:
- Mount points: Add mount point
- Scroll to Volumes section at the bottom:
- Click Add volume
- Name:
ssl-certs
- Volume type: Bind mount
- Source path:
/opt/ssl-certs
- Click Update then Create
Step 3: Alternative - Using EFS for Certificate Storage
Using AWS CLI
Update your task definition to use EFS:
{
"volumes": [
{
"name": "ssl-certs",
"efsVolumeConfiguration": {
"fileSystemId": "fs-xxxxxxxxx",
"rootDirectory": "/ssl-certs"
}
}
]
}
Using AWS Console
- First, create EFS file system and upload certificate:
- Go to EFS Console → Create file system
- Upload
global-bundle.pem
to/ssl-certs/
directory in EFS
- In your ECS task definition (Step 2 above):
- In Volumes section, instead of Bind mount:
- Volume type: EFS
- Name:
ssl-certs
- File system ID:
fs-xxxxxxxxx
- Root directory:
/ssl-certs
- In Volumes section, instead of Bind mount:
Step 4: Update ECS Service
Using AWS CLI
aws ecs update-service \
--cluster your-cluster-name \
--service tooljet-service \
--task-definition tooljet-task:latest \
--force-new-deployment
Using AWS Console
- Navigate to ECS Console → Clusters
- Select your cluster
- Click on the Services tab
- Select your ToolJet service
- Click Update
- In Configure service step:
- Task Definition: Select the latest revision you just created
- Force new deployment: ✅ Checked
- Click Skip to review
- Click Update Service
- Wait for deployment to complete
Step 5: Verify Configuration
Check service status:
# Via CLI
aws ecs describe-services --cluster your-cluster-name --services tooljet-service
# Via Console: Go to ECS Console → Clusters → Your Cluster → Services → ToolJet Service
# Check that "Running count" matches "Desired count"
Verify SSL certificate mount:
# Connect to running container and verify certificate
aws ecs execute-command \
--cluster your-cluster-name \
--task your-task-id \
--container tooljet \
--command "ls -la /certs/"
Reference: ToolJet ECS Setup Documentation