Expand description
Primitives shared across the AWS Amplify (amplify) handlers: ARN
synthesis, deterministic id derivation, timestamps, and default-domain /
webhook-URL construction. Kept in one place so the create / get paths cannot
diverge on wire format.
Functions§
- access_
log_ url - A presigned access-log download URL.
- app_arn
- The AWS Amplify app ARN,
arn:aws:amplify:{region}:{account}:apps/{app_id}. - artifact_
url - The artifact download URL for a build artifact.
- backend_
environment_ arn - The backend-environment ARN,
.../apps/{app_id}/backendenvironments/{name}. - branch_
arn - The branch ARN,
.../apps/{app_id}/branches/{branch}. - certificate_
verification_ dns_ record - The ACM certificate-verification DNS record AWS surfaces while a domain is being verified.
- decode_
artifact_ id - Reverse
encode_artifact_id. ReturnsNonefor an id we did not mint. - default_
domain - The default
*.amplifyapp.comdomain AWS assigns every app. - domain_
arn - The domain-association ARN,
.../apps/{app_id}/domains/{domain}. - encode_
artifact_ id - Encode an artifact id so
GetArtifactUrlcan resolve it back to its(app_id, branch, job_id, file_name)without a lookup table. AWS artifact ids are opaque; ours are a reversible base64url blob. - hash_
str - FNV-1a hash for deterministic synthesis of ids / hosts from a seed so a given resource’s derived value is stable across reads and restarts.
- job_arn
- The job ARN,
.../apps/{app_id}/branches/{branch}/jobs/{job_id}. - new_
app_ id - Generate a fresh Amplify app id of AWS’s
^d[a-z0-9]+$form: adprefix followed by 24 lowercase base-36 characters (well within the 1..=20… — AWS app ids are 14 chars, so we emitd+ 13 chars = 14 total). - new_
webhook_ id - Generate a fresh webhook id (a UUID; Amplify’s
WebhookIdpattern accepts any string). - now_
epoch - Current time as restJson1 epoch-seconds (a floating-point number). Amplify’s
timestamp members carry no
@timestampFormat, so restJson1’s default epoch-seconds applies – the AWS SDK parses the numeric value. - parse_
resource_ arn - Parse an Amplify
ResourceArninto(app_id, Option<branch>)for the tagging operations. Only apps and branches carry tags in the model. - subdomain_
dns_ record - The DNS record a subdomain resolves to (a CNAME onto the app’s default domain).
- thumbnail_
url - A branch thumbnail URL (a presigned-style URL over the Amplify CDN).
- upload_
url - A presigned S3 upload URL for a manual deployment file.
- webhook_
arn - The webhook ARN,
.../apps/{app_id}/webhooks/{webhook_id}. - webhook_
url - The webhook trigger URL AWS provisions, of the form
https://webhooks.amplify.{region}.amazonaws.com/prod/webhooks?id={id}&token={token}&operation=startbuild.