Ben Southgate
Ben Southgate

Reputation: 3818

AWS cloudwatch custom metric as elastic beanstalk autoscale trigger

I am publishing a custom cloudwatch metric using the nodejs aws sdk. The metric successfully shows up in the cloudwatch admin console. However, it does not show up among the scaling trigger options for my elastic beanstalk environment. Is it possible to configure elastic beanstalk to use the custom metric as a scaling trigger using the aws cli, .ebextensions, or something else?

Upvotes: 6

Views: 1603

Answers (2)

Ben Southgate
Ben Southgate

Reputation: 3818

I ended up creating a alarm through the cloudwatch console, and having the alarm trigger autoscaling events for the correct autoscaling group.

More info: https://aws.amazon.com/premiumsupport/knowledge-center/auto-scaling-cloudwatch/

Upvotes: 2

Piyush Patil
Piyush Patil

Reputation: 14543

Currently you cannot add custom metrics for autoscaling in beanstalk from beanstalk dashboard.

You have to implement a workaround for this using the Auto Scaling command line tools and the CloudWatch command line.

Here is one good case study you can refer to which implemented a custom metric to autoscale in a beanstalk environment.

http://blog.cbeer.info/2016/autoscaling-elasticbeanstalk-workers-sqs-length/

Upvotes: 5

Related Questions