{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-cli/issues/1100","labels_url":"https://api.github.com/repos/aws/aws-cli/issues/1100/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-cli/issues/1100/comments","events_url":"https://api.github.com/repos/aws/aws-cli/issues/1100/events","html_url":"https://github.com/aws/aws-cli/issues/1100","id":54555892,"number":1100,"title":"aws kms decrypt with aws-cli/1.7.X not working","user":{"login":"mrandi","id":4638986,"avatar_url":"https://avatars.githubusercontent.com/u/4638986?v=3","gravatar_id":"","url":"https://api.github.com/users/mrandi","html_url":"https://github.com/mrandi","followers_url":"https://api.github.com/users/mrandi/followers","following_url":"https://api.github.com/users/mrandi/following{/other_user}","gists_url":"https://api.github.com/users/mrandi/gists{/gist_id}","starred_url":"https://api.github.com/users/mrandi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrandi/subscriptions","organizations_url":"https://api.github.com/users/mrandi/orgs","repos_url":"https://api.github.com/users/mrandi/repos","events_url":"https://api.github.com/users/mrandi/events{/privacy}","received_events_url":"https://api.github.com/users/mrandi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/aws-cli/labels/documentation","name":"documentation","color":"d7e102"},{"url":"https://api.github.com/repos/aws/aws-cli/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-16T09:34:19Z","updated_at":"2015-01-21T09:14:45Z","closed_at":"2015-01-16T18:11:14Z","body":"I cannot decrypt the text with:\r\n\r\n`aws --version`\r\naws-cli/1.6.10 Python/3.4.0 Linux/3.13.0-36-generic\r\nand\r\naws-cli/1.7.0 Python/2.7.9 Darwin/14.0.0\r\nand\r\naws-cli/1.7.1 Python/2.7.9 Darwin/14.0.0\r\nand\r\naws-cli/1.6.10 Python/2.7.6 Linux/3.13.0-36-generic\r\n\r\n(works with version 1.6.10 Python/2.7.6 Darwin/14.0.0)\r\n\r\nI try to encrypt a text with:\r\n`aws kms encrypt --region eu-west-1 --key-id <key> --plaintext <test> --query CiphertextBlob --output text`                                                \r\n\r\nI used the output to try the decrypt cmd:\r\n\r\n`aws kms decrypt --ciphertext-blob <encrypt-output> --region eu-west-1 --query Plaintext --output text --debug`\r\n\r\nHere is the result:\r\n```shell\r\n2015-01-16 10:17:53,386 - MainThread - botocore.parsers - DEBUG - Response body:\r\n{\"__type\":\"InvalidCiphertextException\"}\r\n2015-01-16 10:17:53,386 - MainThread - botocore.hooks - DEBUG - Event needs-retry.kms.Decrypt: calling handler <botocore.retryhandler.RetryHandler object at 0x108a6f390>\r\n2015-01-16 10:17:53,386 - MainThread - botocore.retryhandler - DEBUG - No retry needed.\r\n2015-01-16 10:17:53,386 - MainThread - botocore.hooks - DEBUG - Event after-call.kms.Decrypt: calling handler <awscli.errorhandler.ErrorHandler object at 0x108a27110>\r\n2015-01-16 10:17:53,387 - MainThread - awscli.errorhandler - DEBUG - HTTP Response Code: 400\r\n2015-01-16 10:17:53,387 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()\r\nTraceback (most recent call last):\r\n  File \"/usr/local/aws/lib/python2.7/site-packages/awscli/clidriver.py\", line 197, in main\r\n    return command_table[parsed_args.command](remaining, parsed_args)\r\n  File \"/usr/local/aws/lib/python2.7/site-packages/awscli/clidriver.py\", line 357, in __call__\r\n    return command_table[parsed_args.operation](remaining, parsed_globals)\r\n  File \"/usr/local/aws/lib/python2.7/site-packages/awscli/clidriver.py\", line 492, in __call__\r\n    self._operation_object, call_parameters, parsed_globals)\r\n  File \"/usr/local/aws/lib/python2.7/site-packages/awscli/clidriver.py\", line 597, in invoke\r\n    **parameters)\r\n  File \"/usr/local/aws/lib/python2.7/site-packages/botocore/operation.py\", line 98, in call\r\n    parsed=response[1])\r\n  File \"/usr/local/aws/lib/python2.7/site-packages/botocore/session.py\", line 735, in emit\r\n    return self._events.emit(event_name, **kwargs)\r\n  File \"/usr/local/aws/lib/python2.7/site-packages/botocore/hooks.py\", line 226, in emit\r\n    return self._emit(event_name, kwargs)\r\n  File \"/usr/local/aws/lib/python2.7/site-packages/botocore/hooks.py\", line 209, in _emit\r\n    response = handler(**kwargs)\r\n  File \"/usr/local/aws/lib/python2.7/site-packages/awscli/errorhandler.py\", line 70, in __call__\r\n    http_status_code=http_response.status_code)\r\nClientError: A client error (InvalidCiphertextException) occurred when calling the Decrypt operation: None\r\n2015-01-16 10:17:53,391 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255\r\n\r\nA client error (InvalidCiphertextException) occurred when calling the Decrypt operation: None\r\n```"},"comment":{"url":"https://api.github.com/repos/aws/aws-cli/issues/comments/70806004","html_url":"https://github.com/aws/aws-cli/issues/1100#issuecomment-70806004","issue_url":"https://api.github.com/repos/aws/aws-cli/issues/1100","id":70806004,"user":{"login":"mrandi","id":4638986,"avatar_url":"https://avatars.githubusercontent.com/u/4638986?v=3","gravatar_id":"","url":"https://api.github.com/users/mrandi","html_url":"https://github.com/mrandi","followers_url":"https://api.github.com/users/mrandi/followers","following_url":"https://api.github.com/users/mrandi/following{/other_user}","gists_url":"https://api.github.com/users/mrandi/gists{/gist_id}","starred_url":"https://api.github.com/users/mrandi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrandi/subscriptions","organizations_url":"https://api.github.com/users/mrandi/orgs","repos_url":"https://api.github.com/users/mrandi/repos","events_url":"https://api.github.com/users/mrandi/events{/privacy}","received_events_url":"https://api.github.com/users/mrandi/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T09:14:45Z","updated_at":"2015-01-21T09:14:45Z","body":"Thanks for the explanation. Works fine after adding the \"--region\" flag."}}