Functions
bedrock-endpoint
fn (region: Str): Str
Get the Bedrock control plane endpoint URL for a given region
bedrock-runtime-endpoint
fn (region: Str): Str
Get the Bedrock runtime endpoint URL for model invocation
canonical-headers
fn (headers: Map): Str
Create canonical headers string for AWS Signature V4
create-canonical-request
fn (method: Str, path: Str, query: Str, headers-str: Str, signed-headers-str: Str, payload-hash: Str): Str
Create AWS Signature V4 canonical request string
create-string-to-sign
fn (amz-date: Str, date-stamp: Str, region: Str, service: Str, canonical-request-hash: Str): Str
Create AWS Signature V4 string to sign
derive-signing-key
fn (secret_key: Str, date_stamp: Str, region: Str, service: Str): Bytes
Derive AWS signing key using HMAC-SHA256 chain
dynamodb-endpoint
fn (region: Str): Str
Get the DynamoDB endpoint URL for a given region
encode-query-param
fn (param: Str): Str
URL-encode the value part of a query parameter
get-amz-date
fn (): Str
Get current UTC timestamp in AWS format (YYYYMMDD'T'HHMMSS'Z')
get-credentials
fn (): Credentials
Get AWS credentials from context (aws.access-key-id, aws.secret-access-key)
aws.access-key-id, aws.secret-access-key, aws.session-token
get-date-stamp
fn (): Str
Get current UTC date in AWS format (YYYYMMDD)
get-region
fn (): Str
Get AWS region from context (aws.region). Defaults to us-east-1 if not set.
aws.region
lambda-endpoint
fn (region: Str): Str
Get the Lambda endpoint URL for a given region
parse-url
fn (url: Str): Map
Parse a URL into components: {host, path, query}
replace-all-char
fn (s: Str, from: Str, to: Str): Str
Replace all occurrences of char in string
request
fn (method: Str, url: Str, service: Str, region: Str, headers: Map, body: Str): HttpResponse
Make an authenticated request to an AWS service endpoint.
Handles credential retrieval and Signature V4 signing automatically. Used internally by all AWS service packages.
s3-endpoint
fn (bucket: Str, region: Str): Str
Get the S3 endpoint URL for a given bucket and region
secrets-manager-endpoint
fn (region: Str): Str
Get the Secrets Manager endpoint URL for a given region
ses-endpoint
fn (region: Str): Str
Get the SES endpoint URL for a given region
sign-request
fn (method: Str, url: Str, region: Str, service: Str, credentials: Credentials, headers: Map, payload: Str): Map
Sign a request using AWS Signature V4. Returns headers map with Authorization header.
sign-url
fn (method: Str, url: Str, region: Str, service: Str, credentials: Credentials, expires_in: Int): Str
fn (method: Str, url: Str, region: Str, service: Str, credentials: Credentials): Str
Sign a URL using AWS Signature V4 query string signing.
This is used for presigned URLs where the signature goes in the query string instead of headers. The returned URL can be used by anyone without credentials.
Parameters:
- method: HTTP method (GET, PUT, etc.)
- url: Base URL to sign
- region: AWS region
- service: AWS service name (s3, etc.)
- credentials: AWS credentials
- expires_in: URL expiration time in seconds (default 3600 = 1 hour, max 604800 = 7 days)
signed-headers
fn (headers: Map): Str
Create signed headers list (semicolon-separated lowercase header names)
sort-query-params
fn (query: Str): Str
Sort and URL-encode query parameters for AWS canonical request
sqs-endpoint
fn (region: Str): Str
Get the SQS endpoint URL for a given region
uri-encode
fn (s: Str): Str
URI encode a string for AWS canonical request. Encodes all characters except unreserved characters.
url-encode-path
fn (path: Str): Str
URL-encode a URI path for AWS canonical request (encodes : but not /)
url-encode-value
fn (value: Str): Str
URL-encode a value for AWS query string (encodes / and other special chars)
Types
AwsError
AwsError type {
status: Int,
code: Str?,
message: Str?,
request_id: Str?,
body: Any
}
Error response from an AWS service request.
Credentials
Credentials type {
access_key_id: Str,
secret_access_key: Str,
session_token: Str?
}
AWS credentials used for signing requests.
Region
Region type {
name: Str
}
AWS region identifier.