0

I'm trying to set MSK as a trigger of AWS Lambda. But there is a problem like the one below. [PROBLEM: Connection error. Your VPC must be able to connect to Lambda and STS, as well as Secrets Manager if authentication is required. You can provide access by configuring PrivateLink or a NAT Gateway.]

I set the Lambda's VPC the same as the MSK cluster's EC2.

But the problem isn't solved.

What should I do to solve the problem? enter image description here

CHAHI Saad
  • 309
  • 4
  • 15
LYG
  • 41
  • 1
  • 7
  • 1
    Have you taken a look at this [Using Amazon MSK as an event source for AWS Lambda](https://aws.amazon.com/pt/blogs/compute/using-amazon-msk-as-an-event-source-for-aws-lambda/)? – pbsb Apr 25 '22 at 23:05

1 Answers1

0

Take another look at your security configuration. You need 2 private subnets which would host MSK brokers and 2 public subnets. You also need a NAT gateway connected to private subnet route tables.

I fixed this issue by attaching internet gateway to inbound rule of public subnets route table and NAT gateway to inbound rule of private subnet route table.