# KafkaSchemaValidationConfig

Specific schema validation configuration settings that tell Lambda the message attributes you want to validate and filter using your schema registry.

- Source: [`aws-lambda/lib/schema-registry.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-lambda/lib/schema-registry.ts#L139)
- Type last changed: v2.202.0 · 20 Jun 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';

declare const kafkaSchemaValidationAttribute: lambda.KafkaSchemaValidationAttribute;
const kafkaSchemaValidationConfig: lambda.KafkaSchemaValidationConfig = {
  attribute: kafkaSchemaValidationAttribute,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lambda as lambda_

# kafka_schema_validation_attribute: lambda.KafkaSchemaValidationAttribute

kafka_schema_validation_config = lambda.KafkaSchemaValidationConfig(
    attribute=kafka_schema_validation_attribute
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lambda.*;

KafkaSchemaValidationAttribute kafkaSchemaValidationAttribute;

KafkaSchemaValidationConfig kafkaSchemaValidationConfig = KafkaSchemaValidationConfig.builder()
        .attribute(kafkaSchemaValidationAttribute)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;

KafkaSchemaValidationAttribute kafkaSchemaValidationAttribute;

var kafkaSchemaValidationConfig = new KafkaSchemaValidationConfig {
    Attribute = kafkaSchemaValidationAttribute
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var kafkaSchemaValidationAttribute KafkaSchemaValidationAttribute

kafkaSchemaValidationConfig := &KafkaSchemaValidationConfig{
	Attribute: kafkaSchemaValidationAttribute,
}
```

## Properties

- `attribute`: [KafkaSchemaValidationAttribute](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.KafkaSchemaValidationAttribute.html) (required) — The attributes you want your schema registry to validate and filter for.

  If you selected JSON as the EventRecordFormat, Lambda also deserializes the selected message attributes.
