@cohalz/cdk-fluentd-log-driver
TypeScript icon, indicating that this package has built-in type declarations

1.13.1 • Public • Published

cdk-fluentd-log-driver

Build Status

cdk-fluentd-log-driver provides helper function that uses fluentd log driver to your ECS task definition.

Synopsis

import { ContainerImage, Ec2TaskDefinition } from "@aws-cdk/aws-ecs"
import { Stack } from "@aws-cdk/core";
import { FluentdLogDriver } from "@cohalz/cdk-fluentd-log-driver";

const stack = new Stack()
const taskDefinition = new Ec2TaskDefinition(stack, "TaskDefinition")

const logDriver = new FluentdLogDriver({
  fluentdAddress: "127.0.0.1:24224",
  fluentdMaxRetries: "3",
  fluentdRetryWait: "2",
  tag: "tag",
})

taskDefinition.addContainer("Container", {
  image: ContainerImage.fromRegistry("/aws/aws-example-app"),
  memoryLimitMiB: 2048,
  // Use a fluentd log driver
  logging: logDriver,
})

For available options, please refer to the docker docs.

Readme

Keywords

Package Sidebar

Install

npm i @cohalz/cdk-fluentd-log-driver

Weekly Downloads

1

Version

1.13.1

License

Apache-2.0

Unpacked Size

19.1 kB

Total Files

15

Last publish

Collaborators

  • cohalz