ASG
Definition
ASG stands for Auto Scaling Group, a feature in cloud computing environments such as AWS that automatically adjusts the number of compute resources, like EC2 instances, based on demand. This helps maintain application availability and optimize costs by scaling resources up or down according to predefined conditions or metrics, such as CPU utilization or request count.
Secure Settings Example
Resources:
MyAutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
MinSize: 2
MaxSize: 10
DesiredCapacity: 4
VPCZoneIdentifier:
- subnet-12345678
LaunchConfigurationName: MyLaunchConfig
HealthCheckType: EC2
HealthCheckGracePeriod: 300
Tags:
- Key: Name
Value: MySecureASG
PropagateAtLaunch: true
TerminationPolicies:
- "OldestInstance"
- "ClosestToNextInstanceHour"
Insecure Settings Example
Resources:
MyAutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
MinSize: 0
MaxSize: 100
DesiredCapacity: 0
VPCZoneIdentifier:
- subnet-12345678
LaunchConfigurationName: MyLaunchConfig
HealthCheckType: ELB
HealthCheckGracePeriod: 0
Tags:
- Key: Name
Value: MyInsecureASG
PropagateAtLaunch: false
TerminationPolicies:
- "NewestInstance"