Skip to content

Conversation

@phillisf
Copy link

@phillisf phillisf commented Jun 5, 2018

Modified Windows examples to wrap all text in double quotation marks.

Also, need to remove "$" from this:
plaintext=$(aws kms decrypt --ciphertext-blob fileb://encryptedDataKey --query Plaintext --output text | base64 --decode)

...but I'm not an expert with bash.
Can we confirm if that is correct? The modified example works for me.

phillisf added 2 commits June 5, 2018 15:55
Modified Windows examples to wrap all text in double quotation marks.

Also, I can't make the example $plaintext=$(aws kms decrypt --ciphertext-blob fileb://encryptedDataKey --query Plaintext --output text | base64 --decode) work. I feel like it should be using an alias and be wrapped in quotation marks like: 
alias plaintext='aws kms decrypt --ciphertext-blob fileb://encryptedDataKey --query Plaintext --output text | base64 --decode'

...but I'm not an expert with bash.
Can we confirm if that is correct? The modified example works for me.
In addition to wrapping inline text in double quotation marks for Windows, I also needed to remove the "$" symbol from the command substitution example. It should look like this:

plaintext=$(aws kms decrypt --ciphertext-blob fileb://encryptedDataKey --query Plaintext --output text | base64 --decode)

You should then be able to view the content of that value:
echo $plaintext
@juneb
Copy link
Owner

juneb commented Jun 5, 2018

Thanks! You're correct about that $. I was copying from the shell and grabbed the prompt.

@juneb juneb merged commit 69fc497 into juneb:kms-examples Jun 14, 2018
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.

2 participants