Skip to content

Python: Fix type annotations in KMS client methods #7520

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

essercodes
Copy link

Updated encrypt/decrypt method signatures to properly handle bytes return types from KMS client operations.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

`kms_client.encrypt` returns type `bytes`. Updated method signatures for encrypt and decrypt. The "Plaintext" returned from `kms_client.decrypt` is also `bytes`, but it should be decoded to `str` to match the parameter type of the encrypt method.
@github-actions github-actions bot added the Python This issue relates to the AWS SDK for Python (boto3) label Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python This issue relates to the AWS SDK for Python (boto3)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant