Gotchas and Watch-Outs¶
Things that will bite you if you don't know about them.
| Item | Detail |
|---|---|
| Fleet Hub EOL | Fleet Hub was discontinued October 2025. Use the IoT Device Management console directly for fleet queries. |
| Dynamic Thing Groups — eventual consistency | Group membership evaluates asynchronously. Newly registered devices may take seconds to appear. Don't rely on synchronous membership for sequenced job targeting. |
| Shadow size limit | 8 KB per named shadow. Keep high-frequency telemetry in MQTT topics, not shadows. |
| Fleet Provisioning token expiry | The certificateOwnershipToken from CreateKeysAndCertificate expires after 1 hour. EC2 user data must run provisioning on first boot, not deferred. |
| IoT Jobs — max pending per device | Don't queue more than 10–15 concurrent jobs to any single device. |
| MSK Serverless + IoT Kafka action | MSK Serverless does not support SASL/SCRAM. The IoT Rules Engine Kafka action requires Provisioned MSK with SASL/SCRAM or mTLS. |
| Firehose is at-least-once delivery | Firehose can redeliver records after a retry, so the Iceberg table can contain duplicates. The archive-tier reference queries are aggregates, so this doesn't affect the workshop, but don't build an exactly-once assumption on top of this tier. |
| Firehose flushes on size OR time, whichever comes first | The configured buffering hint (300 s / 128 MB) is not a fixed schedule — Firehose flushes as soon as either threshold is hit. At workshop-scale low throughput the 300 s interval is what fires, so it's a latency ceiling for the archive tier, not a floor. If Firehose falls behind, it raises the buffer size to catch up — the interval itself doesn't change. |
RisingWave SUBSCRIBE is pull, not push |
RisingWave's subscription uses CREATE SUBSCRIPTION + DECLARE CURSOR + FETCH loop — a pull model, not PostgreSQL LISTEN/NOTIFY. The Next.js Route Handler runs the fetch loop and flushes to SSE. Include a short yield between fetches to avoid busy-waiting. |
| API Gateway incompatible with SSE | API Gateway HTTP and REST APIs have a hard max integration timeout of 300 s, even with a quota increase. Use an ALB for SSE connections. Set ALB idle timeout to 4,000 s and emit SSE heartbeat comments (: ping) every 30 s from the server. |
| ALB SSE — Cognito auth | ALB supports Cognito JWT authentication natively via authenticate-cognito listener rule. JWT is validated at the ALB — no custom auth middleware needed in the Route Handler. |
| K3s → RKE2 for production | K3s does not have FIPS 140-2 validated cryptography. For regulated or HSE-sensitive environments, use RKE2 before going to production. |
| IoT Device Client — no publicly reachable pre-built artifacts | The release CI publishes Docker images to ECR public (aws-iot-device-client/aws-iot-device-client and aws-iot-device-client/aws-iot-device-client-base-images) using an internal AWS account, but both repos return NAME_UNKNOWN to external callers. GitHub Releases has source archives only. You must build from source. See docs/aws-iot-device-client-build-model.md. |
| CNPG CRDs render in the same Helm pass as the Cluster CR | The cloudnative-pg subchart ships its CRDs as ordinary templates/, not Helm's special crds/ directory — so on a fresh K3s cluster, helm install renders the TimescaleDB Cluster CR in the same pass as the CRDs that define it and fails with no matches for kind "Cluster" in version "postgresql.cnpg.io/v1". Fix: vendor the CNPG CRDs into the umbrella chart's own crds/ directory (Helm always applies crds/ before any template) and set cnpg.crds.create=false to avoid installing them twice. See helm/edge-stack/crds/cnpg-crds.yaml. |
| K3s kubeconfig points at a private IP | The install job writes a kubeconfig whose server: is the K3s node's private VPC IP — unreachable from a laptop or CI runner with no VPC route. Open an SSM AWS-StartPortForwardingSession tunnel to the server node and rewrite server: to https://127.0.0.1:6443; K3s's serving certificate already lists 127.0.0.1/localhost as SANs, so TLS verifies without --insecure-skip-tls-verify. See the Prerequisites section of workshop/05-edge-infra/block-3-helm.md for the exact commands. |
| 20-minute MQTT flap recurs, not just on the first job (#103 → PR #105 → #156 → #166) | #103/PR #105 fixed the symptom seen on a fresh slot: the aws-iot-device-client v1.10.x jobs notify-next subscription established during fleet provisioning doesn't reliably deliver the first job created afterward, so a one-time post-provision restart (iot-post-provision-restart.service) was added to rescue it. That masked, but did not fix, the actual root cause: the edge VPC's NAT Gateway reaps idle flows after 350 s, and the device client's MQTT socket sits idle between telemetry publishes (those go over the HTTPS data plane, not this socket) with no keep-alive traffic under 350 s — the client only notices the dead flow at its ~1200 s (20-min) default MQTT keep-alive ping, forcing a reconnect that leaves the Jobs subscription stale again. #156 caught this recurring — jobs created well after the first one, on a slot that had been up for hours, also sat QUEUED. #166 fixes the actual cause: the device-client build is patched to opt its MQTT socket into SO_KEEPALIVE and lower its MQTT PINGREQ interval, and the edge EC2 user-data sets matching net.ipv4.tcp_keepalive_* sysctls — both under 350 s — so the NAT flow never goes idle long enough to be reaped and the flap (and the subscription staleness it causes) stops recurring. The #105 post-provision restart is left in place since it still helps the fresh-slot race independent of this fix. |