Skip to content

Lambda function for KinesesFirehose transformation broken after latest release #263

@omartinezpou

Description

@omartinezpou

All my Lambda functions for KinesisFirehose data transformation are broken after upgrading to the latest release https://github.com/aws/aws-lambda-go/releases/tag/v1.14.0.

The field SubsequenceNumber has been added to the type struct KinesisFirehoseRecordMetadata
v1.13.3...v1.14.0#diff-a663693284222a7feac21348b40b8c2aR42

It looks like this is causing a type error since KinesisFirehoseEvent events' subsequenceNumber is a number (int,float) and the expected type is string. Error message:
json: cannot unmarshal number into Go struct field KinesisFirehoseRecordMetadata.records.kinesisRecordMetadata.subsequenceNumber of type string: UnmarshalTypeError
Hence, this can be fixed by changing subsequenceNumber field type to int

This issue can be easily reproduced using the sample code from: https://github.com/aws/aws-lambda-go/blob/master/events/README_KinesisFirehose.md

As a workaround, I am able to avoid this error by using the previous version which works just fine.

$ cat go.mod
...
require github.com/aws/aws-lambda-go v1.13.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions