For events that receive records in array format, such as Kinesis/SQS, you may want to PUT the results of each event into DynamoDB.
In these cases, BatchWriter is used to write to the event, and it is more convenient in some cases to handle the records as they are.
- Rename the existing SQS handler
jeffy.handlers.sqs to another (e.g jeffy.handlers.sqs_each )
- Re-define existing handler
jeffy.handlers.sqs as the handler receives records as an array
or
- Add handler to receive records as an array (e.g
jeffy.handlers.sqs_batch / jeffy.handlers.sqs_records )
or
- Add a decorator argument that tells the lambda handler receives an event object single record or arrayed records
As mentioned above, how about providing handlers that can be received both arrays/each element?
Related discussion: serverless-operations/jeffy-ja#1
For events that receive records in array format, such as Kinesis/SQS, you may want to PUT the results of each event into DynamoDB.
In these cases, BatchWriter is used to write to the event, and it is more convenient in some cases to handle the records as they are.
jeffy.handlers.sqsto another (e.gjeffy.handlers.sqs_each)jeffy.handlers.sqsas the handler receives records as an arrayor
jeffy.handlers.sqs_batch/jeffy.handlers.sqs_records)or
As mentioned above, how about providing handlers that can be received both arrays/each element?
Related discussion: serverless-operations/jeffy-ja#1