compose-x / ecs_composex

Manage, Configure and Deploy your services and AWS services and applications from your docker-compose definitions
https://docs.compose-x.io
Mozilla Public License 2.0
164 stars 17 forks source link

[FR] services.x-logging add Subscription Filter to x-kinesis or x-kinesis_firehose #604

Open JohnPreston opened 2 years ago

JohnPreston commented 2 years ago

As a user, I might want to funnel log groups to x-kinesis and/or x-kinesis_firehose

Describe the solution you'd like

services:
  myapp-to-log:
    x-logging:
      SubscriptionFilters:
        log-all:
          FilterPattern: "*"
          DestinationArn: x-kinesis::stream-01
        log-user-id:
          FilterPattern: "{$.userIdentity.type = Root}"
          DestinationArn: x-kinesis_firehose::stream-01

x-kinesis:
  stream-01:
    Properties: {}
x-kinesis_firehose:
  stream-01:
    Properties: {}

Each element in SubscriptionFilters would allow for original properties. By default, the IAM Role for cloudwatch will be re-created and permissions set accordingly.