From 994ab9aadf23e4d4f4f64bb582a73848a9113416 Mon Sep 17 00:00:00 2001 From: Bert Blommers Date: Tue, 10 Mar 2020 12:42:18 +0000 Subject: [PATCH] #718 - EC2 - Guarantee order when filtering tags from querystring --- moto/ec2/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moto/ec2/utils.py b/moto/ec2/utils.py index 18a038b10..74fe3d27b 100644 --- a/moto/ec2/utils.py +++ b/moto/ec2/utils.py @@ -253,7 +253,7 @@ def dhcp_configuration_from_querystring(querystring, option="DhcpConfiguration") def filters_from_querystring(querystring_dict): response_values = {} last_tag_key = None - for key, value in querystring_dict.items(): + for key, value in sorted(querystring_dict.items()): match = re.search(r"Filter.(\d).Name", key) if match: filter_index = match.groups()[0]