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
posta 3 anni fa1720 visualizzazioni
1 Risposta
0
Risposta accettata

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
ESPERTO
Uri
con risposta 3 anni fa
profile picture
ESPERTO
verificato 15 giorni fa
  • 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?

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande