in functions/source/attributes-updater/handler.py [0:0]
def handler(event, context):
logger.debug('event is {}'.format(event))
mappings = event_mappings.get_all()
logger.info(f'Event Mappings: {mappings}')
try:
for record in event['Records']:
# Batch by 10
body = json.loads(record["body"])
logger.info(f"Message: {body}")
process_event(body, mappings)
except Exception as e:
# Send some context about this error to Lambda Logs
logger.error(e)
# throw exception, do not handle. Lambda will make message visible again.
raise e