interface HandlerConfig
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.AppSync.HandlerConfig |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappsync#HandlerConfig |
Java | software.amazon.awscdk.services.appsync.HandlerConfig |
Python | aws_cdk.aws_appsync.HandlerConfig |
TypeScript (source) | aws-cdk-lib » aws_appsync » HandlerConfig |
Handler configuration construct for onPublish and onSubscribe.
Example
declare const api: appsync.EventApi;
declare const ddbDataSource: appsync.AppSyncDynamoDbDataSource;
declare const ebDataSource: appsync.AppSyncEventBridgeDataSource;
// DynamoDB data source for publish handler
api.addChannelNamespace('ddb-eb-ns', {
code: appsync.Code.fromInline('/* event handler code here.*/'),
publishHandlerConfig: {
dataSource: ddbDataSource,
},
subscribeHandlerConfig: {
dataSource: ebDataSource,
},
});
Properties
| Name | Type | Description |
|---|---|---|
| data | App | The Event Handler data source. |
| direct? | boolean | If the Event Handler should invoke the data source directly. |
| lambda | Lambda | The Lambda invocation type for direct integrations. |
dataSource?
Type:
App
(optional, default: no data source is used)
The Event Handler data source.
direct?
Type:
boolean
(optional, default: false)
If the Event Handler should invoke the data source directly.
lambdaInvokeType?
Type:
Lambda
(optional, default: LambdaInvokeType.REQUEST_RESPONSE)
The Lambda invocation type for direct integrations.

.NET
Go
Java
Python
TypeScript (