diff --git a/moto/route53/responses.py b/moto/route53/responses.py index 55160922e..50fe79b5e 100644 --- a/moto/route53/responses.py +++ b/moto/route53/responses.py @@ -45,7 +45,12 @@ def rrset_response(request, full_url, headers): if method == "POST": elements = xmltodict.parse(request.body) - for key, value in elements['ChangeResourceRecordSetsRequest']['ChangeBatch']['Changes'].items(): + + change_list = elements['ChangeResourceRecordSetsRequest']['ChangeBatch']['Changes']['Change'] + if not isinstance(change_list, list): + change_list = [elements['ChangeResourceRecordSetsRequest']['ChangeBatch']['Changes']['Change']] + + for value in change_list: action = value['Action'] rrset = value['ResourceRecordSet']