0.7.3 • Published 2 years ago

aws-cdk-construct-tilroy v0.7.3

Weekly downloads
-
License
Apache-2.0
Repository
bitbucket
Last release
2 years ago

aws-cdk-construct-tilroy

This construct allows you to deploy a fully fledged autoscaling fargate service on an existing VPC and ECS Cluster.

Install package

You can download this package using yarn e.g.

yarn add aws-cdk-construct-tilroy@0.2.2

Sample

Create a stack in the main.ts file like in the following example below:

import { ECSFargateServiceTilroy } from 'aws-cdk-construct-tilroy';
import * as cdk from 'aws-cdk-lib';
import * as ecs from 'aws-cdk-lib/aws-ecs';
import * as secrets from 'aws-cdk-lib/aws-secretsmanager';

const app = new cdk.App();
const stack = new cdk.Stack(app, 'test-stack', {
  env: {
    region: 'eu-west-1',
    account: '012345678901',
  },
});
const exampleSecret = secrets.Secret.fromSecretNameV2(stack, 'exampleSecret', 'example-secret');
const containerImage = ecs.ContainerImage.fromRegistry('amazon/amazon-ecs-sample');

new ECSFargateServiceTilroy(stack, 'exampleService', {
  containerPort: 8008,
  cpu: 512,
  memory: 512,
  autoScaling: {
    min: 2,
    max: 5,
    cpuPercent: 50,
  },
  vpcName: 'exampleVpcName',
  ecsCluster: new ecs.Cluster(stack, 'ecsCluster', {}),
  environmentVars: {
    LOG_LEVEL: 'debug',
    ENV_DNS: 'example.lan',
    AWS_ACCOUNT: '012345678901',
    AWS_REGION: 'eu-west-1',
  },
  secrets: {
    EXAMPLE_SECRET: ecs.Secret.fromSecretsManager(exampleSecret, 'exampleSecret'),
  },
  containerImage: containerImage,
  serviceName: 'exampleServiceNode',
});

app.synth();
0.7.1

2 years ago

0.7.3

2 years ago

0.6.7

2 years ago

0.6.6

2 years ago

0.5.0

2 years ago

0.6.3

2 years ago

0.6.2

2 years ago

0.6.5

2 years ago

0.6.4

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.2.63

2 years ago

0.2.62

2 years ago

0.2.61

2 years ago

0.2.60

2 years ago

0.2.64

2 years ago

0.2.59

2 years ago

0.2.58

2 years ago

0.3.0

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.2.57

3 years ago

0.2.56

3 years ago

0.2.55

3 years ago

0.2.54

3 years ago

0.2.52

3 years ago

0.2.51

3 years ago

0.2.50

3 years ago

0.2.53

3 years ago

0.2.49

3 years ago

0.2.48

3 years ago

0.2.47

3 years ago

0.2.46

3 years ago

0.2.41

3 years ago

0.2.40

3 years ago

0.2.45

3 years ago

0.2.44

3 years ago

0.2.43

3 years ago

0.2.42

3 years ago

0.2.39

3 years ago

0.2.38

3 years ago

0.2.37

3 years ago

0.2.36

3 years ago

0.2.35

3 years ago

0.2.34

3 years ago

0.2.33

3 years ago

0.2.27

3 years ago

0.2.26

3 years ago

0.2.25

3 years ago

0.2.24

3 years ago

0.2.23

3 years ago

0.2.22

3 years ago

0.2.21

3 years ago

0.2.20

3 years ago

0.2.19

3 years ago

0.2.18

3 years ago

0.2.17

3 years ago

0.2.30

3 years ago

0.2.16

3 years ago

0.2.15

3 years ago

0.2.14

3 years ago

0.2.13

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.32

3 years ago

0.2.10

3 years ago

0.2.31

3 years ago

0.2.29

3 years ago

0.2.28

3 years ago

0.2.9

3 years ago

0.2.8

3 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.1.9

3 years ago

0.1.7

3 years ago

0.1.1

3 years ago

0.0.0

3 years ago