Error in sending data to IoT Core MQTT client when connecting Lambda to RDS

0

I set up AWS IoT Core using the documentation provided. Following the documentation, I implemented data parsing using Lambda, which works perfectly. The parsed data is then sent to the IoT Core MQTT client.

I wanted to store the parsed data in RDS, so I configured a VPC to connect Lambda to RDS. However, after doing this, I encountered an issue. The parsed data is successfully stored in RDS, but it no longer reaches the IoT Core MQTT client.

I believe the issue is related to the VPC configuration, but I'm not sure how to properly set it up.

2 Answers
0

Hello.

I also gave a similar answer at the URL below.
https://repost.aws/ja/questions/QUNI1ztS6tSDORMDOZ60R7kA/lambda%EC%97%90-rds%EC%97%B0%EA%B2%B0-%EC%8B%9C-iot-core-mqtt-client%EC%97%90-%EB%8D%B0%EC%9D%B4%ED%84%B0-%EC%A0%84%EC%86%A1-%EC%98%A4%EB%A5%98

Is your MQTT client EC2?
Are you connecting to an MQTT client with Lambda?
If the MQTT client is hosted on EC2, please check whether the security group allows connections from Lambda.

I think you will need a NAT Gateway to connect to IoT Core from Lambda connected to your VPC.
https://repost.aws/knowledge-center/internet-access-lambda-function

profile picture
EXPERT
answered 3 months ago
0

If your parsing Lambda is located within a VPC to reach RDS, you can create a private endpoint for the IoT Core data plane (MQTT endpoint). Note the are additional charges for VPC endpoints (PrivateLink) when transiting data this wya.

AWS
Gavin_A
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions