Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aereal/cdk-ecs-task-retirement-events-mackerel-annotator
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.
https://github.com/aereal/cdk-ecs-task-retirement-events-mackerel-annotator
aws-cdk
Last synced: 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/aereal/cdk-ecs-task-retirement-events-mackerel-annotator
- Owner: aereal
- Created: 2020-01-29T02:09:20.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-03T12:49:56.000Z (3 months ago)
- Last Synced: 2024-10-06T11:08:49.235Z (3 months ago)
- Topics: aws-cdk
- Language: Go
- Homepage:
- Size: 484 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![npm-badge][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
```sh
npm install @aereal/cdk-ecs-task-retirement-events-mackerel-annotator
``````sh
yarn add @aereal/cdk-ecs-task-retirement-events-mackerel-annotator
```## Usage
```typescript
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,
}
),
mackerelServiceRolesMappings: [
{
ecsService: service,
serviceRoles: {
service: "My-App",
roles: ["app"],
},
},
],
});
```[AWS CDK]: https://docs.aws.amazon.com/cdk/latest/guide/home.html
[npm-badge]: https://img.shields.io/npm/v/@aereal/cdk-ecs-task-retirement-events-mackerel-annotator
[mackerel-annotation-image]: /docs/images/annotation.png