Skip to content

Instantly share code, notes, and snippets.

View Riches's full-sized avatar

Will Riches Riches

View GitHub Profile
@Riches
Riches / extract-email-attachment.py
Created February 21, 2023 17:12 — forked from sandeepmanchi/extract-email-attachment.py
Python code to extract email attachment from raw email message stored in S3
import json
import boto3
import email
import os
from datetime import datetime
import re
def get_timestamp():
current = datetime.now()
return(str(current.year) + '-' + str(current.month) + '-' + str(current.day) + '-' + str(current.hour) + '-' + str(current.minute) + '-' + str(current.second))