Coder Social home page Coder Social logo

kmdpartners / aws-lambda-attachment-extractor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from martysweet/aws-lambda-attachment-extractor

0.0 9.0 0.0 6 KB

Simple event driven AWS Lambda Python function to extract a ZIP or GZIP attachment from an email stored in S3 by another service (such as Amazon SES).

Python 100.00%

aws-lambda-attachment-extractor's Introduction

AWS Lambda Attachment Extractor

This is a very simple project which can be used for reference when creating Lambda functions to manipulate email files stored to an Amazon S3 bucket, typically by an inbound SES routing rule. See 'AWS Documentation' for more information.

Use cases

The original use for this project was to process DMARC reports, getting .ZIP and .GZIP attachments from emails stored in S3 and extracting the archives, resulting in .XML files, which are then uploaded to another S3 bucket for processing by another service.

The Python file doesn't perform security checks on attachments and will ignore anything which does not result in an .XML file. The original email is not deleted after processing takes place, however, this functionality could be added. Alternatively a S3 bucket transition policy can be used.

This type of processing may be very useful for extracting DMARC reports, which are sent by email service providers to an email address specified in the rua section of your DMARC DNS record, see https://dmarc.org/overview/. You will then be left with a bucket of XML DMARC reports which you may wish to process manually or upload to a service such as https://dmarcian.com/dmarc-xml/.

Getting Started

To get started, simply upload the python file to Lambda, changing the variables if required. This lambda function expects a S3 put event to trigger it, see 'this tutorial' for more information.

aws-lambda-attachment-extractor's People

Contributors

martysweet avatar

Watchers

 avatar Mark Friedgan avatar  avatar Lee avatar Victor Pudeyev avatar James Cloos avatar Alexey Nechytailo avatar Anatol Mykolenko avatar Zach Miller avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.