aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
[AWS::AutoScaling::AutoScalingGroup] is not sending "AcceleratorCount" in the CreateAutoScalingGroup API Call.
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
AWS::AutoScaling::AutoScalingGroup
### Resource Name
_No response_
### Issue Description
This is a bug in `AWS::AutoScaling::AutoScalingGroup`
The resource `AWS::AutoScaling::AutoScalingGroup` is not sending "AcceleratorCount" in the `CreateAutoScalingGroup `API Call. Due to which the Property is not set on the AutoScalingGroup resource.
You can also check the output of `describe-auto-scaling-groups` CLI Call which will show that the `AcceleratorCount` is not set on the ASG Resource.
### Expected Behavior
`AcceleratorCount` should be set on the ASG, currently it's not set by CFN.
### Observed Behavior
After deploying the above template, if you see the `CreateAutoScalingGroup` API, there you will see that CFN isn't passing `AcceleratorCount`.
From the test case template only the below parameters are passed on the API Call.
```
"overrides": [
{
"instanceRequirements": {
"vCpuCount": {
"min": 1,
"max": 2
},
"memoryMiB": {
"min": 0
},
"instanceGenerations": [
"current"
],
"localStorageTypes": [
"ssd"
]
}
}
]
```
### Test Cases
For example, try deploying the below template which has AcceleratorCount as override
```
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
LatestAmiId:
Description: Region specific image from the Parameter Store
Type: 'AWS::SSM::Parameter::Value'
Default: '/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2'
InstanceType:
Description: Amazon EC2 instance type for the instances
Type: String
AllowedValues:
- t3.micro
- t3.small
- t3.medium
Default: t3.micro
Subnets:
Type: 'List'
Description: A list of subnets for the Auto Scaling group
Resources:
myLaunchTemplate:
Type: AWS::EC2::LaunchTemplate
Properties:
LaunchTemplateName: !Sub ${AWS::StackName}-launch-template
LaunchTemplateData:
ImageId: !Ref LatestAmiId
InstanceType: !Ref InstanceType
myASG:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
MaxSize: '1'
MinSize: '0'
DesiredCapacity: '1'
VPCZoneIdentifier: !Ref Subnets
MixedInstancesPolicy:
LaunchTemplate:
LaunchTemplateSpecification:
LaunchTemplateId: !Ref myLaunchTemplate
Version: !GetAtt myLaunchTemplate.LatestVersionNumber
Overrides:
- InstanceRequirements:
AcceleratorCount:
Max: 3
MemoryMiB:
Min: 0
InstanceGenerations:
- current
LocalStorageTypes:
- ssd
VCpuCount:
Max: 2
Min: 1
```
### Other Details
_No response_
Contributor guide
Research direction
Start by deploying the supplied CloudFormation template and inspect the CreateAutoScalingGroup API call, then use the describe-auto-scaling-groups CLI call to confirm the missing AcceleratorCount value. Done means the Auto Scaling group receives and reports the AcceleratorCount override when the template is deployed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100