aws / aws/aws-cdk

(lambda-event-sources): (Improve configuring authentication in SelfManagedKafkaEventSourceProps)

Open
#21,489 2 comments 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-lambda-event-sources effort/medium feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

In AWS its possible to configure a self hosted Kafka as an eventsource for a Lambda, described [here](https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html#services-smaa-topic-add).

Theres a variety of ways how to authenticate against your kafka cluster (vpc, certificates, root-ca or a combination of these).

During the review of #21422 we (@TheRealAmazonKendra, @mrgrain) came to the conclusion that the `SelfManagedKafkaEventSourceProps` could take an overhaul on how to configure authentication (this includes, vpc + authentication method + rootCACertificate) in these props.

### Use Case

When configuring a Kafka Eventsource Trigger for your Lambda on the aws console/ui its easier than with cdk.

There is a combination of required values, which isnt obvious through use of the cdk code (for example you required to either configure a vpc or a secret, but both are declared as optional values in the props). This could be simplified and could make the live of the dev easier.

### Proposed Solution

This is the rough proposed idea/solution which can be more improved/discussed (there is already some feedback in there).

https://gist.github.com/WtfJoke/bd20e0bf74d77a158f41970204560ee4

This change would most likely result in some sort of a breaking change and would need some sort of feature flag.

### Other Information

https://github.com/aws/aws-cdk/pull/21422

### Acknowledgements

- [X] I may be able to implement this feature request
- [X] This feature might incur a breaking change

### CDK version used

v2.35.0

### Environment details (OS name and version, etc.)

windows 11 (wsl)

Contributor guide

Open the contributing guide

Research direction

Start by reading the SelfManagedKafkaEventSourceProps API and the discussion in #21422, then compare the proposed shape in the linked gist with AWS's self-managed Kafka Lambda authentication documentation. Define the supported VPC, authentication, and root CA combinations, including how the breaking change or feature flag is handled; done means the configuration is explicit and usable for the documented authentication cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, kafka, typescript
Domain
backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.