Skip to content

Instantly share code, notes, and snippets.

@DavidDeCoding
Last active March 5, 2022 18:18
Show Gist options
  • Save DavidDeCoding/1c988673012a936c97f2f22acc02a8c2 to your computer and use it in GitHub Desktop.
Save DavidDeCoding/1c988673012a936c97f2f22acc02a8c2 to your computer and use it in GitHub Desktop.
Building Coupon Reminders - Part 2 Serverless and Secured Image Storage and Processing - coupon_processor.py
import Coupon
def handler(event, context):
for event in event["Records"]:
if event["eventName"] == "ObjectCreated:Put":
image_full_name = event["s3"]["object"]["key"]
Coupon.process_and_store(image_full_name)
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment