When you read events from a stream of kinesias, you have 4 options:
TRIM_HORIZON are the oldest events that are still in streaming turtles before they are automatically cropped (default is 1 day, but can be increased to 7 days). You will use this option if you want to launch a new application that will process all the records available in the stream, but it will take some time until it can catch up and start processing events in real time.
LATEST are the latest events in the stream and ignore all past events. You will use this option if you run a new application that you want to process in a loop.
AT / AFTER_SEQUENCE_NUMBER - The sequence number is usually the control point that you hold during event processing. These breakpoints allow you to reliably handle events, even in the event of reading failures or when you want to update your version and continue processing all events without losing any of them. The difference between AT / AFTER is based on the time of your checkpoint before or after the successful completion of events.
Note that this is the only shard specific parameter, since all other parameters are global for the stream. When you use KCL, it manages the DynamoDB table for this application with an entry for each shard with the "current" serial number for that shard.
AT_TIMESTAMP - time to evaluate the event placed on the stream. You will use this option if you want to find specific events to process based on their timestamp. For example, when you know that at a certain point in time you had a real event in your service, you can develop an application that will process these specific events, even if you do not have a sequence number.
See the Kinesis documentation for more details: https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetShardIterator.html
source share