Deploy Bold Reports ECS Multi-Container on AWS ECS Fargate with Application Load Balancer
1. Overview
This guide deploys Bold Reports on AWS ECS Fargate using Amazon EFS storage, and an Application Load Balancer.
2. Prerequisites
• Amazon ECS cluster - https://docs.aws.amazon.com/AmazonECS/latest/userguide/create_cluster.html
• Amazon EFS - https://docs.aws.amazon.com/efs/latest/ug/gs-step-two-create-efs-resources.html
• IAM roles: ECS task execution role + CloudWatch access
• Application Load Balancer (Internet-facing) with at least 2 subnets across AZs
• Relational database (PostgreSQL, MySQL, Oracle or MSSQL) reachable from the ECS subnets
• All Bold Reports resources in the same VPC and Security Group
3. ECS Cluster
After prerequisites, the new cluster appears on the ECS Clusters list.
4. Task Definitions
4.1 Placeholders used in every task definition
| Placeholder | What to put in |
|---|---|
<service-task-definition-name> |
ECS Task Definition family name for the service. |
<service-container-name> |
Container name inside the task definition. |
<update the latest image> |
Container image repository with latest version tag. |
<application-domain> |
Public DNS domain mapped to the Application Load Balancer. |
<provide the DB type> |
Database engine type (PostgreSQL/ MySQL/ Oracle/ MSSQL). |
<provide the DB host> |
Endpoint or IP address of the database server. |
<provide the DB port number> |
Database port number (PostgreSQL: 5432, MySQL: 3306, MSSQL: 1433). |
<provide the DB maintenance DB name> |
Default maintenance database name. |
<provide the DB user name> |
Database master or application user with DDL rights. |
<provide the DB name> |
Target database name for Bold Reports application data. |
<provide the user email ID> |
Initial Bold Reports administrator email address. |
<aws-region> |
AWS region where the ECS cluster and services reside. |
<ecs-task-role-arn> |
ARN of the IAM Task Role (grants containers S3/CloudWatch access). |
<ecs-task-execution-role-arn> |
ARN of the ECS Task Execution Role (grants ECS access to ECR/Secrets). |
<account-id> |
12-digit AWS Account ID. |
<secret-name> |
Secret name defined in AWS Secrets Manager. |
<efs-volume-name> |
Name given to the EFS volume in the task definition storage settings. |
<efs-file-system-id> |
File system ID of the Amazon EFS instance. |
4.2 Task Definition Files - Service Reference Table
⚠️ Task definitions for all Bold Reports services are maintained in the GitHub repository:
- From the sidebar click Task definitions › Create new task definition with JSON.
-
Based on the storage type use the Bold Reports task definitions from below GitHub
GitHub Repository Location: GitHub - Bold Reports ECS Task Definitions -
Use the latest images from https://github.com/boldreports/boldreports-server-in-docker/blob/master/deploy/multiple-container/docker-compose.yml.
Secrets
⚠️ Secrets: Replace the DB password and user password into AWS Secrets Manager and reference it via the secrets block (valueFrom).
4.3 AWS Secrets Manager Creation
The following steps describe how to create the secret in AWS Secrets Manager for the DB password and user password.
Steps
-
Go to Secret manager Page
-
Click Store a new secret
- Choose Secret type as Other type of secret
- Next add the key/value pairs
- Next set the Encryption key as aws/secretsmanager
- Next set the secret name and description
- Next set the tag if needed.
- Next set the default options for Resource permission, Replicate secret, Configure rotation.
- Next check the review.
- Next click store to create the secret manager.
Policies
Policy need to attach with the IAM user account:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ReadSpecificSecret",
"Effect": "Allow",
"Action": [
"secretsmanager:GetSecretValue",
"secretsmanager:DescribeSecret"
],
"Resource": "arn:aws:secretsmanager:<aws-region>:<account-id>:secret:<secret-name>*"
},
{
"Sid": "ListSecretsForConsole",
"Effect": "Allow",
"Action": [
"secretsmanager:ListSecrets"
],
"Resource": "*"
}
]
}
Policy needs to attach with the task definition role:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "SecretsManagerAccess",
"Effect": "Allow",
"Action": [
"secretsmanager:GetSecretValue",
"secretsmanager:DescribeSecret"
],
"Resource": "arn:aws:secretsmanager:<aws-region>:<account-id>:secret:<secret-name>*"
}
]
}
4.4 Suggested CPU and Memory to support concurrent users
| Service | CPU (milli core) | Memory (GB) | Desired Tasks |
|---|---|---|---|
| ID WEB | 512 | 1 | 1 |
| ID UMS | 512 | 1 | 1 |
| ID API | 512 | 1 | 1 |
| REPORTS WEB | 512 | 1 | 1 |
| REPORTS API | 512 | 1 | 1 |
| REPORTS JOBS | 512 | 1 | 1 |
| REPORTS DESIGNER | 512 | 1 | 1 |
| REPORTS VIEWER | 512 | 1 | 1 |
| BOLD ETL | 512 | 1 | 1 |
| REPORTS AI | 512 | 1 | 1 |
| REPORTS MCP | 512 | 1 | 1 |
5. Create Target Groups
Create Target Groups
Each Bold Reports service needs its own target group.
5.1 Create Target Group for each services
- Go to EC2 > Target Groups > Create target group
- Choose the Target type as IP address and provide the target group name
- Choose the protocol as HTTP and choose the respective VPC
- Provide health check endpoint for each services as mentioned in the table below
Health-check paths per target group:
| Service | Health check path |
|---|---|
| IDP Web | /health-check |
| IDP UMS | /health-check |
| IDP API | /health-check |
| Reports Web | /health-check |
| Reports Jobs | /health-check |
| Reports API | /health-check |
| Reports Designer | /health-check |
| Reports Viewer | /health-check |
| Bold ETL | /etlservice/health-check |
| Reports AI | /reportsai/health-check |
| Reports MCP | /health-check |
-
Under the Advanced health check settings change the Success Codes value from 200 to 200-399
-
Click Next and click Create target group
-
Follow the above steps and create target group for each service
Suggested target-group names:
| Service | Suggested TG name | Port |
|---|---|---|
| IDP Web | tg-idp-web | 80 |
| IDP UMS | tg-idp-ums | 80 |
| IDP API | tg-id-api | 80 |
| Reports Web | tg-reports-web | 80 |
| Reports Jobs | tg-reports-jobs | 80 |
| Reports API | tg-reports-api | 80 |
| Reports Designer | tg-reports-designer | 80 |
| Reports Viewer | tg-reports-Viewer | 80 |
| BOLD ETL | tg-bold-etl | 80 |
| Reports AI | tg-reports-ai | 80 |
| Reports MCP | tg-reports-mcp | 80 |
⚠️ All target groups must live in the same VPC as the ECS cluster.
6. Application Load Balancer
Application Load Balancer
- Go to EC2 > Load balancers > Create load balancer
- Create Application Load balancer
- To connect all the services, create a common load balancer and choose a listener based on your preference (80 or 443)
⚠️ Screenshots show 443 Listener
- Create the load balancer with:
- Load balancer name
- Internet-facing scheme
- IPv4 IP address type
- Same VPC and subnets/security group as the cluster
- For the Listeners and routing:
- ALB listens to HTTPS:443 (and HTTP:80 redirected to HTTPS)
- Choose the ID-WEB’s target group name
- For HTTPS, import the respective SSL certificate
- Click Create load balancer
7. Listener Rules for Path-Based Routing
Listener Rules for Path-Based Routing
Once the Load balancer is created, click the HTTPS listener on the ALB Listeners tab and add rules to the HTTPS:443 listener.
Add a rule for each of the Bold Reports services. Each rule has:
- Condition 1: Host header =
<application-domain> - Condition 2: Path pattern =
/<service-path>/* - Action: Forward to target group
Listener-rule reference table:
| Service | Target Group | Host header | Path pattern | Priority |
|---|---|---|---|---|
| id-web | tg-id-web | /* | 12 | |
| id-ums | tg-id-ums | /ums/* | 11 | |
| id-api | tg-id-api | /api/* | 10 | |
| reports-web | tg-reports-web | /reporting/* | 9 | |
| reports-jobs | tg-reports-jobs | /reporting/jobs/* | 8 | |
| reports-api | tg-reports-api | /reporting/api/* | 7 | |
| reports-viewer | tg-reports-viewer | /reporting/viewer/* | 6 | |
| bold-etl | tg-bold-etl | /etlservice/* | 5 | |
| reports-designer | tg-reports-designer | /reporting/reportservice/* | 4 | |
| reports-ai | tg-reports-ai | /reportsai/* | 3 | |
| reports-mcp | tg-reports-mcp | /reportsmcp/* | 2 |
⚠️ Lower priority values are evaluated first. The listener’s default action forwards to the IDP Web target group; it does not need a non-default priority.
Example for IDP Web:
8. ECS Service Creation
ECS Service Creation
⚠️ RECOMMENDED DEPLOYMENT ORDER:
id-ums (first deployed, must be RUNNING) → id-api → id-web → reports-web → reports-api → reports-jobs → reports-designer → reports-viewer → bold-etl → reports-ai → reports-mcp
The id-ums service owns the schema + the initial administrator account. Any service that boots before id-ums is RUNNING will fail health checks at startup.
From the cluster → Services tab → click Create. Pick the right task definition family for this service.
8.1 Environment
- Compute options = Launch type
- Launch type = Fargate
- Open Troubleshooting configuration - recommended → tick Turn on ECS Exec
8.2 Tasks and health
⚠️ Desired tasks = 1, Health check grace period = 120 s
8.3 Networking
- VPC — same as the cluster
- Subnets — private subnets only
- Security group — same SG as the cluster
- Public IP = Turned off
8.4 Service Connect (shared namespace)
- Tick Use Service Connect → Configuration = Client and server → use the same namespace for every service
- If namespace is not available, Create namespace:
- Provide the load balancer name
- Instance discovery – API calls and DNS queries in VPCs
- Select the same VPC as the cluster uses
- Click Create Namespace
- Once namespace is created, choose it in the service connect
8.5 Add Port Mappings and Applications
Use these Service Connect values verbatim:
| Port alias | Discovery | DNS | Port |
|---|---|---|---|
| idp-web | id-web-service | id-web-service | 6000 |
| idp-api | id-api-service | id-api-service | 6001 |
| idp-ums | id-ums-service | id-ums-service | 6002 |
| reports-web | reports-web-service | reports-web-service | 6550 |
| reports-api | reports-api-service | reports-api-service | 6551 |
| reports-jobs | reports-jobs-service | reports-jobs-service | 6552 |
| reports-designer | reports-reportservice-service | reports-reportservice-service | 6553 |
| reports-viewer | reports-viewer-service | reports-viewer-service | 6554 |
| bold-etl | bold-etl-service | bold-etl-service | 6009 |
| reports-ai | reports-ai-service | reports-ai-service | 6555 |
| reports-mcp | reports-mcp-service | reports-mcp-service | 6556 |
⚠️ Same Service Connect namespace for every service
⚠️ Set per-request timeout as 240 s for every services
8.6 Load balancer integration
In the Load balancer section:
- Use existing ALB
- Use existing HTTPS listener
- Use matching listener row
- Click Create
Once all the details are given, click Create option to create the service. Repeat for all services.
9. Auto-Deployment and Verification
⚠️ After all services are RUNNING, browse to https://<application-domain>/. The Bold Reports auto-deployment wizard loads automatically on a fresh tenant.
Log in with the admin credentials (user-email + user-password).
9.1 Post-deployment checklist
- ☐ All ECS services in RUNNING state
- ☐ All target groups report at least one healthy target
- ☐ Service Connect DNS resolves between every pair of services
- ☐ No errors in CloudWatch Log Group /aws/ecs/boldbi
- ☐ Map the ALB DNS to
<application-domain>in Route 53
10. Auto Scaling Configuration
Auto Scaling Configuration - AWS ECS Fargate with Application Load Balancer
Overview
This section provides step-by-step instructions to enable auto-scaling for Bold Reports services on AWS ECS. Once configured, services will automatically scale based on CPU and Memory utilization metrics.
⚠️ Important Note: Once CPU or Memory reaches above 80%, it takes approximately 3 minutes for a new task to be completely launched and ready to serve traffic.
Step 1: Update Service with Monitoring Configuration
Navigate to the respective service and configure monitoring metrics:
- Go to AWS ECS > Clusters > Select your cluster > Services > Select the Bold Reports service
- Click on ‘Update service’ button
- Navigate to ‘Monitoring configuration’ section
- Add metric configuration for CPU Utilization
- Add metric configuration for Memory Utilization
- Set Resolution as 20 seconds (for faster scaling detection)
- Click ‘Update service’ to save changes
Step 2: Configure Service Auto Scaling Task Counts
Set the minimum and maximum number of tasks for auto-scaling:
- Navigate to: ECS > Services > Select service > Service Auto Scaling
- Click ‘Set the number of tasks’ button
- Enable: ‘Use service auto scaling to adjust your service’s desired task count’
- Set Minimum number of tasks: 1
- Set Maximum number of tasks: 20 (based on expected load)
- Click ‘Save’ button to apply changes
Step 3: Create New Scaling Policies
Navigate to the scaling policies section:
- Go to the service’s Auto scaling tab > Scaling policies section
- Click ‘Create scaling policy’ button
Step 4: Create CPU Utilization Scaling Policy
Configure Target Tracking policy for CPU metrics:
- Choose ‘Target Tracking’ as the scaling policy type
- Policy name: Enter a descriptive name (e.g., ‘service-name-cpu-scaling’)
- Metric type: Select ‘ECSServiceAverageCPUUtilizationHighResolution’
- Target utilization: Enter 80 (percent)
- Expand ‘Additional settings’ section
- Scale-in cooldown period: Set to 60 seconds
- Scale-out cooldown period: Set to 300 seconds (5 minutes)
- Click ‘Create scaling policy’ button to save
Step 5: Create Memory Utilization Scaling Policy
Configure Target Tracking policy for Memory metrics:
- Click ‘Create scaling policy’ button again
- Choose ‘Target Tracking’ as the scaling policy type
- Policy name: Enter a descriptive name (e.g., ‘service-name-memory-scaling’)
- Metric type: Select ‘ECSServiceAverageMemoryUtilizationHighResolution’
- Target utilization: Enter 80 (percent)
- Expand ‘Additional settings’ section
- Scale-in cooldown period: Set to 60 seconds
- Scale-out cooldown period: Set to 300 seconds (5 minutes)
- Click ‘Create scaling policy’ button to save
Step 6: Verification
Verify that both policies are now active:
- Navigate to the service’s Auto scaling tab > Scaling policies section
- You should see both policies listed with ‘Active’ status
- Verify CPU utilization policy shows 80% target
- Verify Memory utilization policy shows 80% target
- Both policies are now active and will trigger scaling events
Scaling Timeline & Important Notes
When CPU or Memory exceeds 80%, AWS automatically launches new tasks. Timeline breakdown:
| Phase | Duration | Activity |
|---|---|---|
| 0-1 minute | 1 min | Alarm threshold exceeded, scaling initiated |
| 1-3 minutes | 2 min | AWS ECS service initiates task launch request; Fargate provisions container, pulls image from ECR |
| During launch | - | Application (Bold Reports) initializes and starts |
| Health checks | - | Health checks pass, task added to load balancer |
| Traffic serving | - | Task receives traffic from load balancer |
| Total time | 3 minutes | From alarm trigger to production traffic |
High Availability Configuration
Setting Minimum=2 ensures redundancy:
- Service always runs minimum 2 tasks
- If one task fails, other task continues serving traffic
- Replacement task automatically launched by AWS
- Result: Zero downtime during task failure
⚠️ Single task (Min=1) = Single point of failure!