AWSTemplateFormatVersion: "2010-09-09" Description: "Template to deploy and monitor Data Prepper on ECS Fargate tasks" Resources: FargateTask: Type: AWS::ECS::TaskDefinition Properties: NetworkMode: awsvpc Family: data-prepper-emf-metrics TaskRoleArn: arn:aws:iam:::role/ecsTaskIAMRole ExecutionRoleArn: arn:aws:iam:::role/ecsTaskExecutionRole Cpu: 1024 Memory: 8192 RequiresCompatibilities: - "EC2" - "FARGATE" ContainerDefinitions: - Name: data-prepper-poc Image: .dkr.ecr..amazonaws.com/data-prepper-poc:EMF-METRICS-LOGGING-POC MemoryReservation: 2048 Essential: true PortMappings: - ContainerPort: 21890 HostPort: 21890 Protocol: tcp - ContainerPort: 4900 HostPort: 4900 Protocol: tcp LogConfiguration: LogDriver: awsfirelens Command: - /bin/bash - -c - | echo $PIPELINES_YAML | base64 -d - | tee /usr/share/data-prepper/pipelines.yaml echo $DATA_PREPPER_CONFIG_YAML | base64 -d - | tee /usr/share/data-prepper/data-prepper-config.yaml java -jar data-prepper.jar pipelines.yaml data-prepper-config.yaml Environment: - Name: PIPELINES_YAML Value: Fn::Base64: | entry-pipeline: source: otel_trace_source: ssl: false unframed_requests: true health_check_service: true sink: - pipeline: name: "raw-pipeline" raw-pipeline: source: pipeline: name: "entry-pipeline" processor: - otel_trace_raw: sink: - stdout: - Name: DATA_PREPPER_CONFIG_YAML Value: Fn::Base64: | ssl: false metricRegistries: - "EmbeddedMetricsFormat" - "Prometheus" - Name: log_router Image: .dkr.ecr..amazonaws.com/aws-for-fluent-bit:DEMO MemoryReservation: 50 Essential: true FirelensConfiguration: Type: fluentbit Options: config-file-type: "file" config-file-value: "/fluent-bit.conf"