Skip to content
cdk-ecs-task-retirement-events-mackerel-annotator provides AWS CDK resource class consists of Lambda function that annotates ECS task stop event and CloudWatch Events rule that invokes the Lambda function.
Go TypeScript Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows includes lambda artifact Feb 13, 2020
docs/images add image Feb 4, 2020
lambda pass ECS group -> service/roles mapping Jan 30, 2020
src export all members Feb 4, 2020
test pass array of mappings instead of objects Feb 3, 2020
tools push Feb 13, 2020
.gitignore yarn build Jan 30, 2020
.npmignore collect distribution files Jan 30, 2020
Makefile build lambda handler Jan 30, 2020
README.md add image Feb 4, 2020
cdk.json setup Jan 29, 2020
go.mod run npm publish if deployment event caught Feb 13, 2020
go.sum
package.json bump version to 0.1.7 Feb 13, 2020
tsconfig.develop.json add tsconfig to run tools Feb 3, 2020
tsconfig.json yarn build Jan 30, 2020
yarn.lock yarn add -D {@types/,}semver Feb 3, 2020

README.md

npm-badge

@aereal/cdk-ecs-task-retirement-events-mackerel-annotator

mackerel-annotation-image

cdk-ecs-task-retirement-events-mackerel-annotator provides AWS CDK resource class consists of Lambda function that annotates ECS task stop event and CloudWatch Events rule that invokes the Lambda function.

Install

npm install @aereal/cdk-ecs-task-retirement-events-mackerel-annotator
yarn add @aereal/cdk-ecs-task-retirement-events-mackerel-annotator

Usage

import { Stack } from "@aws-cdk/core";
import { StringParameter } from "@aws-cdk/aws-ssm";
import { FargateService } from "@aws-cdk/aws-ecs";
import { EcsServiceEventsMackerelAnnotator } from "@aereal/cdk-ecs-task-retirement-events-mackerel-annotator";

const stack = new Stack();

const service = new FargateService(...);

new EcsServiceEventsMackerelAnnotator(stack, "Annotator", {
  mackerelApiKey: StringParameter.fromSecureStringParameterAttributes(
    stack,
    "MackerelAPIKey",
    {
      parameterName: "mackerel-api-key",
      version: 1,
    }
  ),
  ecsGroupServiceRolesMapping: {
    [`service:${service.serviceName}`]: {
      service: "My-App",
      roles: ["app"],
    },
  },
});
You can’t perform that action at this time.