aws::api-gateway-authorizer

Create an authorizer.

Example

aws::api-gateway-authorizer example-authorizer
    api: $(aws::api example-api)
    name: "example-authorizer"
    authorizer-type: JWT

    identity-sources: [
        '$request.header.Authorization'
    ]

    jwt-configuration
        audiences: [
            "example-audience"
        ]

        issuer: "https://cognito-idp.us-east-2.amazonaws.com/us-east-2_pQJThFAx4"
    end
end

Attributes

Attribute Description
api The API for which to create an authorizer. (Required)
authorizer-credentials The required credentials as an IAM role for API Gateway to invoke the authorizer.
authorizer-payload-format-version The format of the payload sent to an HTTP API Lambda authorizer.
authorizer-result-ttl-in-seconds The time to live (TTL) in seconds for cached authorizer results.
authorizer-type The type of the authorizer. Valid values are REQUEST or JWT. (Required)
authorizer-uri The Uniform Resource Identifier (URI) of the authorizer.
enable-simple-responses When set to true, the authorizer returns a response in a simple format.
identity-sources list The identity source for which authorization is requested. (Required)
jwt-configuration subresource

The configuration of the JSON Web Token (JWT) authorizer.

audiences list
The list of the intended recipients of the JWT. (Required)
issuer
The base domain of the identity provider that issues JSON Web Tokens. (Required)
name The name of the authorizer. (Required)

Outputs

Attribute Description
id The ID of the authorizer.