# Device and IoT data

> Thousands of devices sending readings that end up in reports. Nicolas Dao's picks for this job (Cloudless Labs, Sydney), in order of preference, what he would avoid, and what to use instead.

- Use case 9 of 21 in The Stack, last reviewed 21 October 2026
- Web page: https://cloudlesslabs.com/stack/use-cases/iot/

Picks, in order of preference:

1. **[AWS IoT Core](https://cloudlesslabs.com/stack/aws-iot-core/index.md)** (Use when it fits (Proposed: research-backed, not yet confirmed by Nic)): Cheapest AWS front door if devices speak MQTT.
2. **[Amazon SQS](https://cloudlesslabs.com/stack/aws-sqs/index.md)** (My default): Buffer, then batch into Lambda.
3. **[Neon (serverless Postgres)](https://cloudlesslabs.com/stack/neon/index.md)** (My default): Postgres wins for ingest-and-report.

Don't:

- ~~API Gateway~~: A per-request HTTP front door for a stream of tiny messages. At 216M messages a month, the REST API alone costs about $756. The whole IoT Core pipeline, processing included, costs about $215–230. Instead: [AWS IoT Core](https://cloudlesslabs.com/stack/aws-iot-core/index.md).
- ~~Amazon SNS~~: SNS invokes Lambda once per message: at device volumes that's millions of tiny invocations. SQS lets Lambda take them in batches. Instead: [Amazon SQS](https://cloudlesslabs.com/stack/aws-sqs/index.md).
- ~~Cloudflare Durable Objects~~: Each object only sees its own data, so there's no SQL across devices for reports. Use them only for sending commands back to devices; the readings belong in Postgres. Instead: [Neon (serverless Postgres)](https://cloudlesslabs.com/stack/neon/index.md).

Worked example: [IoT ingestion into Postgres](https://cloudlesslabs.com/stack/guides/iot-ingestion/index.md)

## The picks in brief

- [AWS IoT Core](https://cloudlesslabs.com/stack/aws-iot-core/index.md): Use when it fits (Proposed: research-backed, not yet confirmed by Nic). The cheapest AWS front door for device data, when the devices speak MQTT. Pricing: Sydney: $0.096 per million connection-minutes, $1.20 per million messages (metered in 5 KB steps), $0.18 per million rules triggered plus $0.18 per million actions. Basic Ingest messages carry no messaging charge. In my IoT example (5,000 devices, one message a minute), IoT Core → SQS → batched Lambda → Postgres ≈ $215–230 a month vs about $1,014–1,109 for API Gateway REST → SNS → Lambda.
- [Amazon SQS](https://cloudlesslabs.com/stack/aws-sqs/index.md): My default. The queue in front of Lambda. Natural back-pressure, nearly free when batched. Pricing: Sydney: $0.40 per million requests (Standard), $0.50 (FIFO). A request carries up to 10 messages, so batching cuts the bill tenfold: 50M messages ≈ $6 batched, $60 unbatched.
- [Neon (serverless Postgres)](https://cloudlesslabs.com/stack/neon/index.md): My default. My go-to Postgres. Scales to zero, branches like git, and talks HTTP so Lambda needs no VPC or proxy. Pricing: Launch plan $0.106 per compute-unit hour, Scale $0.222; storage $0.35/GB-month; no minimum. Available in Sydney.

## Related

- [IoT ingestion into Postgres](https://cloudlesslabs.com/stack/guides/iot-ingestion/index.md): the worked example for this job, with costs
- [Edge](https://cloudlesslabs.com/stack/layers/edge/index.md): every tool in this layer
- [APIs, queues and events](https://cloudlesslabs.com/stack/layers/api-events/index.md): every tool in this layer
- [Data](https://cloudlesslabs.com/stack/layers/data/index.md): every tool in this layer
- [Every use case and tool in one file](https://cloudlesslabs.com/stack/brief.md)
- [Map of every Markdown file on cloudlesslabs.com, with what each one answers](https://ask.cloudlesslabs.com)
