Skip to main content

Aws

Library of functions for Amazon AWS.

Functions

SignedV4Request

Generates an AWS V4 signed request.

Syntax:
Aws.SignedV4Request(key: string, secretKey: string, service: string, region: optional string, sessionToken: optional string, path: optional string, method: optional string, host: optional string, bodyString: optional string, args: optional list, headers: optional list)
Parameters
  • key: AWS key.

  • secretKey: AWS secret key.

  • service: AWS service name e.g.: 'ec2'.

  • region: AWS region e.g.: 'us-east-1'.

  • sessionToken: AWS session token.

  • path: Path of the request name e.g.: '/path/to/service'. If not defined defaults to '/'.

  • method: HTTP method, e.g.: 'GET'.

  • host: AWS host e.g.: 'ec2.amazonaws.com'. If not defined defaults to: {service}.{region}.amazonaws.com. If region is also not defined defaults to {service}.amazonaws.com.

  • bodyString: data to send in the body of the HTTP request.

  • args: url parameters.

  • headers: HTTP headers.

Example:
Xml.Read(
Aws.SignedV4Request(
"my-aws-key",
Environment.Secret("aws-secret-key"),
"ec2",
host = "ec2.amazonaws.com",
region = "eu-west-1",
method = "GET",
bodyString = "",
args = [
{"Action", "DescribeRegion"},
{"Version", "2013-10-15"}
],
headers = [{"content-type", "application/x-amz-json-1.1"}]
),
type record(requestId: string, regionInfo: record(item: list(regionName: string, regionEndpoint: string)))
)