-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Kinesis Stream Metadata to firehose event #188
Conversation
Codecov Report
@@ Coverage Diff @@
## master #188 +/- ##
======================================
Coverage 77.2% 77.2%
======================================
Files 18 18
Lines 636 636
======================================
Hits 491 491
Misses 104 104
Partials 41 41 Continue to review full report at Codecov.
|
ShardID string `json:"shardId"` | ||
PartitionKey string `json:"partitionKey"` | ||
SequenceNumber string `json:"sequenceNumber"` | ||
ApproximateArrivalTimestamp MilliSecondsEpochTime `json:"approximateArrivalTimestamp"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI failed (https://travis-ci.org/aws/aws-lambda-go/builds/530382884). Need to check if the type needs to be string
, or if the test data is wrong.
...
--- FAIL: TestSampleTransformation (0.00s)
firehose_test.go:50: could not unmarshal event. details: json: cannot unmarshal string into Go struct field KinesisFirehoseRecordMetadata.approximateArrivalTimestamp of type int64
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
found a reference internally and a sample event in the console - I will update the test data and merge
updated type to match sample in Lambda console
Thanks! |
Add sourceKinesisStreamArn and KinesisRecordMetadata to event structs .
Attempting to do a put record API call on a Firehose Delivery stream which has a Kinesis Stream as the source will result in the error
This operation is not permitted on KinesisStreamAsSource delivery stream type.
. Therefore it is useful to have the sourceKinesisStreamArn so put record API calls can be made by Lambda functions to the source Kinesis Stream.In addition the Kinesis Record Metadata has been added to the event so the same partition key can be used if the data needs to be reingest to the source Kinesis stream.
This is particularly useful when attempting to reingest data due to hitting the 6MB size limit of the response payload.