Jump to
- AWS Auto Scaling Custom Resources - aws/aws-auto-scaling-custom-resource
- Choosing the right health check with Elastic Load Balancing and EC2 Auto Scaling, AWS, 11 Apr 2023
- There are three strategies to measure instance health:
- liveness checks,
- local health checks (or shallow health checks), and
- dependency health checks (or deep health checks).
- See also Implementing health checks
- There are three strategies to measure instance health:
- AWS scaling options - AWS Auto Scaling vs. Amazon EC2 Auto Scaling vs. Auto Scaling for Other Services
- See "Q. How is AWS Auto Scaling different than the scaling capabilities for individual services?" in https://aws.amazon.com/autoscaling/faqs/
ℹ️ The cron expression formats used in AWS::AutoScaling::ScheduledAction
and AWS::ApplicationAutoScaling::ScalableTarget
are different.
- For ASG /
AWS::AutoScaling::ScheduledAction
(see details):[Minute] [Hour] [DayOfMonth] [MonthOfYear] [DayOfWeek]
- For Fargate /
AWS::ApplicationAutoScaling::ScalableTarget
(see details):cron(Minutes Hours DayOfMonth Month DayOfWeek Year)
- AWS::ApplicationAutoScaling::ScalableTarget
- CLI https://gist.github.com/toricls/fea9d8a4eb606a27f6666a1abc6a6fd8
- Doc https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scheduled-scaling.html
- AWS::AutoScaling::ScheduledAction
- CLI https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-scheduled-scaling.html#create-sch-actions-aws-cli
As desired = running + pending - terminating
,
but scaling calculates only use running
, so it can get into race conditions when setting desired
out of band.
Possible solutions:
- Include
ScalingSuspend
andScalingResume
calls around any pre-scaling tasks. - Use scaling policy to scale up/down, instead of setting
desired
count.