open-index/open-npm huggingface dataset:
npm package: @pgarbe/cdk-datadog
Description: An CDK Construct to for all DataDog users.
Author: Philipp Garbe
Latest version: 0.0.6

# CDK-DataDog

An CDK library to easily integrate your applications with DataDog.

![](https://github.com/pgarbe/cdk-datadog/workflows/Build/badge.svg)

> Disclaimer: This is not an offical DataDog Construct Library.

Currently supported:

- DataDog Agent as ECS Sidecar

## How to use it

#### DataDog Agent as SideCar

```typescript
  let existingTaskDefinition = ... // Taskdefinition with app container
  let datadogApiKey = // Secret from ParameterStore or SecretsManager

  DataDogSideCar.addToTaskDefinition(
    taskDefinition,
    {
      datadogApiKey
    }
  );

```

## How it works

Primitives:

- Metric
- Log
- Trace

Manipulate with tags:
https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging/

- service
- env
- version

### Fargate

- Logs: fluentbit
- Metrics: dd-agent
- Traces: dd-agent

### Lambda

- Wait for March
npm package: @pgarbe/cdk-ecr-sync
Description: An CDK Construct to synchronizes Docker images from Docker Hub to ECR.
Author: Philipp Garbe
Latest version: 0.5.40

# CDK ECR Sync

An CDK Construct to synchronizes Docker images from Docker Hub to ECR.

![](https://github.com/pgarbe/cdk-ecr-sync/workflows/Build/badge.svg)

Why should you use it?

1. Avoid [DockerHub throttling](https://www.docker.com/increase-rate-limits)
2. Better availability (ECR: [99.9%](https://aws.amazon.com/ecr/sla/), DockerHub: ["as is"](https://www.docker.com/sites/default/files/d8/2019-04/docker-master-subscription-and-services-agreement-april-2019.pdf))
3. Possible less data transfer costs (ECS pulls from ECR in same region are [free](https://aws.amazon.com/ecr/pricing/))

See also my blog post: https://garbe.io/blog/2020/04/22/cdk-ecr-sync/

## How to use it

In your CDK application, run `npm install @pgarbe/cdk-ecr-sync` and add the following construct:

```typescript
const ecrSync = new EcrSync(this, 'ecrSync', {
  repoPrefix: 'dockerhub-mirror', // optional prefix
  dockerImages: [
    {
      imageName: 'datadog/agent',
      excludeTags: [  // Use RegEx expressions to exclude specific tags
        'latest',
        '^1.0'
      ],
    }
  ],
  lifcecyleRule: {...} // Optional lifecycle rule for ECR repos
});

// Allow all accounts in your organization to pull
ecrSync.grantPull(new iam.OrganizationalPrincipal('o-123456'));
```

See also `examples` folder.

### Trigger the sync manually

Look up for a lambda called `*ecrSync*%*`, add an empty test event, and execute it. The lambda will check which images needs to be synced and trigger a CodePipeline.
npm package: @pgarbe/fargate
Description: Production ready Concstructs for Fargate
Author: Philipp Garbe
Latest version: 0.1.0-alpha.3

# Fargate Cluster

This package contains constructs for working with AWS Fargate. The simplest example of using this library looks like this:

```ts
// Create a Fargate cluster with an ALB
const cluster = new fargate.FargateCluster(this, 'MyCluster', {
  vpc,
});

// Fargate service which uses ALB from FargateCluster
const service = new fargate.FargateService(this, 'MyService', {
  cluster: cluster,
  scaling: xy,
  pathPattern or hostPattern
});
```