can only scale in response to metrics in and most of the default metrics are not sufficient for . That’s why you need to publish your custom metrics to CloudWatch. AWS Autoscaling Groups CloudWatch predictive scaling I was surfing the internet as usual, and I couldn’t find any post talking about how to publish custom metrics to AWS CloudWatch, and because I’m a , I got my hand dirty and I wrote my own script in Go. Gopher You can publish your own metrics to using the : CloudWatch AWS Go SDK To collect metrics about memory for example, you can either parse output of command ‘ or use a third-party library like : free -m’ gopsutil The object expose multiple metrics: memoryMetrics Memory used Memory available Buffers Swap cached Page Tables etc Each metric will be published with an . To get the instance id, you can query the : InstanceID dimension meta-data What if I’m not a ? well, don’t freak out, I built a simple which doesn’t require any knowledge or dependencies to be installed ( requires Perl dependencies) and moreover it’s cross-platform. Gopher CLI Go AWS CloudWatch Monitoring Scripts The CLI collects the following metrics: : utilization, used, available. Memory : utilization, used, free. Swap : utilization, used, available. Disk : packets in/out, bytes in/out, errors in/out. Network : memory & cpu per container. Docker The have been tested on instances using the following (64-bit versions): CLI AMIs Amazon Linux Amazon Linux 2 Ubuntu 16.04 Microsoft Windows Server To get started, find the for your instance and download it. For linux: appropriate package After you install the CLI, you may need to add the path to the executable file to your variable. Then, issue the following command: PATH mon-put-instance-data — memory — swap — network — docker — interval 1 The command above will collect , , & resource utilization on the current system. memory swap network docker containers Note: ensure an is associated with your instance, verify that it grants permission to perform . IAM role cloudwatch:PutMetricData Now that we’ve written custom metrics to . You can view statistical graphs of your published metrics with the : CloudWatch AWS Management Console You can create your own interactive and dynamic based on these metrics: Dashboard Hope it helps ! The CLI is still in its early stages, so you are welcome to contribute to the project on . GitHub