kms#decrypt throws 'utf8' codec error
See original GitHub issuekms#decrypt
throws this error every time:
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf2 in position 2: invalid continuation byte
Repro steps:
import boto3
kms = boto3.client('kms')
result = kms.encrypt(KeyId='some_key_id_redacted',Plaintext='my name is bob')
kms.decrypt(CiphertextBlob=result['CiphertextBlob'])
May be related to this issue
Issue Analytics
- State:
- Created 9 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Error 'UnicodeDecodeError: 'utf-8' codec can't decode byte ...
In Python 2, "" is a byte array, but in Python 3 it's a unicode string. Both cipher.encrypt and cipher.decrypt expect byte arrays....
Read more >Encryption and Decryption using AWS KMS Customer ...
AWS KMS is a service that creates and manages data encryption keys, and controls their usage across different AWS services.
Read more >Resolve the AWS KMS decrypt error ...
I tried to decrypt environment variables using AWS Lambda encryption helpers and received the error "InvalidCiphertextException". All AWS ...
Read more >Decrypt with a symmetric key | Cloud KMS Documentation
Decrypt the ciphertext by using the symmetric key.
Read more >Access denied when uploading to KMS-encrypted Amazon S3 ...
Why am I getting an Access Denied error message when I upload files to my Amazon S3 bucket that has AWS KMS default...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The workaround worked for me, but I had to base64 encode the Plaintext as well.
Released in version 0.0.5