timestream invalid timestamp error

0

errors April 29, 2024, 11:40:37 (UTC-0700) { "ruleName": "NamaraThingToTimeStream", "topic": "akiliws/sensor_report", "cloudwatchTraceId": "40fadb8f-aefe-9f17-ff24-0d42a9f2a713", "clientId": "AkiliWS-68b6b34eec56", "sourceIp": "98.97.60.60", "base64OriginalPayload": "eyJGV1ZlciI6ICIxLjYuNDAiLCAiRGF0ZVRpbWUiOiAxNzE0NDE2MDM1LCAiSG9tZU9wZW4iOiAwLCAiSG9tZUNsb3NlZCI6IDAsICJCYXR0ZXJ5Q2hhcmdlU3RhdGUiOiAwLCAiQmF0dGVyeVZvbHRhZ2UiOiAwLjAsICJGbG93UmF0ZSI6IDMuMCwgIldhdGVyU2F2aW5ncyI6IDQwLCAiSW5wdXRQcmVzc3VyZSI6IDEwNDAuNiwgIk91dHB1dFByZXNzdXJlIjogNDI5NDk1NzgyLjQsICJWYWx2ZVBvc2l0aW9uIjogNTYsICJBbWJpZW50VGVtcGVyYXR1cmUiOiAwLjAsICJEZXZpY2VJZCI6ICI2OGI2YjM0ZWVjNTYiLCJCb290Q291bnQiOiAzfQ==", "failures": [ { "failedAction": "TimestreamAction", "failedResource": "NamaraThingDB#NamaraThingTable", "errorMessage": "Failed to write records to Timestream. The error received was 'Invalid timestamp value ''. Length should be in [1, 256] in UTF-8 encoded bytes.'. Message arrived on akiliws/sensor_report, Action: timestream, Database: NamaraThingDB, Table: NamaraThingTable" } ] }

Tried this:

${time_to_epoch(DateTime, "yyyy-MM-dd HH:mm:ss.SSS")}

But still getting an error

posta un mese fa148 visualizzazioni
1 Risposta
0

Hi. The DateTime field in your message is already expressed as epoch time in seconds. So there's no need to call time_to_epoch() to do any conversion. From the rule, you can just substitute ${DateTime} as the timestamp value, with the timestamp units set to SECONDS.

profile pictureAWS
ESPERTO
Greg_B
con risposta un mese fa
  • Thanks for the suggestion. We now have a different error message

    "failedResource": "NamaraThingDB#NamaraThingTable", "errorMessage": "Failed to write records to Timestream. The error received was 'One or more records have been rejected. See RejectedRecords for details. (Service: AmazonTimestreamWrite; Status Code: 419; Error Code: RejectedRecordsException; Request ID: ED4N5GFMGJZ5UKIWQJMNYLU7TQ; Proxy: null), Rejected records: [{RecordIndex: 0,Reason: The record timestamp is outside the time range [2024-04-29T22:00:03.606Z, 2024-04-29T23:40:03.606Z) of the memory store.,},

    Needed to change the Units from Milliseconds to Seconds to get rid of the error as well

    Thanks

  • What is the retention period of your in-memory store? Did you change the retention period setting? What is the value of the timestamp you were trying to store?

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande