Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

cmoore1776/ecs-optimizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ecs-optimizer

Recommendations for ECS service memory allocation based on CloudWatch Metrics.

Installation

npm install --global ecs-optimizer

Usage

$ ecs-optimizer --help

  Usage: ecs-optimizer [options]

  Options:

    -V, --version                   output the version number
    -r, --region [region]           AWS region (required)
    -c, --cluster [cluster]         ECS cluster (required)
    -p, --percentage [percentage]   Target percentage memory utilization for services (default: 75)
    -t, --type [type]               Type of metric for utilization analyze (CPUUtilization or MemoryUtilization) (default: "MemoryUtilization")
    -h, --help                      output usage information

Example output

$ ecs-optimizer --region us-east-1 --cluster my-ecs-cluster --percentage 75

Validating AWS credentials...
=> Logged in as arn:aws:sts::12345678910:assumed-role/role/nickname

Enumerating services in cluster: my-ecs-cluster...
=> Done.

Enumerating all available ECS utilization metrics...
=> Done.

Fetching statistics for active services...
=> Done.

Calculating maximum metric usage over last 24 hours...
=> Done.

Looking up task defintions for services...
=> Done.

Looking for improvements...
┌──────────────────────────┬──────────┬─────────┬──────────┐
│ Service                  │ Max Used │ Current │ Proposed │
├──────────────────────────┼──────────┼─────────┼──────────┤
│ service-a                │ 59%      │ 128     │ 112      │
├──────────────────────────┼──────────┼─────────┼──────────┤
│ service-b                │ 77%      │ 112     │ 112      │
├──────────────────────────┼──────────┼─────────┼──────────┤
│ service-c                │ 22%      │ 64      │ 32       │
├──────────────────────────┼──────────┼─────────┼──────────┤
│ service-d                │ 38%      │ 256     │ 144      │
├──────────────────────────┼──────────┼─────────┼──────────┤
│ service-e                │ 82%      │ 128     │ 144      │
└──────────────────────────┴──────────┴─────────┴──────────┘

About

Recommendations for ECS service memory allocation based on CloudWatch Metrics

Resources

License

Stars

Watchers

Forks

Packages

No packages published