"AWS" (Service Connection)

Interact with 200+ Amazon Web Services product APIs.

Connecting & Authenticating

ServiceConnect["AWS"] creates a connection to Amazon Web Services.
ServiceExecute["AWS","GetService""service"] retrieves a child ServiceObject representing the AWS service named "service", such as "EC2" or "CloudFormation".
Consult the Authenticate with Amazon Web Services workflow for instructions on authenticating a new service connection with your AWS credentials.

Meta Requests

ServiceExecute["AWS","request",params] performs an operation on the master AWS service connection, using parameters params. The following give possible requests.

Service Metadata

Requests:

"Services" list available AWS services

Obtain Child Service Objects

Requests:

"GetService" obtain a child ServiceObject representing a single AWS service

Parameters:
  • "Name"(required)AWS service to access
  • Child Service Requests

    After using ServiceExecute["AWS","GetService","Name""service"] to obtain a child ServiceObject obj representing a single AWS service "service", ServiceExecute[obj,"request",params] sends a request to "service" using parameters params.
    obj["request",param1val1,param2val2,] is equivalent to ServiceExecute[obj,"req",{param1val1,param2val2,}].
    A service's available requests can be listed with ServiceExecute[obj,"Requests"]. Request and parameter names correspond to those used in AWS official API documentation.
    The following additional meta requests are applicable to all child services.

    List Requests

    Requests:

    "Requests" list available requests for the service

    Request Metadata

    Requests:

    "RequestTemplate" show the expected structure of a request's payload

    "ResponseTemplate" show the expected structure of a request's response data

    Parameters:
  • "Request"(required)name of request to inspect
  • Parameter Details

    The following meta parameters are available for all service requests, in addition to those parameters given by each request's "RequestTemplate":
  • "IncludeBodyByteArray"Falseinclude ByteArray of raw response body
    "RawResponse"Falsereturn full response and failure data
    "RequestEndpoint"Automaticcustom HTTP endpoint
    "RequestRegion"Automaticoverride globally specified AWS region
    "ValidateRequest"Truevalidate request structure before sending
  • Setting "IncludeBodyByteArray"True causes a ByteArray containing the raw, unparsed response body to be included in the response metadata association. "IncludeBodyByteArray" is relevant only if "RawResponse" is also True.
    Setting "RawResponse"True causes ServiceExecute to return an association containing response metadata as well as the parsed response data. If a request error occurred, the association also contains rich failure data.
    The value of the "RequestEndpoint" parameter can be a verbatim string like "https://abcd1234.mediaconvert.us-west-1.amazonaws.com" or a string containing template variables "{service}" or "{region}", like "{service}.{region}.c2s.ic.gov". If no URL scheme is indicated, the default for the service is assumed.
    The default setting "ValidateRequest"True causes the service connection to validate supplied request parameters locally before sending a request to the server.

    Examples

    open allclose all

    Basic Examples  (2)

    Create a connection to AWS:

    List the available AWS services:

    Obtain a child ServiceObject representing Amazon Translate:

    List available requests for the service:

    Obtain a request template for the "TranslateText" request:

    Send a "TranslateText" request:

    Obtain a response template for a request:

    Request Parameters  (5)

    "IncludeBodyByteArray"  (1)

    Setting "IncludeBodyByteArray"True causes a "BodyByteArray" key to be included in the raw response association:

    The value of "BodyByteArray" is the raw response body directly from the server:

    If a request fails, "BodyByteArray" will be included regardless of the "IncludeBodyByteArray" setting:

    "RawResponse"  (1)

    Setting "RawResponse"True causes an association containing response data and metadata to be returned:

    If the request fails, the value of the "Data" key will be a Failure object:

    "RequestEndpoint"  (1)

    Certain situations may call for the use of a nondefault service endpoint:

    Supply a custom endpoint with the "RequestEndpoint" parameter:

    "RequestRegion"  (1)

    Some services are available only in certain regions:

    The "RequestRegion" parameter overrides the default region on a per-request basis:

    "ValidateRequest"  (1)

    By default, request parameters are validated against the expected structure before sending the request:

    With "ValidateRequest"False, local validation is disabled, which may result in server errors:

    Possible Issues  (1)

    With default settings, a server error will cause ServiceExecute to emit a message and return unevaluated:

    Use "RawResponse"True to instead return an association containing a Failure object: