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
demandé il y a 3 ans1720 vues
1 réponse
0
Réponse acceptée

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
EXPERT
Uri
répondu il y a 3 ans
profile picture
EXPERT
vérifié il y a 15 jours
  • 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?

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions