Skip to content
v2.273.0

CfnRegistryProps Struct ​

Properties for defining a CfnRegistry.

Example ​

ts
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 }],
  }),
}));

Properties ​

descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string#
A description of the registry.
namestringnamestrnameStringNamestringName*stringrequired#
The name of the registry.
tagsCfnTag[]tagstyping.List[CfnTag]tagsList<CfnTag>TagsCfnTag[]Tags*[]CfnTag#
AWS tags that contain a key value pair and may be searched by console, command line, or API.

Used as props by ​