0

I'm trying out the Serverless Framework to deploy AWS Lambda to process Kafka Messages and write result to Database. The trigger is Kafka Messages from a SelfManagedKafka cluster and I specify them in serverless.yml

frameworkVersion: '1'

provider:
  name: aws
  runtime: go1.x
  region: eu-central-1

package:
  exclude:
    - ./**
  include:
    - ./bin/**

functions:
  hello:
    handler: bin/handlerFunc
    vpc:
      securityGroupIds:
        - <Id>
      subnetIds:
        - <subnet1>
        - <subnet2>
        - <subnet3>
    events:
      - kafka:
          topic: my_topic
          consumerGroupId: my_group
          bootstrapServers:
            - host:port
          accessConfigurations:
            saslScram256Auth: <URI to secretsManager>
            serverRootCaCertificate: <URI to secretsManager>
            vpcSubnet:
              - subnet1
              - subnet1
              - subnet1
            vpcSecurityGroup: <Id>
          enabled: true

When I deploy this serverless deploy, on the AWS Console for Lambda, there's no Trigger configured and no error, no logs.

serverless deploy shows warning Configuration warning at 'functions.hello.events[0]': unsupported function event

I'm following the documentation here https://www.serverless.com/framework/docs/providers/aws/events/kafka

and don't understand what I'm missing.

Any suggestions on where/what to look for?

1 Answer 1

1

Turns out event type kafka is not supported in SeverlessFramework version 1.

I had to update to version 3 and update the serverless.yml to refere to FrameworkVersion: '3'

And was able to Deploy Lambda with Apache Kafka as Tigger.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.