Skip to content

AWS CLI throws error while pulling a json file #6860

@ravisinha0506

Description

@ravisinha0506

Describe the bug

AWS CLI ( aws-cli/2.4.15 Python/3.8.8 Darwin/19.6.0 exe/x86_64 prompt/off ) fails while executing below command:

aws ssm create-document --name "EKSLogCollector" --document-type "Command" --content https://raw.githubusercontent.com/awslabs/amazon-eks-ami/master/log-collector-script/linux/eks-ssm-content.json

and fails with error:

An error occurred (InvalidDocumentContent) when calling the CreateDocument operation: JSON not well-formed. at Line: 1, Column: 6

However, the same command works fine when the file is provided locally like this:

aws ssm create-document --name "EKSLogCollector" --document-type "Command" --content file:///Users/$user/Documents/eks-ssm-content.json

Expected Behavior

AWS CLI shouldn't fail while pulling the JSON file.

Current Behavior

Currently it fails with below error:

 JSON not well-formed. at Line: 1, Column: 6

Reproduction Steps

Install CLI version aws-cli/2.4.15 Python/3.8.8 Darwin/19.6.0 exe/x86_64 prompt/off and execute below commands:

aws ssm create-document --name "EKSLogCollector" --document-type "Command" --content file:///Users/$user/Documents/eks-ssm-content.json

Possible Solution

No response

Additional Information/Context

No response

CLI version used

aws-cli/2.4.15 Python/3.8.8 Darwin/19.6.0 exe/x86_64 prompt/off

Environment details (OS name and version, etc.)

Mac OS Catalina ( 10.15.7 )

Metadata

Metadata

Assignees

Labels

guidanceQuestion that needs advice or information.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions