{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-cli/issues/2577","repository_url":"https://api.github.com/repos/aws/aws-cli","labels_url":"https://api.github.com/repos/aws/aws-cli/issues/2577/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-cli/issues/2577/comments","events_url":"https://api.github.com/repos/aws/aws-cli/issues/2577/events","html_url":"https://github.com/aws/aws-cli/issues/2577","id":225688029,"number":2577,"title":"AWS CLI retrieves HTML from an URL and puts it into the message body instead of just the URL. (SQS)","user":{"login":"Evert-Arends","id":16082595,"avatar_url":"https://avatars1.githubusercontent.com/u/16082595?v=3","gravatar_id":"","url":"https://api.github.com/users/Evert-Arends","html_url":"https://github.com/Evert-Arends","followers_url":"https://api.github.com/users/Evert-Arends/followers","following_url":"https://api.github.com/users/Evert-Arends/following{/other_user}","gists_url":"https://api.github.com/users/Evert-Arends/gists{/gist_id}","starred_url":"https://api.github.com/users/Evert-Arends/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evert-Arends/subscriptions","organizations_url":"https://api.github.com/users/Evert-Arends/orgs","repos_url":"https://api.github.com/users/Evert-Arends/repos","events_url":"https://api.github.com/users/Evert-Arends/events{/privacy}","received_events_url":"https://api.github.com/users/Evert-Arends/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-02T13:02:23Z","updated_at":"2017-05-03T16:33:25Z","closed_at":null,"body":"Hello,\r\n\r\nI found an interesting feature/bug which is not in the documentation of aws cli.\r\nI use \"aws sqs send-message\" to put a message into the queue, but the message body is an URL. Usually I would do that through python/node whatever, but for this specific situation I use bash, and of course aws cli. But as I stated, the message body consists of an URL (let's say http://www.bbc.com)\r\nnormally that would be the exact message, but aws cli chooses to retrieve the HTML from that URL.\r\n\r\nTo me it bothers me a lot, because of existing lambda functions that need to be changed, before they can work with the modified version (putting the url between '\"' solves the problem).\r\n\r\nTest command; aws sqs send-message --queue-url QUEUE URL HERE --message-body \"http://www.bbc.com\"\r\n\r\nAny one who can enlighten me in this particular situation?\r\n\r\nBest regards"},"comment":{"url":"https://api.github.com/repos/aws/aws-cli/issues/comments/298964947","html_url":"https://github.com/aws/aws-cli/issues/2577#issuecomment-298964947","issue_url":"https://api.github.com/repos/aws/aws-cli/issues/2577","id":298964947,"user":{"login":"kyleknap","id":4605355,"avatar_url":"https://avatars3.githubusercontent.com/u/4605355?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleknap","html_url":"https://github.com/kyleknap","followers_url":"https://api.github.com/users/kyleknap/followers","following_url":"https://api.github.com/users/kyleknap/following{/other_user}","gists_url":"https://api.github.com/users/kyleknap/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleknap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleknap/subscriptions","organizations_url":"https://api.github.com/users/kyleknap/orgs","repos_url":"https://api.github.com/users/kyleknap/repos","events_url":"https://api.github.com/users/kyleknap/events{/privacy}","received_events_url":"https://api.github.com/users/kyleknap/received_events","type":"User","site_admin":false},"created_at":"2017-05-03T16:33:25Z","updated_at":"2017-05-03T16:33:25Z","body":"So the reason you are seeing this is because it is a feature of the CLI that if a value starts with: ``http://`` or ``https://`` it will actually grab the contents for you and use the contents as the value it sends to the API.\r\n\r\nUnfortunately, there is no explicit option for turning this off. The best way to get around this would be to use ``--cli-input-json`` parameter and provide all of the parameters in a single file or to save the contents of the message in a file and provide the file to the ``--message`` parameter using the ``file://`` prefix.\r\n\r\nLet us know if that helps of if you have anymore questions."}}
{"actor":{"display_login":"kyleknap"}}