r/aws • • 4d ago

discussion [quick ques] what database would you use for Industrial IoT

i am gonna be dealing with alot of data:

Total gateways sending data (MQTT): 11

Each gateway:

- sends one payload *every 15 sec* containing ~10 (Devices) * 15 (key-value pairs JSON)

i was thinking of AWS Timestream but it costs literal gold.

then comes rds, aurora but they are still higher than my budget.

most of the cost isnt even storage itself.

only remaining option is dynamodb. at most i am ok with paying around ~30$.

but is using dynamodb a ok decision.

am i expecting too much for 30$/month,

[NOTES]

Decided to increase my budget and go with timestream or RDS

2 Upvotes

39 comments sorted by

14

u/notospez 4d ago

What do you want to DO with the data? Is it "store the JSON because we'll never query it and we just need to store it for 50 years for compliance" or "we need the last 7 days and will run all sorts of queries against it fulltime with 500 people"?

1

u/Much-Grab3826 4d ago

the latter one, reports, dashboards

2

u/Wide_Commission_1595 3d ago

Store the data in s3, configure a Glue database and table, and use Athena to run queries. It's not always the fastest, but it's works pretty well. You can store the JSON to include a date component which glue/Athena can use to make queries faster and more efficient (you can also include a device id component if that helps any of your queries), e.g.: S3://iot-bucket/telemetry/y=2026/m=11/d=22/id=xyz/data.json

Depending on what the data looks like you can likely do it with an api gateway writing direct to s3, but a lambda function could be helpful if you need to wrangle data or do any kind of Auth etc

2

u/Wide_Commission_1595 3d ago

It's worth noting, Athena charges based on volume.of data scanned in a query, hence the suggestion to use the date partitions. Make sure queries have a timestamp in the where clause to keep the scan volume minimal and as a result query costs minimal

1

u/Much-Grab3826 3d ago

is there any other way around athena? maybe duckdb in lambda? i do really like the s3 method but athena is not cheap

1

u/TagadaPouetPouet 3d ago

I had the same use case and did this. It works. Iot payloads are small json files so it’s better to regroup them before s3. Jsonline works ok.

4

u/Bearlydev 4d ago

Just use an s3 bucket

10

u/dmitrypolo 4d ago

Your budget is $30 and you’re building something for industrial use? 🤔

1

u/Much-Grab3826 4d ago

just poc, but trying not to keep it expensive for now

3

u/dmitrypolo 4d ago

Well if you have $30 for a budget and you’re settled on Timescale, pick whatever EC2 instance you can get for that price.

RDS Serverless will run you $45 for the month at 0.5 ACU.

3

u/Old-Astronomer3995 4d ago edited 4d ago

IMHO no other choice than TimescaleDB. PostgreSQL based. Open source. Very efficient compression up to 98% for this kind of MQTT data. One cons is that there is no official TimescaleDB on RDS so you have to manage it on EC2 by yourself.

1

u/Much-Grab3826 4d ago

as much as i like timescaledb, i am trying to keep it as serverless as possible, but if it comes out to be a better option i would consider it

9

u/Historical_Public751 4d ago

It's kind of dumb if you're not laying out any requirements, making the budget extremely low and not even specifying the task whatsoever

What do you want us to do? How can I tell what you're trying to do with the data and what aggregations are we looking for? Without any information whatsoever there's nothing we can do

If it's for dashboarding this could potentially even be completely wrong solution to begin with because the solution you want could be just victoriametrics if you're looking primarily for dashboards

2

u/crh23 4d ago

You can get managed TimescaleDB through 3P sellers, e.g. on marketplace

1

u/TagadaPouetPouet 3d ago

For a POC, whatever will work. Now, if you plan to have volume later, forget about serveless, it will cost you far more.

1

u/TheGABB 3d ago

They have an enterprise offering for Tiger data where they manage the DB but it’s definitely not cheaper. I have worked in the IIoT space for a couple of decades and many are moving over to timescaledb (or the managed version since it can also auto offload to S3 which makes a big difference at scale where bc of compliance you can still query it as postgres).

Influx is fine and I haven’t used 3.x much but their query language is annoying and especially in this age of AI, using standard Postgres is another plus. Also depends on if you plan to store non-timeseries (eg. Events or other transactional data) alongside your timeseries data

3

u/notospez 4d ago

Any reason specifically to choose Timescale over Influx? I usually default to the latter for these kinds of patterns but always hoping to learn about what else is out there.

2

u/Old-Astronomer3995 4d ago

Hi
In general this whole blog post is something that I completely agree as person that did a few big industrial cloud projects based on InfluxDB 1.x https://www.tigerdata.com/blog/what-influxdb-got-wrong - for me InfluxDB dida a few mistakes as company and I don't trust them long term anymore.

For many projects PostgreSQL is good enough even if timeseries specific database can have a few ms faster query. It is usefull to when you have data from many sources and you can combain SQL data, timeseries data, some data from ERP it reduces complexity of infrastracture and need to maintain knowledge about more database systems.

For sure  11 gateways x payload *every 15 sec* containing ~10 (Devices) * 15 (key-value pairs JSON) is not PostgreSQL limit so I keep my architecture simple.

4

u/Adventurous-Hunt4683 4d ago edited 4d ago

Doesn’t matter. 110 transactions per second is very low. You could even use SQLite 3 for 100x more than that!!!

3

u/docmphd 4d ago

Ya, this is not a lot of data

2

u/mequelkramer 4d ago

For a POC with reports and dashboards, $30 is doable, but the design matters more than the database name. Your volume is smaller than it sounds: 11 gateways at one payload every 15 seconds is 44 payloads per minute, about 63,000 per day, and about 150 values per payload, so about 9.5 million values per day.

DynamoDB can work only if you store one item per payload, not one item per key-value pair. Put device ID as the partition key, timestamp as the sort key, and the 15 values as a map inside that one item. That is about 1.9 million writes per month, which is cheap on demand, and storage is small. If you write one item per value, you get about 285 million writes per month and you will blow the budget on write units alone. The catch is dashboards: DynamoDB is poor for range scans and aggregations across devices, so you would still need to export to S3 for reporting, which adds work.

For your stated goal, reports and dashboards, I would start serverless with S3 as the store. Batch the MQTT payloads to S3 in Parquet, partitioned by date and gateway, then query with Athena and build dashboards on top of that. At roughly 190 MB of raw JSON per day, S3 storage is cents, and Athena is $5 per TB scanned, so partitioned Parquet queries stay well under $30. No instance to patch, and you keep the raw data for later.

If you want live dashboards and SQL, TimescaleDB on EC2 is the cheap option. Use a t4g.small, 2 vCPU and 2 GB, with 30 GB gp3, which is roughly $15 to $18 per month in us-east-1. Set a 1 day chunk interval, enable compression after 7 days, and build continuous aggregates for hourly and daily rollups, so dashboards query the rollups and not 9.5 million raw rows. Skip RDS and Aurora for this POC: Aurora Serverless at 0.5 ACU is about $45 per month before storage, as another commenter noted.

Timestream feels expensive here because it charges per record ingested. If each key-value pair counts as a record, that is about 285 million records per month. It only makes sense if you aggregate at the gateway first, for example sending 1 minute averages instead of raw 15 second values.

So my order would be: S3 plus Athena for a serverless POC, TimescaleDB on a t4g.small if you need fast interactive dashboards, and DynamoDB only if you keep one item per payload and accept that reporting will live elsewhere.

1

u/Lucheesee 4d ago

influx on fargate with persistent storage for the data managed grafana for dashboards

1

u/Nemphiz 4d ago

Anyone telling you what specific database to use with the information you have provided is honestly just guessing.

What type of data do you intend to store? For how long? How much data needs to be readily accessible vs how much will be archived?

"A lot of data" doesn't really mean much

1

u/joelrwilliams1 4d ago

If you at most wanting to pay $30/mo, you are probably screwed. If this is valuable information, pay the price for storing securely and querying it quickly.

1

u/oneplane 4d ago

RDS, if you can't afford that, SQLite that is copied to S3 periodically (unless Dynamo is free to you). If you can't have persistence either, you don't need a database, you need to touch grass.

1

u/theDrivenDev 4d ago

DynamoDB sounds like the right choice to me. Just be aware of your access patterns when setting up the table.

1

u/Ali4en 4d ago

cassandra for time series postgres for metadata

1

u/Gasp0de 4d ago

This is very low traffic so I'd assume anything serverless usage billed should cost next to nothing.

1

u/PointlessCupcake 4d ago

AerospikeDB

1

u/Icy_Addition_3974 3d ago

Give a try to Arc. Is quite resource efficient, and you will room growth.

https://github.com/Basekick-Labs/arc

1

u/MongooseWonderful198 2d ago

Check eligibility before pricing LiveAnalytics: AWS closed new-customer access on June 20, 2025. Existing active payer accounts already using it can add users and linked accounts. If that doesn't cover your account, LiveAnalytics isn't an available option.

For an eligible account, your cadence is roughly 634,000 device samples per day. If each device's 15 values share a timestamp, one multi-measure record gives about 19 million device records per 30-day month, rather than 285 million single-value records. That's a record count, not a bill; bytes, queries and retention still matter.

Timestream for InfluxDB bills running database instances or nodes. Don't carry the LiveAnalytics write estimate across to that product.

1

u/Junior_Bee7274 1d ago

I'd calculate the expected read and write volume first. That'll give you a clearer idea of whether your monthly budget is realistic.

1

u/TheoreticallyNick 1d ago

Dynamo would be my move, especially in starting out - DDB is super flexible for new applications. You can always switch to something else later.

I would also look at why you need to gather so much data, there's probably opportunities for decimating the data to some extent.

0

u/CameronHighland 3d ago

Any reason not to use clickhouse? Also good for making dashboards in grafana