npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

ecs-deployer

v0.6.1

Published

A set of utilities for automating deployments of docker images to ECS

Downloads

106

Readme

AWS ECS Deployer Utility

This tool helps simplify automated docker deployments to Amazon's ECS. In short the tool will:

  1. Perform a number of pre-checks that all resources are ready to be released.
  2. Register a new task definition revision with ECS.
  3. Update one or more services with the new revision.
  4. Scale your auto-scaling group up, so that the new revision can be deployed. This is optional.
  5. Wait for ECS to complete the deploy.
  6. Scale your auto-scaling group back down to normal size. This is optional.

Getting Started

yarn add ecs-deployer --dev

Configuration

Under the hood we are using the NodeJS AWS SDK. You can configure your credentials several ways.

The AWS Region must be configured via an environment variable. Make sure to set AWS_REGION to whatever AWS region your resources are located in.

The user should have the following policy attached:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "ecs:DescribeClusters",
                "ecs:DescribeServices",
                "ecs:DescribeTaskDefinition",
                "ecs:DescribeTasks",
                "ecs:ListServices",
                "ecs:ListTaskDefinitions",
                "ecs:ListTasks",
                "ecs:RegisterTaskDefinition",
                "ecs:UpdateService",
                "autoscaling:DescribeAutoScalingGroups",
                "autoscaling:SetDesiredCapacity",
                "ecr:DescribeImages"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}

The ecr:DescribeImages is only needed if you are also hosting your images in ECR.

Usage

A sample deploy:

const EcsDeployer = require('ecs-deployer')

const deployer = new EcsDeployer({
  docker: {
    type: 'quay', // supported: 'quay', 'ecr', or 'none' (checking bypassed)
    url: 'https://quay.io/username/image-name', // required for quay
    auth: '' // required for quay
    repository: 'foo/bar' // required for ECR
  },

  services: [
    {
      taskDefinition: {
        "family": "foo" // This should already exist in ECS. Required.
      },

      name: 'my-web-service', // ECS service name. Required.
      cluster: 'web', // ECS cluster name. Required.
      autoScaling: {
        name: 'my-web-autoscaling-group' // Optional
      },
      imagePath: 'site/organization/repo' // Optional - example: quay.io/MyOrganization/my-repo
    }
  ]
});

// Call deploy and give a version to deploy
deployer.deploy('1.0.0').then(function() {
  console.log('Successfully deployed')
}, function(err) {
  console.error('Failed to deploy');
  console.error(err)
});

// Optionally subscribe to progress events.
deployer.on('progress', function(e) {
  console.log(e.service.name, e.msg);
})

Current limitations

  • Assumes a single region deployment.