AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
New-ASAutoScalingGroup-AutoScalingGroupName <String>-LaunchConfigurationName <String>-MinSize <Int32>-MaxSize <Int32>-AvailabilityZone <String[]>-CapacityRebalance <Boolean>-DefaultCooldown <Int32>-DesiredCapacity <Int32>-HealthCheckGracePeriod <Int32>-HealthCheckType <String>-InstanceId <String>-LaunchTemplate_LaunchTemplateId <String>-LaunchTemplate_LaunchTemplateName <String>-LifecycleHookSpecificationList <LifecycleHookSpecification[]>-LoadBalancerName <String[]>-MaxInstanceLifetime <Int32>-MixedInstancesPolicy <MixedInstancesPolicy>-NewInstancesProtectedFromScaleIn <Boolean>-PlacementGroup <String>-ServiceLinkedRoleARN <String>-Tag <Tag[]>-TargetGroupARNs <String[]>-TerminationPolicy <String[]>-LaunchTemplate_Version <String>-VPCZoneIdentifier <String>-Select <String>-PassThru <SwitchParameter>-Force <SwitchParameter>
DesiredCapacity
, MaxSize
, and MinSize
). Usually, you set these sizes based on a specific number of instances. However, if you configure a mixed instances policy that defines weights for the instance types, you must specify these sizes with the same units that you use for weighting instances. Required? | True |
Position? | 1 |
Accept pipeline input? | True (ByValue, ByPropertyName) |
VPCZoneIdentifier
.Conditional: If your account supports EC2-Classic and VPC, this parameter is required to launch instances into EC2-Classic. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AvailabilityZones |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
300
. This setting applies when using simple scaling policies, but not when using other scaling policies or scheduled scaling. For more information, see Scaling cooldowns for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
0
. For more information, see Health check grace period in the Amazon EC2 Auto Scaling User Guide.Conditional: Required if you are adding an ELB
health check. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
EC2
(default) and ELB
. If you configure an Auto Scaling group to use load balancer (ELB) health checks, it considers the instance unhealthy if it fails either the EC2 status checks or the load balancer health checks. For more information, see Health checks for Auto Scaling instances in the Amazon EC2 Auto Scaling User Guide. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
LaunchTemplate
or MixedInstancesPolicy
) or a launch configuration (LaunchConfigurationName
or InstanceId
). Required? | False |
Position? | 2 |
Accept pipeline input? | True (ByPropertyName) |
LaunchTemplateId
or a LaunchTemplateName
. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
LaunchTemplateId
or a LaunchTemplateName
. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
$Latest
, or $Default
. To get the version number, use the Amazon EC2 DescribeLaunchTemplateVersions API operation. New launch template versions can be created using the Amazon EC2 CreateLaunchTemplateVersion API. If the value is $Latest
, Amazon EC2 Auto Scaling selects the latest version of the launch template when launching instances. If the value is $Default
, Amazon EC2 Auto Scaling selects the default version of the launch template when launching instances. The default value is $Default
. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
TargetGroupARNs
property instead. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | LoadBalancerNames |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
MaxSize
to meet your capacity requirements. In this event, Amazon EC2 Auto Scaling will never go above MaxSize
by more than your largest instance weight (weights that define how many units each instance contributes to the desired capacity of the group). Required? | True |
Position? | 4 |
Accept pipeline input? | True (ByPropertyName) |
Required? | True |
Position? | 3 |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | Tags |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | TerminationPolicies |
VPCZoneIdentifier
with AvailabilityZones
, the subnets that you specify for this parameter must reside in those Availability Zones.Conditional: If your account supports EC2-Classic and VPC, this parameter is required to launch instances into a VPC. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AK |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByValue, ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AWSProfilesLocation, ProfilesLocation |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | StoredCredentials, AWSProfileName |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | RegionToCall |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | SK, SecretAccessKey |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | ST |
PS C:\> New-ASAutoScalingGroup -AutoScalingGroupName my-asg -LaunchConfigurationName my-lc -MinSize 2 -MaxSize 6 -AvailabilityZone @("us-west-2a", "us-west-2b")This example creates an Auto Scaling group with the specified name and attributes. The default desired capacity is the minimum size. Therefore, this Auto Scaling group launches two instances, one in each of the specified two Availability Zones.
AWS Tools for PowerShell: 2.x.y.z