Cannot publish lambda message to RabbitMQ from AWS Lambda, connection timeout

Viewed 235

I am try to publish message to RabbitMQ from AWS lambda, but it not work.

I have a instance of RabbitMQ from AWS MQ, wish have a public access (user and password only) like below.

enter image description here

The producer is an AWS Lambda with nodejs, triggered from HTTP endpoint, the class that connects with RabbitMQ looks like below.

enter image description here

When I run the code on localhost it works fine, but when deployed to AWS Lambda the connection to RabbitMQ returns timeout.

I already made sure that the connection is correct.

endPoint: amqps://my-resource.amazonaws.com:my-port.

user: my-user.

passwork: my-passwork.

Hope someone can help me, thanks in advance.

0 Answers
Related