[BUG] ApproximateCreationDateTime from DynamoDBStreamRecord in milliseconds when originating from Kinesis, not seconds.

Open
#478 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
aws, go
Domain
backend, cloud

Research direction

Start with the DynamoDBStreamRecord field ApproximateCreationDateTime and compare its handling for Kinesis and DynamoDB Stream records. Read the linked aws-lambda-dotnet issue and the AWS stream documentation first; done means the value uses the correct unit for each source and deserialization behavior is covered by an appropriate regression check.

Written by the indexing model from the issue text.

Description

type/events

This is essentially the same issue as https://github.com/aws/aws-lambda-dotnet/issues/839, but without crashing deserialization, which I'm guessing is due to the use of float64 that avoids overflowing with the larger value to deserialize. The relevant points of discussion are:

It seems that the value of ApproximateCreationDateTime will be in seconds when coming from a DynamoDB Stream, but in milliseconds when coming from a Kinesis Stream:

The approximate date and time when the stream record was created, in UNIX epoch time format and rounded down to the closest second

ApproximateCreationDateTime indicates the time of the modification in milliseconds.

There appears to be an internal ticket that's being tracked, so I wanted to open an issue here as well for AWS to monitor and hopefully resolve in the near future. Thanks!

Dominant language
Go
Stars
3.8k
Forks
578
Avg merge
16h 56m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aws/aws-lambda-go

All issues in aws/aws-lambda-go

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.