Prerequisites
- AWS CLI configured
- Access to:
- AWS ECR
- AWS ECS (Fargate)
- AWS CloudWatch
- AWS VPC
- AWS ECR
Overview
This lightweight version skips CloudWatch and sends logs directly to Atatus using the standard AWS Fluent Bit image.
Step 1: Create ECS Task Definition
Replace the following placeholders with your actual values: <YOUR_CONTAINER_NAME>
, <YOUR_APP_IMAGE>
, <YOUR_ATATUS_LOGS_INGEST_LICENSE_KEY>
, <YOUR_SERVICE_NAME>
, <YOUR_TASK_EXECUTION_ROLE>
copy
{
"family": "atatus-aws-ecs-fargate-fluent-bit",
"containerDefinitions": [
{
"name": "log_router",
"image": "amazon/aws-for-fluent-bit:latest",
"cpu": 0,
"memoryReservation": 50,
"portMappings": [],
"essential": true,
"environment": [],
"mountPoints": [],
"volumesFrom": [],
"user": "0",
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/log-router",
"awslogs-region": "<YOUR_REGION>",
"awslogs-stream-prefix": "firelens"
}
},
"systemControls": [],
"firelensConfiguration": {
"type": "fluentbit",
"options": {
"enable-ecs-log-metadata": "true",
}
}
},
{
"name": "<YOUR_CONTAINER_NAME>",
"image": "<YOUR_APP_IMAGE>",
"memoryReservation": 100,
"essential": true,
"logConfiguration": {
"logDriver": "awsfirelens",
"options": {
"Name": "http",
"Host": "intake-logs.atatus.com",
"Port": "443",
"tls": "on",
"tls.verify": "off",
"URI": "/ingest/v1/logs",
"Format": "json_lines",
"Header": "x-atatus-ecs-awsfirelens <YOUR_ATATUS_LOGS_INGEST_LICENSE_KEY>:<YOUR_SERVICE_NAME>"
}
}
}
],
"executionRoleArn": "<YOUR_TASK_EXECUTION_ROLE>",
"taskRoleArn": "<YOUR_TASK_EXECUTION_ROLE>",
"networkMode": "awsvpc",
"requiresCompatibilities": ["FARGATE"],
"cpu": "256",
"memory": "512"
}
Sample Data for Placeholders:
Use the below values as examples when replacing placeholders in your task definition:
<YOUR_CONTAINER_NAME>
– my-app<YOUR_APP_IMAGE>
– 123456789012.dkr.ecr.us-east-1.amazonaws.com/my-app:latest<YOUR_ATATUS_LOGS_INGEST_LICENSE_KEY>
– lic_**********************<YOUR_SERVICE_NAME>
– test-service<YOUR_TASK_EXECUTION_ROLE>
– arn:aws:iam::123456789012:role/ecsTaskExecutionRole
Step 2: Deploy Task in ECS
- Open ECS > Task Definitions in AWS Console
- Register the new task definition using the JSON above.
- Launch a task in a suitable Fargate cluster and subnet.
Verification
Atatus: Go to your Atatus Logs Dashboard and confirm logs are visible.