Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't pass URL to --content #1227

Merged
merged 1 commit into from
Mar 22, 2023
Merged

Don't pass URL to --content #1227

merged 1 commit into from
Mar 22, 2023

Conversation

cartermckinnon
Copy link
Member

@cartermckinnon cartermckinnon commented Mar 22, 2023

Description of changes:

The --content flag on aws ssm create-document no longer supports http(s):// URIs on recent CLI versions.

All AWS CLI parameters support the file:// scheme, so this switches to that: https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-file.html#cli-usage-parameters-file-how

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Testing Done

CLI version:

> aws --version
aws-cli/2.9.23 Python/3.9.11 Darwin/22.3.0 exe/x86_64 prompt/off

Doesn't work:

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


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

Works:

> curl -O https://raw.githubusercontent.com/awslabs/amazon-eks-ami/master/log-collector-script/linux/eks-ssm-content.json
> aws ssm create-document \
>   --name "EKSLogCollectorLinux" \
>   --document-type "Command" \
>   --content file://eks-ssm-content.json

@cartermckinnon cartermckinnon merged commit 1d17dd0 into master Mar 22, 2023
@cartermckinnon cartermckinnon deleted the ssm-example-update branch March 22, 2023 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants