-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
parameter containing uri string is interpreted as uri parameter #630
Comments
I agree with your general comment, which is that there should be some way to escape the URI param processing if you want to specify the literal URI string as the value for the parameter. However, in some shells (such as bash), the shell strips the quotes for an argument before the process is able to access the arguments. For example:
This means that it's not possible to tell which values were originally quoted. If we were to implement this, you'd have to escape the quotes in the shell, which doesn't look quite as nice:
Perhaps there's some other way a user can specify that an argument not the URI contents? Maybe we could prefix the value with some character? Otherwise we could implement the quotes check provided that users are fine with escaping the quotes in the shell. |
Has anything been done to remedy this? It still remains an issue I believe. If anyone has a workaround other than creating a txt file with the value I would appreciate it |
this is way way way too magical. please have an option to disable this. |
switching to https://www.npmjs.com/package/kms-cli for now |
fyi, for ssm put-parameter param, i found a workaround using the --cli-input-json, that i'm guessing will work for the ec2 command as well:
|
This just blind-sided me again, even though I supposedly knew about it, having commented on a related issue before. So here I am at nearly midnight and it's blocking a production push while I try to find a reasonable workaround. I bet this is implicated in more than a couple Sev 2's. Please fix it, the current behaviour is just too surprising and potentially dangerous. The quotes idea is misguided though. It should just never fetch the contents of the URL. If that behaviour is desired in some (hard to imagine) situation, then add a different option to do so. Yes I realise backward compatibility is impaired. That's just how bad an idea it was in the first place. Even more astonishing is that it's not even documented. On the upside, this should really give carte blanche to breaking scripts. |
Good Morning! We're closing this issue here on GitHub, as part of our migration to UserVoice for feature requests involving the AWS CLI. This will let us get the most important features to you, by making it easier to search for and show support for the features you care the most about, without diluting the conversation with bug reports. As a quick UserVoice primer (if not already familiar): after an idea is posted, people can vote on the ideas, and the product team will be responding directly to the most popular suggestions. We’ve imported existing feature requests from GitHub - Search for this issue there! And don't worry, this issue will still exist on GitHub for posterity's sake. As it’s a text-only import of the original post into UserVoice, we’ll still be keeping in mind the comments and discussion that already exist here on the GitHub issue. GitHub will remain the channel for reporting bugs. Once again, this issue can now be found by searching for the title on: https://aws.uservoice.com/forums/598381-aws-command-line-interface -The AWS SDKs & Tools Team This entry can specifically be found on UserVoice at: https://aws.uservoice.com/forums/598381-aws-command-line-interface/suggestions/33168802-parameter-containing-uri-string-is-interpreted-as |
Adding direct link: https://aws.uservoice.com/forums/598381-aws-command-line-interface |
@ASayre could you please provide a direct link to this feature request in UserVoice so that people finding this issue in an internet search can easily navigate there and up-vote. Thanks |
Based on community feedback, we have decided to return feature requests to GitHub issues. |
This is one of those "features" that's such a horrible idea, it's surprising it's not fixed. The feature should have had some kind of prefix like fetch-url:http://example.com. For now there should be a way of turning it off at least by some kind of environment variable. Ideally it would be off by default and could be turned on for those who actually use it. |
Per #1475 (comment) the workaround is to put your URL value in a file and pass it via
|
This has now been fixed. A new configuration option called In your
See the documentation for more details. |
Great to hear! |
In addition to the configuration mentioned by @rosswilson, this functionality has been entirely removed in the AWS CLI v2. |
|
* fix: Functional tests must run on localhost to work in Windows (aws#552) * fix: spacing typo in Log statement in start-lambda (aws#559) * docs: Fix syntax highlighting in README.md (aws#561) * docs: Change jest to mocha in Nodejs init README (aws#564) * docs: Fix @mhart link in README (aws#562) * docs(README): removed cloudtrail, added SNS to generate-event (aws#569) * docs: Update repo name references (aws#577) * feat(debugging): Fixing issues around debugging Golang functions. (aws#565) * fix(init): Improve current init samples around docs and fixes (aws#558) * docs(README): Update launch config to SAM CLI from SAM Local (aws#587) * docs(README): Update sample code for calling Local Lambda Invoke (aws#584) * refactor(init): renamed handler for camel case, moved callback call up (aws#586) * chore: aws-lambda-java-core 1.1.0 -> 1.2.0 for java sam init (aws#578) * feat(validate): Add profile and region options (aws#582) Currently, `sam validate` requires AWS Creds (due to the SAM Translator). This commits adds the ability to pass in the credientials through a profile that is configured through `aws configure`. * docs(README): Update README prerequisites to include awscli (aws#596) * fix(start-lambda): Remove Content-Type Header check (aws#594) * docs: Disambiguation "Amazon Kinesis" (aws#599) * docs: Adding instructions for how to add pyenv to your PATH for Windows (aws#600) * docs: Update README with small grammar fix (aws#601) * fix: Update link in NodeJS package.json (aws#603) * docs: Creating instructions for Windows users to install sam (aws#605) * docs: Adding a note directing Windows users to use pipenv (aws#606) * fix: Fix stringifying λ environment variables when using Python2 (aws#579) * feat(generate-event): Added support for 50+ events (aws#612) * feat(invoke): Add region parameter to all invoke related commands (aws#608) * docs: Breaking up README into separate files to make it easier to read (aws#607) * chore: Update JVM size params to match docker-lambda (aws#615) * feat(invoke): Invoke Function Without Parameters through --no-event (aws#604) * docs: Update advanced_usage.rst with clarification on --env-vars usage (aws#610) * docs: Remove an extra word in the sam packaging command (aws#618) * UX: Improves event names to reflect Lambda Event Sources (aws#619) * docs: Fix git clone typo in installation docs (aws#630) * docs(README): Callout go1.x runtime support (aws#631) * docs(installation): Update sam --version command (aws#634) * chore(0.6.0): SAM CLI Version bump (aws#635)
When passing an uri as a string, awscli fetches the content of the uri instead of just using the string value.
Example:
Expected result:
Actual result:
The text was updated successfully, but these errors were encountered: