Skip to content

Instantly share code, notes, and snippets.

View oorryy's full-sized avatar

Ory Segal oorryy

  • Palo Alto Networks
  • Tel Aviv, Israel
  • X @orysegal
View GitHub Profile
# store pdf content in DynamoDB table
dynamodb_client.put_item(TableName=TABLE_NAME,
Item={"email": {"S": parser['From']},
"subject": {"S": parser['Subject']},
"received": {"S": str(datetime.utcnow()).split('.')[0]},
"filename": {"S": file_name},
"requestid": {'S': context.aws_request_id},
"content": {'S': pdf_content.decode("utf-8")}})