From 7aaa5da41d802367fe4ed42c623cfc45467f5532 Mon Sep 17 00:00:00 2001 From: Jon Cormier Date: Fri, 14 Sep 2018 15:17:15 -0400 Subject: [PATCH] [aws_ssm_parameter_store] use describe_parameters paginator (#45632) Fix the service reaching an internal limit while processing the results and returning unexpected data --- lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py b/lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py index f075456a66..7265dfda79 100644 --- a/lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py +++ b/lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py @@ -185,7 +185,10 @@ def create_update_parameter(client, module): # Description field not available from get_parameter function so get it from describe_parameters describe_existing_parameter = None try: - describe_existing_parameter = client.describe_parameters(Filters=[{"Key": "Name", "Values": [args['Name']]}]) + describe_existing_parameter_paginator = client.get_paginator('describe_parameters') + describe_existing_parameter = describe_existing_parameter_paginator.paginate( + Filters=[{"Key": "Name", "Values": [args['Name']]}]).build_full_result() + except ClientError as e: module.fail_json_aws(e, msg="getting description value")