from src import app # Example event JSON for Lambda event = { "Records": [ { "eventID": "05e1e2d2460eb15a3f7ecba94eec38f7", "eventName": "MODIFY", "eventVersion": "1.1", "eventSource": "aws:dynamodb", "awsRegion": "us-east-1", "dynamodb": { "ApproximateCreationDateTime": 1663004756, "Keys": { "isrc": { "S": "QMFMG1503303" } }, "NewImage": { "territories": { "M": { "US": { "L": [ { "M": { "tuid": { "N": "23793971" } } } ] }, "UK": { "L": [ { "M": { "tuid": { "N": "23793974" } } } ] }, "CA": { "L": [ { "M": { "tuid": { "N": "23793973" } } } ] } } }, "updated_timestamp": { "N": "1663019156.836925" }, "isrc": { "S": "QMFMG1503303" }, "locked_territories": { "M": {} }, "timestamp": { "N": "1485243948502.8948" } }, "OldImage": { "territories": { "M": { "US": { "L": [ { "M": { "tuid": { "N": "23793972" } } } ] }, "UK": { "L": [ { "M": { "tuid": { "N": "23793972" } } } ] }, "MX": { "L": [ { "M": { "tuid": { "N": "23793974" } } } ] } } }, "updated_timestamp": { "N": "1663019156.836925" }, "isrc": { "S": "QMFMG1503303" }, "locked_territories": { "M": {} }, "timestamp": { "N": "1485243948502.8948" } }, "SequenceNumber": "10301646900000000005949105149", "SizeBytes": 5092, "StreamViewType": "NEW_IMAGE" }, "eventSourceARN": "arn:aws:dynamodb:us-east-1:103233932089:table/dev-masters_active/stream/2017-05-16T18:14:44.886" } ] } # Context (mock or use an empty object) context = {} # Run the handler response = app.handler(event, context) print(response)