class GlueSchemaRegistry
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.Lambda.EventSources.GlueSchemaRegistry | 
|  Go | github.com/aws/aws-cdk-go/awscdk/v2/awslambdaeventsources#GlueSchemaRegistry | 
|  Java | software.amazon.awscdk.services.lambda.eventsources.GlueSchemaRegistry | 
|  Python | aws_cdk.aws_lambda_event_sources.GlueSchemaRegistry | 
|  TypeScript (source) | aws-cdk-lib»aws_lambda_event_sources»GlueSchemaRegistry | 
Implements
ISchema
Glue schema registry configuration for a Lambda event source.
Example
import { CfnRegistry } from 'aws-cdk-lib/aws-glue';
import { ManagedKafkaEventSource, GlueSchemaRegistry } from 'aws-cdk-lib/aws-lambda-event-sources';
// Your MSK cluster arn
declare const clusterArn: string;
// The Kafka topic you want to subscribe to
const topic = 'some-cool-topic';
// Your Glue Schema Registry
const glueRegistry = new CfnRegistry(this, 'Registry', {
  name: 'schema-registry',
  description: 'Schema registry for event source',
});
declare const myFunction: lambda.Function;
myFunction.addEventSource(new ManagedKafkaEventSource({
  clusterArn,
  topic,
  startingPosition: lambda.StartingPosition.TRIM_HORIZON,
  provisionedPollerConfig: {
    minimumPollers: 1,
    maximumPollers: 3,
  },
  schemaRegistryConfig: new GlueSchemaRegistry({
    schemaRegistry: glueRegistry,
    eventRecordFormat: lambda.EventRecordFormat.JSON,
    schemaValidationConfigs: [{ attribute: lambda.KafkaSchemaValidationAttribute.KEY }],
  }),
}));
Initializer
new GlueSchemaRegistry(props: GlueSchemaRegistryProps)
Parameters
- props GlueSchema Registry Props 
Methods
| Name | Description | 
|---|---|
| bind(_target, targetHandler) | Returns a schema registry configuration. | 
bind(_target, targetHandler)
public bind(_target: IEventSourceMapping, targetHandler: IFunction): KafkaSchemaRegistryConfig
Parameters
- _target IEventSource Mapping 
- targetHandler IFunction
Returns
Returns a schema registry configuration.
