From fc32a79139b9a33bba725b1f1d9c37908a131f92 Mon Sep 17 00:00:00 2001 From: cpitchford Date: Wed, 16 May 2018 18:13:44 +0100 Subject: [PATCH 1/2] New line in LaunchConfigurationARN statement The statement that defines LaunchConfigurationARN had a newline and whitespace prefix The ARN reported in describe_launch_configurations has this newline and white space. Arns should not have whitespace or newlines! --- moto/autoscaling/responses.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/moto/autoscaling/responses.py b/moto/autoscaling/responses.py index c7170e17e..be7f2627a 100644 --- a/moto/autoscaling/responses.py +++ b/moto/autoscaling/responses.py @@ -320,8 +320,7 @@ DESCRIBE_LAUNCH_CONFIGURATIONS_TEMPLATE = """ {% endif %} {{ launch_configuration.instance_type }} - arn:aws:autoscaling:us-east-1:803981987763:launchConfiguration: - 9dbbbf87-6141-428a-a409-0752edbe6cad:launchConfigurationName/{{ launch_configuration.name }} + arn:aws:autoscaling:us-east-1:803981987763:launchConfiguration:9dbbbf87-6141-428a-a409-0752edbe6cad:launchConfigurationName/{{ launch_configuration.name }} {% if launch_configuration.block_device_mappings %} {% for mount_point, mapping in launch_configuration.block_device_mappings.items() %} From ffc2f4ca059eeaeebeb7c82c613bbc741a6ba385 Mon Sep 17 00:00:00 2001 From: cpitchford Date: Wed, 16 May 2018 18:46:50 +0100 Subject: [PATCH 2/2] Spaces also exist in AutoScalingGroupARN AutoScalingGroupARN has whitespace and newline that leaks into describe_auto_scaling_groups --- moto/autoscaling/responses.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/moto/autoscaling/responses.py b/moto/autoscaling/responses.py index be7f2627a..5586c51dd 100644 --- a/moto/autoscaling/responses.py +++ b/moto/autoscaling/responses.py @@ -516,8 +516,7 @@ DESCRIBE_AUTOSCALING_GROUPS_TEMPLATE = """{{ group.health_check_period }} {{ group.default_cooldown }} - arn:aws:autoscaling:us-east-1:803981987763:autoScalingGroup:ca861182-c8f9-4ca7-b1eb-cd35505f5ebb - :autoScalingGroupName/{{ group.name }} + arn:aws:autoscaling:us-east-1:803981987763:autoScalingGroup:ca861182-c8f9-4ca7-b1eb-cd35505f5ebb:autoScalingGroupName/{{ group.name }} {% if group.termination_policies %} {% for policy in group.termination_policies %}