---
# System prepended metadata

title: MQTT message workflow

---

MQTT message workflow
===

Start from device
```flow
st=>start: Device
mqtt=>start: send mqtt
server=>condition: send mqtt by server from
setup on firmware
aws=>operation: send to aws iot
loten=>operation: send to loten
st->mqtt->server(no)->aws
server(yes)->loten
```

Loten
```sequence
Lotten -> EC2: MQTT client subscription into topic
EC2 -> BE server: Call api update device mqtt config
```


AWS
```sequence
MQTT->IOT act rule: Send MQTT message
IOT act rule -> SQS: Capture message
SQS -> Lambda: Call api update device mqtt config
```
