This project demonstrates how to deploy a production-ready Grafana dashboard using the official Docker image on Amazon Elastic Container Service (ECS) with the AWS Fargate launch type. The solution is fully serverless, no EC2 provisioning or container orchestration overhead and leverages Docker, ECS, and an Application Load Balancer (ALB) to expose Grafana’s web interface.By using the grafana/grafana image directly from Docker Hub, the deployment avoids the need for custom image builds or Amazon ECR. This makes the setup lightweight, fast to deploy, and ideal for internal dashboards, monitoring pipelines, or cloud-native observability stacks.
- Go to ECS Console → Clusters → Create Cluster
- Choose Networking only (Fargate)
- Name it
- Click Create
Go to EC2 → Security Groups → Create
- Allow inbound traffic on port 80 (for ALB) and port 3000 (Grafana)
- Allow outbound traffic
- Save and note the security group ID
- Go to EC2 → Load Balancers → Create
- Choose Application Load Balancer
- Name: alb-grafana
- Scheme: Internet-facing
- Listener: HTTP on port 80
- Select VPC and public subnets
- Assign the security group you created
- Go to EC2 → Target Groups → Create
- Type: IP
- Protocol: HTTP
- Port: 3000
- Name: grafana-target-group
- Health check path: /
- Save
- Launch type: Fargate
- Name: grafana-task
- Task size: 0.5 vCPU, 1 GB memory
Add Container:
- Name: grafana
- Image: grafana/grafana
- Port mappings: 3000
- Click Add
- Go to ECS → Cluster → Services → Create
- Launch type: Fargate
- Task definition: grafana-task
- Service name: grafana-service-vrezh3mx
- Number of tasks: 1
Networking:
- VPC: same as ALB
- Subnets: public
- Security group: same as ALB
Load balancer:
- Type: Application Load Balancer
- Select alb-grafana
- Listener: port 80
- Target group: grafana-target-group
- Click Create Service
- Go to EC2 → Load Balancers → alb-grafana
- Copy the DNS name