aws autoscaling
& ASG Console: Inconsistent Handling of Decimal Places in Spot Instance Prices
#9133
Labels
autoscaling
bug
This issue is a bug.
p2
This is a standard priority issue
service-api
This issue is due to a problem in a service API, not the SDK implementation.
Describe the bug
An attempt to launch a new EC2 spot instance from launch template fails when the spot instance price is formatted with three decimal places followed by zeros (e.g., "0.000700"). However, the price format with three significant digits followed by zeros (e.g., "0.007000") is accepted without issues. This inconsistency in decimal place validation is causing confusion and preventing successful instance launches.
During launch template creation, there are no errors or warnings related to this.
Regression Issue
Expected Behavior
The EC2 spot instance should launch successfully regardless of the decimal place format, as long as the numerical value is valid.
If value is not considered correct, it should give a warning/error message.
Current Behavior
The EC2 launch process from an auto scaling group fails when the price is formatted with three decimal places followed by zeros (e.g., "0.000700"), but succeeds when formatted with three significant digits followed by zeros (e.g., "0.007000").
Reproduction Steps
Create a launch template. Specify the spot instance with max price as "0.000100".
Scale desired or max capacity in the auto scaling group to attempt to launch a new EC2 spot instance.
Observe the failure message indicating that the price is invalid with
aws autoscaling describe-scaling-activities
or from console > ec2> auto scaling groups > select group > acivities.To make it work:
Change the spot instance max price to "0.001000" from the launch template.
Update ASG.
Observe that the instance launches successfully from ASG.
Possible Solution
Not a CLI issue but AWS api
Additional Information/Context
No response
CLI version used
aws-cli/2.22.8 Python/3.12.6 Darwin/21.6.0 exe/x86_64
Environment details (OS name and version, etc.)
M1 - ProductName: macOS ProductVersion: 12.7.4 BuildVersion: 21H1123
The text was updated successfully, but these errors were encountered: