diff --git a/lib/ansible/modules/cloud/amazon/ec2_snapshot_facts.py b/lib/ansible/modules/cloud/amazon/ec2_snapshot_facts.py index 1b15089084..a4c8e8a66f 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_snapshot_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_snapshot_facts.py @@ -185,8 +185,8 @@ from ansible.module_utils.ec2 import (ansible_dict_to_boto3_filter_list, def list_ec2_snapshots(connection, module): snapshot_ids = module.params.get("snapshot_ids") - owner_ids = map(str, module.params.get("owner_ids")) - restorable_by_user_ids = module.params.get("restorable_by_user_ids") + owner_ids = [str(owner_id) for owner_id in module.params.get("owner_ids")] + restorable_by_user_ids = [str(user_id) for user_id in module.params.get("restorable_by_user_ids")] filters = ansible_dict_to_boto3_filter_list(module.params.get("filters")) try: