Expand description
Primitives shared across the Amazon Comprehend handlers: ARN synthesis, deterministic id derivation, and timestamps. Kept in one place so the create / describe paths cannot diverge on wire format.
Functions§
- hash_
str - FNV-1a hash for deterministic synthesis of ids from a seed so a given resource’s derived value is stable across reads and restarts.
- hex32
- A stable, AWS-shaped 32-hex-character id (as used for job ids) derived from a
seed, or a fresh random one when
seedis empty. - now_
epoch - Current time as awsJson1_1 epoch-seconds (a floating-point number). The
Comprehend
Timestampshape carries no@timestampFormat, so awsJson1_1’s default epoch-seconds applies. - parse_
resource_ arn - Split a Comprehend ARN into
(resource_type, tail).arn:aws:comprehend:{region}:{account}:{type}/{tail}->(type, tail).tailkeeps any further/-separated segments (version, dataset, …). - resource_
arn - Amazon Comprehend resource ARN,
arn:aws:comprehend:{region}:{account}:{resource_type}/{tail}.