1.0.3 • Published 4 years ago

@tcudok/ecs-exec v1.0.3

Weekly downloads
4
License
Unlicense
Repository
github
Last release
4 years ago

@tcudok/ecs-exec

Installation

yarn add @tcudok/ecs-exec

Usage

import { ecsExec } from '@tcudok/ecs-exec';

async function test() {
  const { taskId, taskUrl, createLogReadStream } = await ecsExec({
    taskName: 'test',
    args: [],
    launchType: 'FARGATE',
    region: 'us-east-1',
    subnetId: 'subnet-xxx',
    securityGroupId: 'sg-xxx',
    assignPublicIp: true,
    logs: {
      logGroupName: 'test',
      logStreamPrefix: 'test',
    },
  });
  
  console.log(`Starting ECS task ${taskId}. Details: ${taskUrl}`);
  
  for await (const { message } of createLogReadStream()) {
    console.log(message);
  }
}

Check test/src/test.ts for a more detailed example.

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago