Skip to content

Instantly share code, notes, and snippets.

@garystafford
Created October 1, 2019 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garystafford/1884905dbfb301c8ddf6294d6d77ff02 to your computer and use it in GitHub Desktop.
Save garystafford/1884905dbfb301c8ddf6294d6d77ff02 to your computer and use it in GitHub Desktop.
def lambda_handler(event, context):
bucket = event['Records'][0]['s3']['bucket']['name']
key = urllib.parse.unquote_plus(
event['Records'][0]['s3']['object']['key'],
encoding='utf-8'
)
messages = read_csv_file(bucket, key)
process_messages(messages)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment