Skip to main content

Module shared

Module shared 

Source
Expand description

Primitives shared across the Amazon Timestream handlers: ARN synthesis, id minting, timestamps, endpoint-host derivation, and the internal database\u{1}table key. Kept in one place so the write and query paths cannot diverge on wire format.

Functions§

database_arn
Amazon Timestream database ARN, arn:aws:timestream:{region}:{account}:database/{name}.
endpoint_address
The bare host (host[:port], no scheme) that DescribeEndpoints should advertise so a client’s follow-up calls come back to this fakecloud server. Derived from the request Host header (the address the client actually dialed); falls back to the canonical regional Timestream ingest host when no Host header is present.
new_id
A fresh opaque id (query id, batch-load task id, ARN suffix). Clients treat these as opaque tokens they only echo back.
now_epoch
Current time as awsJson1_0 epoch-seconds (a floating-point number). Timestream’s Date / Time shapes carry no @timestampFormat, so awsJson1_0’s default epoch-seconds applies.
scheduled_query_arn
Amazon Timestream scheduled-query ARN, arn:aws:timestream:{region}:{account}:scheduled-query/{name}-{suffix}.
table_arn
Amazon Timestream table ARN, arn:aws:timestream:{region}:{account}:database/{db}/table/{name}.
table_key
Internal storage key for a table within a database: database + a unit separator + table. The separator can never appear in a Timestream ResourceName, so the key round-trips unambiguously.