String starting with 0 ("0xx..") is taken as integer with "aws cloudformation package" command #6908
Labels
bug
This issue is a bug.
cloudformation package-deploy
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
While creating a package using
aws cloudformation package
command and then using theaws cloudformation create-stack
command using to create the packaged template leads to take a string parameter starting with "0" as string. This happens only withaws-cli/1.23.1
(likely with aws-cli 1.x versions asaws-cli/1.23.1
is a fairly new version at present).Expected Behavior
The parameter stored should be the account ID as it is: 012345678901
Current Behavior
The string is being stored as a number with scientific notation.
Reproduction Steps
Use a Template with parameter starting with "0":
Package command:
aws cloudformation package --template-file parameter.yaml --s3-bucket bucket-name --output-template-file packaged-template.yaml
Stack creation:
aws cloudformation create-stack --stack-name myteststack --template-body file://packaged-template.yaml
Possible Solution
A workaround at present is to use the
--use-json
option to format the output template as json.Additional Information/Context
No response
CLI version used
aws-cli/1.23.1
Environment details (OS name and version, etc.)
Mac OS
The text was updated successfully, but these errors were encountered: