Allow self managed Apache Kafka as an event source
See original GitHub issueUse case description
We’d like to utilize our self managed Kafka cluster as an event source, now that AWS will allow it.
Proposed solution
I would think it would look fairly similar to what was implemented for #8117. See https://docs.aws.amazon.com/lambda/latest/dg/kafka-smaa.html for additional details. I also provided an example of what I’m thinking the serverless.yml events would look like, although feedback is appreciated!
functions:
compute:
handler: handler.compute
events:
- kafka:
saslScram512Auth: arn:aws:secretsmanager:us-east-1:01234567890:secret:MyBrokerSecretName
topic: mytopic
bootstrapServers:
- abc3.xyz.com:9092
- abc2.xyz.com:9092
- kafka:
vpcSubnets:
- subnet-0011001100
- subnet-0022002200
vpcSecurityGroups:
- sg-0123456789
topic: mytopic
bootstrapServers:
- abc3.xyz.com:9092
- abc2.xyz.com:9092
I didn’t enumerate all of the options that would be provided, but I figure it’d support all of the options for the https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html resource, but being focused on using SelfManagedEventSource
specifically.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:19 (19 by maintainers)
Top Results From Across the Web
Using Lambda with self-managed Apache Kafka
Apache Kafka as an event source operates similarly to using Amazon Simple Queue Service (Amazon SQS) or Amazon Kinesis. Lambda internally polls for...
Read more >Using self-hosted Apache Kafka as an event source ... - Noise
This post shows how to configure a self-hosted Kafka cluster on EC2 and set up the network configuration.
Read more >Amazon Lambda now supports self-managed Apache Kafka ...
Today, Lambda supports Amazon Managed Streaming for Kafka (Amazon MSK) as an event source. Now, in addition to Amazon MSK, customers can also...
Read more >Using self-hosted Apache Kafka as an ... - Serverless Land
Lambda now supports self-hosted Kafka as an event source so you can invoke Lambda functions from messages in Kafka topics to integrate into ......
Read more >Kafka - AWS Lambda Events - Serverless Framework
A self-managed Apache Kafka cluster can be used as an event source for AWS Lambda. In order to configure lambda to trigger via...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@lewgordon I’m not sure if that’s possible.
AFAIK we need to resolve a
Fn::Sub
andRef
locally to be able to compileaccessConfiguration
into result CF template, and we probably do not have a means to deduct id forLambdaSecurityGroup
resource (?)Technically the way things work in a Framework:
custom
block, (2) reference it via configuration variable (${self:custom...}
) in those properties@lewgordon thanks for explanation, yes we definitely should not support any CF intristic functions here, as it’s not a value we directly pass to CF template.
In such case I suggest to improve the syntax to one now proposed. What do you think? @pgrzesik what’s your opinion on that?