You can use AWS KMS to encrypt and decrypt your data using a symmetric customer master key (CMK). Here's an example of encrypting a string using the AWS KMS Python SDK:
import boto3
# Create KMS client
kms = boto3.client('kms')
# Encrypt a string
response = kms.encrypt(
KeyId='your_key_id',
Plaintext=b'Hello, world!'
)
print("CipherTextBlob:", response['CiphertextBlob'])