aws-cdk-lib.aws_appsync.AwsIamConfig

interface AwsIamConfig

LanguageType name
.NETAmazon.CDK.AWS.AppSync.AwsIamConfig
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsappsync#AwsIamConfig
Javasoftware.amazon.awscdk.services.appsync.AwsIamConfig
Pythonaws_cdk.aws_appsync.AwsIamConfig
TypeScript (source)aws-cdk-lib » aws_appsync » AwsIamConfig

The authorization config in case the HTTP endpoint requires authorization.

Example

const api = new appsync.GraphqlApi(this, 'api', {
  name: 'api',
  schema: appsync.SchemaFile.fromAsset(path.join(__dirname, 'schema.graphql')),
});

const httpDs = api.addHttpDataSource(
  'ds',
  'https://states.amazonaws.com',
  {
    name: 'httpDsWithStepF',
    description: 'from appsync to StepFunctions Workflow',
    authorizationConfig: {
      signingRegion: 'us-east-1',
      signingServiceName: 'states',
    }
  }
);

httpDs.createResolver('MutationCallStepFunctionResolver', {
  typeName: 'Mutation',
  fieldName: 'callStepFunction',
  requestMappingTemplate: appsync.MappingTemplate.fromFile('request.vtl'),
  responseMappingTemplate: appsync.MappingTemplate.fromFile('response.vtl'),
});

Properties

NameTypeDescription
signingRegionstringThe signing region for AWS IAM authorization.
signingServiceNamestringThe signing service name for AWS IAM authorization.

signingRegion

Type: string

The signing region for AWS IAM authorization.


signingServiceName

Type: string

The signing service name for AWS IAM authorization.