"unable to get local issuer certificate" Error When Subscribing to MQTT Topic in Serverless Framework

0

I'm experiencing an issue with my Serverless configuration when subscribing to an MQTT topic that triggers a Lambda function. The function is monitored by Sentry, and I'm encountering an error related to SSL/TLS certificates.

Here’s a snippet of my Serverless configuration:

functions:
  updateThingStatus:
    handler: src/locations.updateThingStatus
    events:
      - iot:
          sql: "SELECT * FROM '$aws/events/presence/+/+'"

I am subscribing to an MQTT topic to invoke my Lambda function, but I am getting the following error: unable to get local issuer certificate The stack trace from the error is:

node:_tls_wrap in TLSSocket.onConnectSecure at line 1674:34
node:events in TLSSocket.emit at line 519:28
node:domain in TLSSocket.emit at line 488:12
node:_tls_wrap in TLSSocket._finishInit at line 1085:8
node:_tls_wrap in ssl.onhandshakedone at line 871:12
node:internal/async_hooks in TLSWrap.callbackTrampoline at line 130:17

It seems the error occurs before my Lambda function is called.

Additional Information: I am using the Serverless Framework to deploy the function. The Lambda function is monitored using Sentry.

Any insights or suggestions would be greatly appreciated. Thanks!

Mahyar
asked 3 months ago140 views
1 Answer
0

Hi,

I'm not sure what your specific goal is with Lambda, But if you're looking to perform a simple "ETL" process, using the Rule Engine might be easier than relying on Event-driven Lambda function.

Here is the Basic IoT Architecture from The IoT Lens of AWS WAF

[Edge Layer] -> [Communication Layer: AWS IoT Core] -> [Ingestion Layer: AWS IoT Rules Engine with Rules] -> [Data Processing and Storage: Timestream / S3] <- [Analytics Layer] - [Application Layer: Lambda]

Note:

  • Ingestion Layer : AWS IoT Rules Engine, to process and route incoming data

I hope this helps!

profile picture
answered 2 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