def lambda_handler(event, context):
raw_kpl_records = event['<STR_LIT>']<EOL>output = [process_kpl_record(kpl_record) for kpl_record in raw_kpl_records]<EOL>success_count = sum(<NUM_LIT:1> for record in output if record['<STR_LIT:result>'] == '<STR_LIT>')<EOL>failure_count = sum(<NUM_LIT:1> for record in output if record['<STR_LIT:result>'] == '<STR_LIT>')<EOL>print('<STR_LIT>'.format(success_count, failure_count))<EOL>return {'<STR_LIT>': output}<EOL>
A Python AWS Lambda function to process aggregated records sent to KinesisAnalytics.