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
preguntada hace 3 años1720 visualizaciones
1 Respuesta
0
Respuesta aceptada

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
EXPERTO
Uri
respondido hace 3 años
profile picture
EXPERTO
revisado hace 15 días
  • 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?

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas