How do I configure an Amazon MQ instance that's in a VPC to invoke a Lambda function?

0

I set up an Amazon MQ instance in a VPC and configured an MQ trigger to invoke a Lambda function. The function is assigned to the same VPC and Security Group as the Amazon MQ instance, but the MQ trigger keeps returning the following error:

PROBLEM: Connection error. Please check your event source connection configuration.

If I make the Amazon MQ instance publicly accessible, the MQ trigger invokes the function. However, I can't make the Amazon MQ instance publicly accessible because of security requirements.

Is there a way to have the MQ trigger invoke the Lambda function without making the Amazon MQ instance public?

AWS
Jason_W
已提問 3 年前檢視次數 1720 次
1 個回答
0
已接受的答案

To have an Amazon MQ instance that's in a VPC invoke a Lambda function, your broker must either use a public endpoint or provide access to the VPC. To provide access to the VPC, you must create an interface VPC endpoint. For more information, see Configuring interface VPC endpoints for Lambda.

profile pictureAWS
專家
Uri
已回答 3 年前
profile picture
專家
已審閱 15 天前
  • I have a question to your answer: If the Lambda is within the same VPC as the MQ instance already as the OP said, why do I need to create an interface VPC endpoint? Shouldn't the Lambda already be able to access the MQ instance then?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南