Skill 24 · Architect For Startups
Subchapter 24.18
references/iot.mdMarkdown14 KBView on GitHub
IoT costs are multiplicative: devices × messages/device × actions/message. A fleet of 10,000 devices sending 1 msg/sec generates 864M messages/day. Startups that prototype with 10 devices don’t see this coming.
| Fleet size | Msg frequency | IoT Core messaging cost | Storage cost (Timestream) | Total minimum |
|---|---|---|---|---|
| 100 devices | 1/min | $4 | $20 | ~$50 |
| 1,000 devices | 1/min | $44 | $200 | ~$400 |
| 10,000 devices | 1/min | $440 | $2,000 | ~$4,000 |
| 10,000 devices | 1/sec | $26,400 | $120,000 | 🚨 |
The lesson: Message frequency is the cost multiplier. Design for the lowest frequency that meets product requirements. If you need 1/sec sensing but only 1/min cloud reporting, aggregate at the edge.
| Stage | Fleet size | Architecture | What to skip |
|---|---|---|---|
| Prototype (< 50 devices) | < 50 | IoT Core → Rules → DynamoDB/S3. Done. | Greengrass, SiteWise, Fleet Indexing, Device Defender |
| Pilot (50-1000 devices) | 50-1K | Add: Device Shadow, Fleet Provisioning, basic monitoring | SiteWise (unless industrial), multi-region, Greengrass (unless offline needed) |
| Scale (1K-100K devices) | 1K-100K | Add: Greengrass edge compute, Fleet Indexing, Device Defender, Timestream | Custom analytics platform (use Timestream + Grafana) |
| Enterprise (100K+) | 100K+ | Full stack: multi-region, SiteWise if industrial, custom data lake | Nothing — you need it all |
Standard MQTT publish: $1.00 per million messages broker fee + rules engine fee.
Basic Ingest ($aws/rules/<rule-name> topic): $0 broker fee, only rules engine actions charged.
Use Basic Ingest for all high-volume telemetry that only needs to flow to the cloud (no device-to-device). Most startup telemetry is one-directional. This saves 50% on messaging costs with a topic prefix change.
| Need | Choice | Monthly cost at 10K devices, 1 msg/min |
|---|---|---|
| Real-time dashboards, sub-second queries | Timestream | ~$2,000 |
| Nightly batch analytics, ad-hoc queries | S3 + Athena | ~$50-100 |
| Both | Timestream for last 24h, S3 for historical | ~$500 (short memory retention) |
Startup default: S3 + Athena until you have a real-time dashboard requirement. Most seed-stage IoT startups query telemetry weekly, not in real-time.
10,000 devices × 1 msg/sec = 864M writes/day = ~$1,100/day on-demand DynamoDB.
Never store raw time-series telemetry in DynamoDB. Use it only for device metadata, latest-known state, and configuration. Route telemetry to Timestream (10-20x cheaper for time-series writes) or S3 ($0.023/GB/month).
OpenSearch clusters run 24/7 (~$200-500/month minimum). If your dashboard usage is intermittent (operators check once/day), use:
Hardware startups often overlook this: a cellular modem (LTE-M/NB-IoT) costs $0.50-2.00/MB depending on carrier. A device sending 1KB every minute = 1.4MB/month = ~$1-3/device/month in CARRIER costs alone. At 10K devices, that’s $10-30K/month before AWS sees a single byte.
Optimization: Aggregate readings on-device and send batched payloads every 5-15 minutes instead of per-reading. Compress with CBOR instead of JSON (40-60% smaller). This directly reduces your carrier bill — often your largest IoT cost at scale.
Greengrass adds significant operational complexity (component deployments, edge device management, Nucleus updates). Start with direct MQTT to IoT Core unless you have one of these hard requirements:
When to add Greengrass: When your cloud ingestion bill exceeds the operational cost of managing edge infrastructure, OR when you have a hard offline/latency requirement.
Shared certificates are tempting for prototypes (“just get devices connected”). But revocation of a shared cert disconnects your entire fleet. The migration from shared → per-device certs is painful at scale. Start with per-device certs from day one using Fleet Provisioning by Claim.
| Manufacturing capability | Method | Startup phase |
|---|---|---|
| Can’t install unique certs (most startups) | Fleet Provisioning by Claim | Use from day one |
| Have a mobile app for setup | Fleet Provisioning by Trusted User | Consumer IoT |
| Factory installs unique certs | JITP | Later stage, when you own manufacturing |
Critical: Always add a pre-provisioning Lambda hook to validate device serial numbers against an allow-list. Without it, anyone who reverse-engineers your firmware can provision unlimited devices.
IoT startups that can’t OTA update their fleet die slowly. A bug in the field with no update path means:
From day one: Even if you skip everything else, implement IoT Jobs-based OTA updates with rollback. Configure abort criteria (>5% failures = halt rollout). Test the update path before shipping your first 10 devices. The cost of getting this wrong at 1,000 devices is company-ending for a hardware startup.
| Signal | Where to run inference | Why |
|---|---|---|
| < 10 inferences/hour, small payload | Cloud (Lambda or Bedrock) | Simpler, no edge ML complexity |
| > 100 inferences/hour OR latency < 200ms | Edge (Greengrass + local model) | Bandwidth/latency requirements justify edge complexity |
| Camera/video data | Edge always | Streaming video to cloud is prohibitively expensive |
| Model > 500MB, device has < 2GB RAM | Cloud | Model doesn’t fit on device |
Software startups iterate weekly. Hardware startups iterate quarterly (PCB rev cycles). This mismatch kills IoT startups that plan cloud architecture in lockstep with hardware timelines.
What to do: Over-provision your cloud capabilities relative to hardware. Your first PCB will be wrong. Your second will be better. Your cloud architecture needs to absorb both without re-architecture. Specifically:
Most IoT startups start thinking they’re building a platform. They’re not. They’re building one connected product.
| You’re building a… | Architecture approach | Skip |
|---|---|---|
| Connected product | Single device type, simple rules, focused dashboard | Multi-tenancy, device type abstraction, white-labeling infrastructure |
| IoT platform/SaaS | Multi-tenant from day one, device-type-agnostic ingest | Nothing — but hire for this complexity |
90% of seed-stage “IoT platforms” should be connected products first. Build the platform abstraction only after you have 3+ customers wanting different device types. The premature platform trap wastes 6-12 months of engineering on infrastructure your first 5 customers don’t need.
IoT startups often give away 50-200 devices as “pilots.” The architecture cost at pilot scale ($50-400/month from the tables above) is trivial. But the customer expects the same architecture when they order 10,000 devices — and that’s $4,000+/month.
Before the pilot: Model the cost at the customer’s target fleet size. If the unit economics don’t work (cloud cost per device > willingness to pay), you have a business model problem, not a technology problem. Discover this before the pilot, not after.
A typical hardware startup’s BOM cost is $50-200/device with 40-60% gross margins on hardware sale. If your cloud cost is $5/device/month and customer pays $10/device/month for the “subscription” — your cloud COGS is 50% of recurring revenue before you pay for anything else.
Model this explicitly for investors:
If Z > 30% of Y, optimize your architecture before scaling, not after.
IoT Core free tier: 500,000 messages/month for 12 months. That’s ~11 messages/minute across your entire fleet. With 50 pilot devices sending 1 msg/min, you burn through free tier in 7 days.
Don’t promise “zero cost pilot” to customers based on free tier math. It doesn’t scale to even modest pilots.