# How do you bring down capacity once metrics drop?

**URL:** <https://awshq.com/t/how-do-you-bring-down-capacity-once-metrics-drop/17171>\
**Category:** AWS Cloud Talk\
**Tags:** sqs\
**Created:** [September 10, 2023, 7:33am UTC](https://awshq.com/t/how-do-you-bring-down-capacity-once-metrics-drop/17171 "2023-09-10T07:33:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![notDonaldGlover2](https://awshq.com/letter_avatar_proxy/v4/letter/n/b5a626/32.png) [@notDonaldGlover2](https://awshq.com/u/notDonaldGlover2)\
**Post date:** [September 10, 2023, 7:33am UTC](https://awshq.com/t/how-do-you-bring-down-capacity-once-metrics-drop/17171/1 "2023-09-10T07:33:47Z")

</div>

I have an SQS queue and set an alarm that once it reaches passes 1000 messages scale up my ASG group. This works as expected but once the messages clear, how do I trigger the reduction of the capacity in the group?

* * *

**Related discussions:**

- [Dissapearing messages in Kinesis/EventBridge/SQS](https://awshq.com/t/dissapearing-messages-in-kinesis-eventbridge-sqs/21226)
- [AWS Lambda triggered twice for single SQS batch from S3 event notifications — why and how to avoid?](https://awshq.com/t/aws-lambda-triggered-twice-for-single-sqs-batch-from-s3-event-notifications-why-and-how-to-avoid/20073)
- [Light architecture for sending out emails, notifications etc.?](https://awshq.com/t/light-architecture-for-sending-out-emails-notifications-etc/19838)
- [Alternatives to Elastic Beanstalk?](https://awshq.com/t/alternatives-to-elastic-beanstalk/15012)
- [Scaling ECS with SQS](https://awshq.com/t/scaling-ecs-with-sqs/19761)

---

<div class="post-metadata">

**Author:** ![SubtleDee](https://awshq.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@SubtleDee](https://awshq.com/u/SubtleDee)\
**Post date:** [September 10, 2023, 9:05am UTC](https://awshq.com/t/how-do-you-bring-down-capacity-once-metrics-drop/17171/2 "2023-09-10T09:05:12Z")

</div>

Rather than scaling up once you hit a specific value, you might be better using a target tracking policy as per [this article](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-using-sqs-queue.html).

---

<div class="post-metadata">

**Author:** ![NeuralFantasy](https://awshq.com/letter_avatar_proxy/v4/letter/n/a587f6/32.png) [@NeuralFantasy](https://awshq.com/u/NeuralFantasy)\
**Post date:** [September 10, 2023, 9:05am UTC](https://awshq.com/t/how-do-you-bring-down-capacity-once-metrics-drop/17171/3 "2023-09-10T09:05:54Z")

</div>

I suggest you familiarize yourself with the multiple dynamic scaling options AWS has: _simple scaling_, _step scaling_ and _target tracking scaling_.

[https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html)

Yes, if you use simple or step scaling, you need two policies. If target tracking, one is enough.

---

<div class="post-metadata">

**Author:** ![RequirementOne79](https://awshq.com/letter_avatar_proxy/v4/letter/r/ed655f/32.png) [@RequirementOne79](https://awshq.com/u/RequirementOne79)\
**Post date:** [September 10, 2023, 9:30am UTC](https://awshq.com/t/how-do-you-bring-down-capacity-once-metrics-drop/17171/4 "2023-09-10T09:30:46Z")

</div>

Since you’re already familiar with alarms, there’s nothing wrong with having a scale down alarm
