AWS Compute Blog

Category: Amazon Managed Streaming for Apache Kafka (Amazon MSK)

Setting up NAT Gateway

Setting up AWS Lambda with an Apache Kafka cluster within a VPC

Using resources such as NAT Gateways and VPC endpoints with PrivateLink, you can ensure that your data remains secure while also granting access to resources such as Lambda to help you create a Kafka consumer application. This post provides some tips to help you set up a Lambda function using Kafka as a trigger. It also explains various options available to send data securely.

Event payload example

Using self-hosted Apache Kafka as an event source for AWS Lambda

Lambda now supports self-hosted Kafka as an event source so you can invoke Lambda functions from messages in Kafka topics to integrate into other downstream serverless workflows. This post shows how to configure a self-hosted Kafka cluster on EC2 and set up the network configuration. I also cover how to set up the event source mapping in Lambda and test a function to decode the messages sent from Kafka.