Skip to content

Instantly share code, notes, and snippets.

View igtm's full-sized avatar
🖥️
Work, work and work!

Iguchi Tomokatsu igtm

🖥️
Work, work and work!
View GitHub Profile
@michalc
michalc / decrypt-ses-emails-in-s3.py
Last active November 6, 2024 08:18
Decrypt KMS-encrypted SES emails in an S3 bucket
import base64
import json
import boto3
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
s3 = boto3.resource('s3')
bucket = s3.Bucket('my-bucket')
kms_client = boto3.client('kms')