SSM.Client.get_document output returns carriage returns instead of new lines, makes document content unusable. #4294
Labels
bug
This issue is a confirmed bug.
closed-for-staleness
p2
This is a standard priority issue
response-requested
Waiting on additional information or feedback.
ssm
Describe the bug
SSM.Client.get_document output returns carriage returns instead of new lines, makes document content unusable.
Regression Issue
Expected Behavior
Script:
import boto3
client = boto3.client('ssm')
response = client.get_document(Name='AWSConfigRemediation-CancelKeyDeletion', DocumentFormat='YAML')
print(response)
Expected output:
schemaVersion: "0.3"
description: |
Document name - AWSConfigRemediation-CancelKeyDeletion
What does this document do?
This document cancels the deletion of specified AWS customer master key (CMK) using CancelKeyDeletion API.
Input Parameters
Output Parameters
assumeRole: "{{ AutomationAssumeRole }}"
parameters:
AutomationAssumeRole:
type: AWS::IAM::Role::Arn
description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf.
KeyId:
type: String
description: (Required) The ID of the CMK you want to cancel deletion for.
allowedPattern: ^([a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}|arn:(aws[a-zA-Z-]*)?:kms:[a-z0-9-]+:[0-9]{12}:key/)?[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
...etc
Current Behavior
{'Name': 'AWSConfigRemediation-CancelKeyDeletion', 'CreatedDate': datetime.datetime(2023, 9, 13, 8, 7, 5, 873000, tzinfo=tzlocal()), 'DocumentVersion': '3', 'Status': 'Active', 'Content': 'schemaVersion: "0.3"\ndescription: |\n ### Document name - AWSConfigRemediation-CancelKeyDeletion\n\n ## What does this document do?\n This document cancels the deletion of specified AWS customer master key (CMK) using [CancelKeyDeletion](https://doc (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf.\n * KeyId: (Required) The ID of the CMK you want to cancel deletion for.\n\n ## Output Parameters\n * CancelKeyDeletion.CancelKeyDeletionResponse: The standard HTTP response from the CancelKeyDeletion API.\n\nassumeRole: "{{ AutomationAssumeRole }}"\nparameters:\n AutomationAssumeRole:\n type: AWS::IAM::Role::Arn\n description: (Required) The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that allows Systems Manager Automation to perform the actions on your behalf.\n KeyId:\n type: String\n description: (Required) The ID of the CMK you want to cancel deletion for.\n allowedPattern: ^([a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}|arn:(aws[a-zA-Z-]*)?:kms:[a-z0-9-]+:[0-9]{12}:key/)?[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
...etc
Reproduction Steps
Always same result.
Possible Solution
No response
Additional Information/Context
No response
SDK version used
1.35.32
Environment details (OS name and version, etc.)
WSL Ubuntu, Amazon Linux 2
The text was updated successfully, but these errors were encountered: