AwsIamConfig

class aws_cdk.aws_appsync.AwsIamConfig(*, signing_region, signing_service_name)

Bases: object

The authorization config in case the HTTP endpoint requires authorization.

Parameters:
  • signing_region (str) – The signing region for AWS IAM authorization.

  • signing_service_name (str) – The signing service name for AWS IAM authorization.

ExampleMetadata:

infused

Example:

api = appsync.GraphqlApi(self, "api",
    name="api",
    definition=appsync.Definition.from_file(path.join(__dirname, "schema.graphql"))
)

http_ds = api.add_http_data_source("ds", "https://states.amazonaws.com",
    name="httpDsWithStepF",
    description="from appsync to StepFunctions Workflow",
    authorization_config=appsync.AwsIamConfig(
        signing_region="us-east-1",
        signing_service_name="states"
    )
)

http_ds.create_resolver("MutationCallStepFunctionResolver",
    type_name="Mutation",
    field_name="callStepFunction",
    request_mapping_template=appsync.MappingTemplate.from_file("request.vtl"),
    response_mapping_template=appsync.MappingTemplate.from_file("response.vtl")
)

Attributes

signing_region

The signing region for AWS IAM authorization.

signing_service_name

The signing service name for AWS IAM authorization.