Skip to content

Instantly share code, notes, and snippets.

Created Jul 22, 2020
What would you like to do?
def handle(event, context):
output = []
for record in event['records']:
payload = base64.b64decode(record['data'])
result = dropped_or_okay(payload)
if result == 'Ok':
payload = preprocess_payload(payload)
output_record = {
'recordId': record['recordId'],
'result': result,
'data': base64.b64encode(json.dumps(payload).encode("utf-8")).decode("utf-8")
return {'records': output}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment