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>-Context <String>-DefaultCooldown <Int32>-DefaultInstanceWarmup <Int32>-DesiredCapacity <Int32>-DesiredCapacityType <String>-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[]>-TrafficSource <TrafficSourceIdentifier[]>-LaunchTemplate_Version <String>-VPCZoneIdentifier <String>-Select <String>-PassThru <SwitchParameter>-Force <SwitchParameter>-ClientConfig <AmazonAutoScalingConfig>
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
property, or for attaching a network interface when an existing network interface ID is specified in a launch template. Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | AvailabilityZones |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
300
seconds Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
InService
state. During an instance refresh, Amazon EC2 Auto Scaling waits for the warm-up period after it replaces an instance before it moves on to replacing the next instance. Amazon EC2 Auto Scaling also waits for the warm-up period before aggregating the metrics for new instances with existing instances in the Amazon CloudWatch metrics that are used for scaling, resulting in more reliable usage data. For more information, see Set the default instance warmup for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.-1
for the value. However, we strongly recommend keeping the default instance warmup enabled by specifying a value of 0
or other nominal value.Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
DesiredCapacityType
for attribute-based instance type selection only. For more information, see Creating an Auto Scaling group using attribute-based instance type selection in the Amazon EC2 Auto Scaling User Guide.By default, Amazon EC2 Auto Scaling specifies units
, which translates into number of instances.Valid values: units
| vcpu
| memory-mib
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
InService
state. For more information, see Set the health check grace period for an Auto Scaling group in the Amazon EC2 Auto Scaling User Guide.Default: 0
seconds Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
EC2
(default), ELB
, and VPC_LATTICE
. The VPC_LATTICE
health check type is reserved for use with VPC Lattice, which is in preview release and is subject to change. 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) |
AWSServiceRoleForAutoScaling
, which it creates if it does not exist. For more information, see Service-linked roles 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) |
Aliases | Tags |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Default
| AllocationStrategy
| ClosestToNextInstanceHour
| NewestInstance
| OldestInstance
| OldestLaunchConfiguration
| OldestLaunchTemplate
| arn:aws:lambda:region:account-id:function:my-function:my-alias
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | TerminationPolicies |
Required? | False |
Position? | Named |
Accept pipeline input? | True (ByPropertyName) |
Aliases | TrafficSources |
VPCZoneIdentifier
with AvailabilityZones
, the subnets that you specify must reside in those Availability Zones. 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 |
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