1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
Hi,
For IoTDataPlaneClient
within Lambda, if Lambda's are being reused, moving the instantiation of client outside of the main event handler can reduce subsequent calls. Then if the same Lambda is called again, that client can be reused.
What I haven't investigated is how the underlying client managed state, and if those parameters can be adjusted. The data plane client is making HTTP POSTs for the different operations such as Publish, so creating an HTTP persistent connection could be an approach to keep a connection pool open. Not a C++ expert, but I found this example that may help.
답변함 일 년 전
관련 콘텐츠
- AWS 공식업데이트됨 3년 전
- AWS 공식업데이트됨 3년 전
Thanks for the reply,
Would there be a way to maintain the connection across Lambda invocations?
Apologies, I misread this as a full MQTT connection (when I definitely saw the reference to
IoTDataPlaneClient
too! :) ). I've updated my answer with guidance on that.