Socket
Book a DemoInstallSign in
Socket

ecs-info

Package Overview
Dependencies
Maintainers
11
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecs-info

Library for querying the state of an AWS::ECS::Cluster

latest
Source
npmnpm
Version
0.0.7
Version published
Maintainers
11
Created
Source

ecs-info

Library for querying the state of an AWS::ECS::Cluster

work in progress

var ecs = require('ecs-info');
ecs.Cluster.describe('my-cluster', 'us-east-1')
  .then(clusterData => { ... });

Cluster description

The object that comes back has circular references that you can use to trace the relationships between EC2 instances, ECS services, and ECS tasks that are part of the cluster. Basically:

Cluster {
  tasks: [ ...Task {} ],
  instances: [ ...Instance {} ],
  services: [ ...Service {} ]
}

A Cluster is the response from an ecs.describeClusters request with additional properties:

  • tasks an array of tasks running or stopped on the cluster
  • services an array of services running on the cluster
  • instances an array of instances in the cluster

A Task is the response from an ecs.describeTasks request with additional properties:

A Service is the response from an ecs.describeServices request with additional properties:

An Instance is the response from an ecs.describeContainerInstances request with additional properties:

Futhermore, each of these classes have a set of prototype methods that they implement. These can be useful for formatting or resolving specific information about a cluster, task, service, or instance.

Additional treats

Return an array of IAM policy statements providing permission to run the API requests involved in this library:

ecs.iamPermissions('my-cluster-name');

FAQs

Package last updated on 28 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts