What I did was I took the OTA demo, intended for running in a windows simulator, and ported that to my STM32 by changing the transport interface and PAL interface. I wrote a custom driver for the cellular modem, which is the glue between the modem AT commands and the socket needed for the transport layer.
The prvMQTTpublish function works. I can see the messages coming in inside my AWS console. But it only works about 5 times, then the scheduler stops as the TaskDelay suspends it for some reason.