aws-samples/aws-modern-application-workshop

module-5 question

Closed this issue · 1 comments

Hi, apologies if this is not the right place to ask the question but I cannot find the answer within documentation (https://docs.aws.amazon.com/firehose/latest/dev/data-transformation.html).

In the sample code we are returning a single record:
https://github.com/aws-samples/aws-modern-application-workshop/blob/python/module-5/app/streaming/streamProcessor.py#L37

So for single record-id that came from kinesis we create single processed record.

If I would like to return multiple records with the same record-id then I get an error in firehose pipeline:

Multiple records were returned with the same record Id. Ensure that the Lambda function returns a unique record Id for each record.

Can I produce multiple records that will land to redshift from single kinesis record?

Redshift COPY command documentation explains record format. Would be easier if this resource was mentioned within firehose data-transformation section.

https://docs.aws.amazon.com/redshift/latest/dg/copy-usage_notes-copy-from-json.html