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 🙏

© 2024 – Pkg Stats / Ryan Hefner

aws-ecs-autoscaler

v0.1.7

Published

[![Build Status](https://img.shields.io/travis/JeffDownie/aws-ecs-autoscaler/master.svg)](https://travis-ci.org/JeffDownie/aws-ecs-autoscaler?branch=master) [![Coverage Status](https://img.shields.io/coveralls/JeffDownie/aws-ecs-autoscaler/master.svg)](ht

Downloads

17

Readme

AWS ECS Autoscaler

Build Status Coverage Status Npm Version

The AWS ECS Autoscaler keeps track of the cpu and memory requirements of the services running in an ECS cluster, and adjusts the desired capacity of the underlying AWS autoscaling group to minimize wastage. It can be run as a task in the ECS cluster itself, or on a separate management server.

Usage

In a cloudformation template, on the ECS cluster:

  Service:
    Properties:
      Cluster: my-cluster-name
      DesiredCount: 2
      TaskDefinition: !Ref AutoscalingTaskDefinition
    Type: AWS::ECS::Service

  AutoscalingTaskDefinition:
    Properties:
      ContainerDefinitions:
      - Environment:
        - Name: AS_GROUP_NAME
          Value: MY_AUSTOSCALING_GROUP_NAME
        - Name: CLUSTER_NAME
          Value: MY_CLUSTER_NAME
        - Name: AWS_REGION
          Value: !Ref "AWS::Region"
        Essential: true
        Image: !Sub trinitymirror/aws-ecs-autoscaler:${AutoscalingVersion}
        Memory: 200
        Cpu: 100
        Name: Autoscaler
    Type: AWS::ECS::TaskDefinition

And it would require the following permissions attached to the Austoscaling group's launch configuration iam role to run:

- Action:
  - autoscaling:DescribeAutoScalingGroups
  - autoscaling:SetDesiredCapacity
  - autoscaling:TerminateInstanceInAutoScalingGroup
  Effect: Allow
  Resource: '*'
- Action:
  - ecs:DescribeContainerInstances
  - ecs:DescribeServices
  - ecs:DescribeTaskDefinition
  - ecs:DescribeTasks
  - ecs:ListContainerInstances
  - ecs:ListServices
  - ecs:ListTasks
  Effect: Allow
  Resource: '*'
- Action:
  - ec2:DescribeInstances
  Effect: Allow
  Resource: '*'

Note that the autoscaling actions do require access to all resources, and cannot be limited to just your autoscaling group - this is a limitation of AWS autoscaling groups

Optional environment variables and their defaults:

DRY_RUN=false - When true, causes the container to not actually run any changes, just print to stdout what it would do. Default is false. INTERVAL=20000 - The interval that the container checks for changes to the cluster, in milliseconds. Default is 20000. MAX_LOOPS=20 - Maximum number of intervals to run before exiting, to avoid a memory leak in the AWS SDK. Default is 20.