An AWS IoT Core alternative makes sense when your project needs a standard MQTT broker more than it needs a cloud-specific IoT platform. This guide explains what AWS IoT Core offers, which differences to evaluate, how authentication models compare, and when a standards-based managed broker is the simpler route, with code you can use to test both.
What AWS IoT Core Is Good At
AWS IoT Core is a managed service that connects devices to the AWS cloud. Beyond an MQTT endpoint, it offers device registry and identity, X.509 certificate-based authentication, fine-grained IoT policies, device shadows and a rules engine that routes messages to other AWS services. If your back end already lives in AWS and you want device data flowing into AWS services with little glue code, that integration is the main reason to choose it.
This article is not about whether AWS IoT Core is good; it is about whether it is the right shape for your project. AWS updates the service regularly, so verify every specific point against the current AWS IoT Core developer guide.
When Teams Look for an Alternative
The reasons usually fall into a few groups:
- They need a plain broker. The project is device-to-app messaging, a dashboard or an industrial data hub, not an AWS data pipeline.
- Their back end is not on AWS. It runs on another cloud, on-premises or in a mix.
- Onboarding friction. Certificate provisioning per device is strong security but adds steps for prototypes, classrooms and small fleets.
- Portability concerns. They want devices that can move between brokers by changing a few settings.
- Predictable pricing models. Some teams prefer plan-based pricing to usage-based metering. Which is cheaper depends entirely on your workload.
What to Evaluate: AWS IoT Core vs a Standard MQTT Broker
AWS publishes a page describing where its MQTT implementation differs from the MQTT specification. Read it alongside your requirements. The table lists what to check rather than asserting current specifics.
| Area | What to check in AWS IoT Core's current docs | Standards-based broker (ConnectMQ) |
|---|---|---|
| Protocol versions | Supported MQTT versions and which MQTT 5 features are implemented | MQTT 3.1.1 and 5.0 |
| QoS levels | Which QoS levels are supported for publish and subscribe | QoS 0-1 on free Serverless, QoS 0-2 on paid plans |
| Retained messages | Support, limits and pricing for retained messages | Supported |
| Topic rules | Reserved topic prefixes, topic length and level limits | Standard topics; $SYS for broker state |
| Authentication | X.509 certificates, custom authorizers, username/password options | Generated username, password and client ID |
| Authorization | IoT policy model and how it maps to topics | Tenant isolation, client IDs bound to credentials |
| Payload and rate limits | Message size, publish rates, connection rates | Per-plan quotas, e.g. 256 KB or 1 MB messages |
| Data routing | Rules engine to AWS services | External MQTT clients (Node-RED, Telegraf, your services) |
| Device state | Device shadow service | Retained messages and your own state topics |
The final two rows are where AWS IoT Core offers more built in. If those are central to your design, it may be the better fit.
The Authentication Model Difference
This is often the biggest practical difference.
A typical AWS IoT Core device holds a client certificate and private key, plus the Amazon root CA, and connects with mutual TLS. Policies attached to the certificate control what it may publish and subscribe to. This is a strong model, and at scale it needs a provisioning process.
A standard broker like ConnectMQ uses server-side TLS with a username, password and client ID issued in a portal. Devices verify the broker's Let's Encrypt certificate using the system CA store, and the client ID is bound to the issued credentials. Getting started is simpler; your responsibility is to store credentials securely on devices.
Neither is universally better. Evaluate which model your fleet size, security requirements and manufacturing process can support.
Writing Device Code That Works With Either
The best way to avoid lock-in is to isolate connection details from application logic. This MQTT.js v5 example connects either with a certificate (AWS IoT Core style) or with username and password (standard broker), and the rest of the code stays identical:
// npm install mqtt
const fs = require("fs");
const mqtt = require("mqtt");
const mode = process.env.BROKER_MODE || "standard"; // "standard" or "certificate"
const options = {
clientId: process.env.MQTT_CLIENT_ID || "YOUR_CLIENT_ID",
protocolVersion: 5,
reconnectPeriod: 5000,
};
let url;
if (mode === "certificate") {
url = `mqtts://${process.env.MQTT_ENDPOINT}:8883`;
options.key = fs.readFileSync("device.private.key");
options.cert = fs.readFileSync("device.cert.pem");
options.ca = fs.readFileSync("root-ca.pem");
} else {
url = "mqtts://broker.connectmq.com:8883";
options.username = process.env.MQTT_USERNAME || "YOUR_USERNAME";
options.password = process.env.MQTT_PASSWORD || "YOUR_PASSWORD";
}
const client = mqtt.connect(url, options);
const topic = "site1/area1/pump7/telemetry";
client.on("connect", () => {
console.log("Connected in", mode, "mode");
setInterval(() => {
const reading = { pressure: 2.4 + Math.random() * 0.2, ts: Date.now() };
client.publish(topic, JSON.stringify(reading), { qos: 1 });
}, 5000);
});
client.on("error", (err) => console.error("MQTT error:", err.message));
Keep topic names free of provider-specific prefixes, and avoid depending on provider-only features from device firmware. Then switching providers is a configuration change. The MQTT vendor lock-in article lists the patterns to watch for.
Replacing AWS-Specific Features
If you move to a plain broker, plan how to cover features you used:
- Rules engine. Run a subscriber service, Node-RED flow or Telegraf agent that reads topics and writes to your database or API.
- Device shadows. Publish desired and reported state on retained topics such as
site1/area1/pump7/state/reportedand.../state/desired. - Fleet identity. Issue one credential set per device and keep an inventory in your own system.
- Monitoring. Use the broker's connection state topic (
$SYS/broker/connection/{clientId}/stateon ConnectMQ) and the portal dashboard.
A Low-Risk Migration Path
If you decide to move some or all devices, do it in stages rather than in one cutover:
- Mirror first. Run a small bridge service that subscribes to selected topics on the existing endpoint and republishes them to the new broker. Dashboards and new consumers can then move to the new broker while devices stay where they are.
- Pilot a device group. Reflash or reconfigure a small batch of devices with the new endpoint and credentials. Watch reconnect behaviour, message rates and payload sizes against the new plan's limits.
- Move integrations. Replace each rule with an external subscriber or Node-RED flow, one data destination at a time, and compare outputs side by side.
- Cut over the fleet in waves, keeping the old configuration available for rollback until each wave is stable.
Because both sides speak MQTT, every stage is reversible, which is the main reason to keep firmware free of provider-specific dependencies.
A Decision Checklist
- Is most of your back end on AWS, and do you use the rules engine heavily? AWS IoT Core is likely the better fit.
- Do you need a neutral broker for devices, apps and on-premises systems across environments? A standard broker is simpler.
- Do you need QoS 2 or specific MQTT 5 features? Check current support on each side.
- Is certificate provisioning per device practical for you today?
- Can your team run the integrations a lean broker leaves to external tools?
Try a Standards-Based Broker
You can evaluate the alternative without migrating anything. Create a free Serverless broker with no credit card, run the script above in standard mode, and inspect traffic in the live topic explorer. For more context, read the cloud MQTT broker guide, compare with the Azure IoT Hub alternative, and see how a managed MQTT broker differs from an IoT platform. Learn more at connectmq.com.
Frequently Asked Questions
Can devices built for AWS IoT Core connect to another MQTT broker?
Yes, if they use standard MQTT. You typically change the endpoint, switch from certificate authentication to the new broker's method, and remove any AWS-specific topic usage.
Does a standard broker replace the AWS IoT rules engine?
Not by itself. You add an external subscriber, Node-RED or Telegraf to route data, which keeps each piece replaceable.
Is AWS IoT Core more secure than a username and password broker?
Mutual TLS with per-device certificates is a strong model. A broker using TLS with unique per-device credentials is also sound when credentials are stored and rotated properly.
Where should I check AWS IoT Core limits?
Use the current AWS IoT Core developer guide and service quotas pages, since limits and supported features change.



