I am using the blueprint:
def lambda_handler(event, context):
#print("Received event: " + json.dumps(event, indent=2))
output = []
for record in event[‘Records’]:
# Kinesis data is base64 encoded so decode here
payload = base64.b64decode(record[‘kinesis’][‘data’])
print("Decoded payload: " + payload)
output.append(record)
print ('Successfully processed {} records.'.format(len(event['Records'])))
return {'Records': output}
My question is what is the format for output Records? AWS document says that I must include following fields:
recordId: record['recordId]
result: ‘OK’
data: ‘payload’
But in the input event, I don’t see any field name “recordId”, did I missing something? Thanks!