Skip to content
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

[Question] how to encrypt using aws kms in sqlalchemy #724

Open
KIWONY opened this issue Jan 16, 2024 · 0 comments
Open

[Question] how to encrypt using aws kms in sqlalchemy #724

KIWONY opened this issue Jan 16, 2024 · 0 comments

Comments

@KIWONY
Copy link

KIWONY commented Jan 16, 2024

hello,
I am trying to implement encryption using SQLAlchemy when storing data in PostgreSQL. I referred to the code for StringEncryptedType in the documentation of sqlalchemy-utils, which I have attached via the link.

https://sqlalchemy-utils.readthedocs.io/en/latest/data_types.html#sqlalchemy_utils.types.encrypted.encrypted_type.StringEncryptedType

class Test(Base):
    __tablename__ = "test"

    id = Column(Integer, primary_key=True)
    name = Column(StringEncryptedType(String, key_id, AesEngine, 'pkcs5'))

But I would like to use AWS KMS here and when I set the ARN of AWS KMS as the secret key, the data is not encrypted.
What am I missing?

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

No branches or pull requests

1 participant