- Newest
- Most votes
- Most comments
Based on your error, it appears you're encountering an issue with the format of the timestamp in the startingPosition parameter for your AWS Glue 4.0 streaming job with a Kinesis data stream source.
For AWS Glue version 4.0 or later, you can indeed use a timestamp string in UTC format for the startingPosition parameter. The supported format is yyyy-mm-ddTHH:MM:SSZ where Z represents a UTC timezone offset with a +/-.
Your timestamp format 2025-09-01T00:00:00-04:00 appears to be correctly formatted according to the ISO-8601 standard with the timezone offset. However, the JsonParseException suggests that the system is trying to parse the timestamp string as a JSON value, which is causing the error.
Try these approaches to resolve the issue:
-
Make sure you're using AWS Glue version 4.0 or later, which you've confirmed you are.
-
Try using quotes around your timestamp value in the options dictionary:
"startingPosition": "'2025-09-01T00:00:00-04:00'"
-
Alternatively, you could try using one of the other valid values for
startingPositionsuch aslatest,trim_horizon, orearliestif those meet your requirements. -
If you need to use a specific timestamp, you might also try using the
startingTimestampparameter instead of embedding the timestamp directly in thestartingPositionparameter.
The error specifically indicates a JSON parsing issue, which suggests the timestamp string is being treated as JSON when it shouldn't be. This could be related to how the options are being passed to the underlying API.
Sources
KinesisStreamingSourceOptions - AWS Glue
answered a year ago
Hello,
Based on the error mentioned, you are encountering this issue because the startingPosition option in Glue’s Kinesis connector does not accept a raw timestamp as you are passing.
It only accepts the enums LATEST, TRIM_HORIZON or AT_TIMESTAMP.
When you need to start from a specific point in time you must set,
startingPosition = "AT_TIMESTAMP" startingTimestamp = "<ISO-8601 UTC timestamp>" (for example: "2025-09-01T00:00:00Z")
Currently you have placed timestamp directly into startingPosition, which is why the parser is failing with a JsonParseException.
Next steps, -> Update your glue job options to use "startingPosition": "AT_TIMESTAMP"
->Provide the timestamp separately via "startingTimestamp"
further i recommend using UTC format for the timestamp to avoid timezone parsing issues.
answered a year ago
Relevant content
asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
