aws-lambda-attachment-extractor
aws-lambda-attachment-extractor copied to clipboard
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).
outputBucket = "attachment-desti-test" events bucket outputPrefix = "csv/" def lambda_handler(event, context): bucket = event['Records'][0]['s3']['bucket']['name'] key = urllib.unquote_plus(event['Records'][0]['s3']['object']['key']).decode('utf8') try: # Set outputBucket if required if not outputBucket: global outputBucket outputBucket =...
1) How should I set my s3 bucket in the script? I tried to replace the regex with my bucket name and this failed. 2) What should I do to...
Hi, was wondering if this could be used for a .csv file in the email/ in the email .zip attachment. thanks!
Make this compatible with Serverless Application Repository, allowing for easy deployment. Contributions welcome!