-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat(lambda): support for schema registry for kafka #34746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| // Create the app and stacks | ||
| const app = new App({ | ||
| postCliContext: { | ||
| '@aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy': true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you regenerate the snapshots by setting this flag as false ?
This the default value of the flag it would be good to have that as a guidance for anyone working with these set of features in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the flag added the destructive actions warning back. It also updated manifest to have those warnings:
"/lambda-event-source-glue-schema-registry/GlueFunction/inlinePolicyAddedToExecutionRole-0/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "GlueFunctioninlinePolicyAddedToExecutionRole043C5A5B3",
"trace": [
"!!DESTRUCTIVE_CHANGES: WILL_DESTROY"
]
}
],
kumvprat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
Reason for this change
Lambda is introducing a new property in Event Sources named
SchemaRegistryConfiginSelfManagedKafkaEventSourceConfigandAmazonManagedKafkaEventSourceConfigto set configuration settings for a schema registry that will be used to de-serialize the event read from these Kafka event sources. When specified, it allows de-serialization events before they are passed to target function and validation of their format. The users may use a Confluent registry, a self managed registry or AWS Glue Registry. Note, the even source mapping must haveProvisionedPollerConfigset (be on provisioned mode) for this feature to be used.This feature is currently supported for MSK and Self-managed Kafka event sources.
Description of changes
This new property can be opted in by setting
SchemaRegistryConfiginSelfManagedKafkaEventSourceConfigorAmazonManagedKafkaEventSourceConfig. An example is shown bellow:Describe any new or updated permissions being added
Following IAM permissions will be added to the target function execution role only if user passed a Glue registry.
Description of how you validated changes
Unit tests for each case have been added in the PR. Note, MSK and SMK validations follow the same path so for validations there are only unit tests for MSK cases which should apply for both.
Integration test for both Glue and confluent case have been added for SMK. Since, MSK requires a Kafka cluster in VPC that we typically do not add integration tests for it.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license