Prerequisites

  • AWS CLI configured
  • Access to:
    • AWS ECR
    • AWS ECS (Fargate)
    • AWS CloudWatch
    • AWS VPC

Overview

This setup sends logs to both Atatus and CloudWatch Logs using a Atatus Fluent Bit image with dual outputs.

Step 1: Create ECS Task Definition

Replace the following placeholders with your actual values: <YOUR_REGION>, <YOUR_CLOUDWATCH_LOG_GROUP_NAME>, <LOG_STREAM_PREFIX>, <YOUR_CONTAINER_NAME>, <YOUR_APP_IMAGE>, <YOUR_ATATUS_LOGS_INGEST_LICENSE_KEY>, <YOUR_SERVICE_NAME>, <YOUR_TASK_EXECUTION_ROLE>
Sample Data for Placeholders: Use the below values as examples when replacing placeholders in your task definition:
  • <YOUR_REGION>: us-east-1
  • <YOUR_CLOUDWATCH_LOG_GROUP_NAME>: app-logs
  • <YOUR_LOG_STREAM_PREFIX> - ecs
  • <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

  • CloudWatch Logs: Navigate to your configured log group and confirm log ingestion.
  • Atatus: Go to your Atatus Logs Dashboard and confirm logs are visible.