Skip to content

Instantly share code, notes, and snippets.

@oorryy
Created January 21, 2019 15:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save oorryy/d5581107813e993534f6f41ffaa59e40 to your computer and use it in GitHub Desktop.
# 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")}})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment