What it actually is
Amazon MQ is a managed message broker service. You pick an engine, either Apache ActiveMQ Classic or RabbitMQ, an instance size and a deployment mode, and AWS runs the broker on EC2 capacity you never see: provisioning, patching, failover, storage, and the TLS endpoints. Your applications connect over the same wire protocols they already speak on-premises, which is the entire point. The FAQ is blunt about the migration story: moving an existing broker to Amazon MQ can be as simple as updating the endpoints your clients use.
The mental model the docs bury is that you are renting a server, not consuming a service. SQS is a queue as an API: no host, no capacity, no idle cost, and you pay per request. Amazon MQ is a broker with a host type, a disk, a heap, a weekly maintenance window, and an hourly price that runs from the moment the broker is created until the moment you delete it. Everything that is good about Amazon MQ (JMS semantics, topics with durable subscribers, selectors, AMQP routing, MQTT, STOMP, transactions) comes from it being a real broker. Everything that hurts (capacity planning, connection limits, storage filling up, restarts during maintenance) comes from the same fact.
So the decision is not "which queue is better". It is "is the protocol the contract". If you have code, vendors, or devices that speak JMS, AMQP 0-9-1, OpenWire, STOMP or MQTT and you cannot rewrite them this quarter, Amazon MQ is the cheapest way to get the broker off your own servers. If you are writing something new, the AWS comparison page itself steers you elsewhere: SQS and SNS are simpler and cheaper for new applications without protocol constraints.
The model
Two engines, two different products. Amazon MQ for ActiveMQ runs ActiveMQ Classic 5.x. As of this writing the version page lists 5.19 (recommended, released on Amazon MQ in February 2026) and 5.18; 5.17 reached end of support in June 2025. There is no Artemis and no 6.x. Amazon MQ for RabbitMQ runs 3.13 and the 4.x line, with 4.3 recommended since September 2026. RabbitMQ 4.2 and 4.3 run only on the mq.m7g (Graviton) instance family.
Deployment modes. The CreateBroker API accepts three values. SINGLE_INSTANCE is one broker in one AZ: fine for development, a single point of failure for anything else. ACTIVE_STANDBY_MULTI_AZ is ActiveMQ's high availability mode: two instances in two AZs sharing storage, only one of which serves traffic at a time. You get two endpoints per protocol with -1 and -2 suffixes, and your client must be configured with both (a failover URL) because only one is active. CLUSTER_MULTI_AZ is RabbitMQ's three-node cluster across AZs; maintenance rolls one node at a time and keeps two running.
Storage is a durability decision you cannot undo. ActiveMQ brokers default to Amazon EFS, replicated across multiple AZs. You can choose EBS instead, but only on the mq.m5 family, only in a single AZ, and EBS does not support active/standby. The storage page puts rough numbers on the trade (1 KB messages): around 80 persistent messages per second enqueued on EFS, around 500 on EBS, around 5,000 non-persistent in memory. And the line that matters most: you cannot change the storage type after the broker exists. RabbitMQ brokers always use EBS.
Protocols and ports. ActiveMQ exposes every wire protocol over TLS: OpenWire on 61617 (ssl://), AMQP 1.0 on 5671 (amqp+ssl://), STOMP on 61614 (stomp+ssl://), MQTT on 8883 (mqtt+ssl://), WebSocket on 61619 (wss://), and the ActiveMQ web console on 8162. RabbitMQ exposes AMQPS on 5671 and the management UI and API on 443 and 15671. There is no plaintext port to fall back to.
Who operates what. AWS runs the instances, the OS, the engine patches (automatic minor version upgrades are mandatory on ActiveMQ 5.18+ and RabbitMQ 3.13+), storage replication, failover and the endpoints. You own the broker configuration (an XML file for ActiveMQ, a config for RabbitMQ), users and the authorization map, the security groups, client failover settings, sizing, and the decision to upgrade between major versions. Configuration and user changes do not apply until the next reboot or maintenance window, which surprises everyone exactly once.
The 2026 RabbitMQ story. RabbitMQ is where AWS has shipped most this year: in-place major upgrades from 3.13 to 4.2 (May), Prometheus metrics on by default for 4.2+ (April), private networking through VPC Lattice and PrivateLink (June), storage you can size independently of the instance on 4.x clusters (July), and 4.3 with 32 quorum queue priority levels and delayed retry (September). Earlier in the year 4.2+ also gained HTTP-based auth, mTLS and the JMS Topic Exchange plugin, which matters for this article: since 4.x you can point an existing JMS application at RabbitMQ using the RabbitMQ JMS client, which an AWS blog from June 2026 walks through.
When to use it, when not to
You need | Use | Why |
|---|---|---|
Lift an existing JMS, AMQP, STOMP, MQTT or OpenWire app without touching its messaging code | Amazon MQ | Same protocols, same client libraries, new endpoint |
JMS topics with durable subscribers, selectors, XA or local transactions | Amazon MQ for ActiveMQ | Real JMS broker semantics |
AMQP 0-9-1 exchanges, routing keys, quorum queues, shovels, federation | Amazon MQ for RabbitMQ | The actual RabbitMQ, managed |
A work queue between your own services, written this year | SQS | No hosts, no idle cost, scales without sizing |
Fan-out to many consumers with filtering | SNS to SQS | Filter policies on attributes or body, no broker |
Event routing across services and SaaS sources | EventBridge | Rules, schemas, targets, no broker |
Ordered, replayable streams with consumer offsets | Kinesis or MSK | Logs, not queues; Amazon MQ RabbitMQ does not support streams |
Custom broker plugins Amazon MQ does not ship | Self-managed on EC2 | The FAQ itself suggests this |
The honest case for migrating to SQS starts with a feature inventory, not a price comparison. Map what your code actually uses. Point-to-point queues map to SQS standard or FIFO queues. Topics map to SNS topics fanning out to SQS queues. Message selectors map to SNS filter policies, which can match message attributes or the message body. JMS message groups map to FIFO MessageGroupId. Scheduled delivery maps to SQS delay, capped at 15 minutes. Message size is no longer the blocker it was: SQS raised its maximum payload from 256 KiB to 1 MiB in August 2025. Retention is 4 days by default and 14 days at most, so a broker used as long-term storage needs redesign.
What does not map cleanly is the part to price honestly. There are no broker-side transactions spanning multiple sends and receives, no XA, no broker-side temporary queues for request-reply (AWS offers a client-side Temporary Queue Client for Java that emulates them), no durable topic subscriptions in the JMS sense, and no wire protocol: everything is HTTPS API calls. The Amazon SQS Java Messaging Library gets you part of the way. Its docs describe point-to-point queues only, with text, bytes and object messages and the standard JMS acknowledgement modes plus an UNORDERED_ACKNOWLEDGE extension. If your code leans on topics or transactions, the migration is a rewrite of the messaging layer, and that rewrite is the real cost. If it only sends and receives on queues, migrating is often a week of work that removes an always-on server from your bill.
What it costs
Amazon MQ bills three things: broker instance hours (per second), storage per GB-month, and standard data transfer. US East prices on the pricing page as of November 2026:
Engine and size | Single instance | Active/standby or per cluster node |
|---|---|---|
ActiveMQ mq.t3.micro | $0.02704/hour | $0.05408/hour (active/standby) |
ActiveMQ mq.m5.large | $0.288/hour | $0.576/hour (active/standby) |
RabbitMQ mq.m7g.medium | $0.1367/hour | evaluation size |
RabbitMQ mq.m7g.large | $0.2734/hour | $0.2734 per node, x3 for a cluster |
RabbitMQ mq.m5.large | $0.288/hour | $0.288 per node, x3 for a cluster |
Storage is $0.30 per GB-month on EFS (the first 5 GB each month are free) and $0.10 per GB-month on EBS, for both engines. Cross-AZ forwarding between brokers is $0.01/GB each way; RabbitMQ inter-node cluster traffic is free. The newer RabbitMQ private networking adds $0.01 per GB processed plus $0.006 per GB for the VPC Lattice resource gateway.
The surprise is the floor, not the per-message price. A production ActiveMQ active/standby pair on mq.m5.large is $428.54 for a 31-day month before storage, which is AWS's own worked example. A RabbitMQ three-node mq.m7g.large cluster is $610.23 for 2,232 hours plus storage, again from the pricing page. That money is spent whether you move one message or a billion. An SQS queue that carries nothing costs nothing. If your traffic is bursty and small, the broker is the most expensive way to move it.
Free tier reality: there is no permanent always-free allowance for brokers on the current pricing page. New AWS accounts created after July 15, 2025 get up to $200 in Free Tier credits that apply to eligible services including Amazon MQ. For this tutorial that hardly matters: one mq.t3.micro ActiveMQ broker for about an hour costs around three cents, plus the public IPv4 address charge of $0.005 per hour, and EFS storage stays inside the free 5 GB. Budget well under $0.10 if you clean up the same day. Left running for a month, the same broker is about $20.
The limits that bite
Connections are per protocol and depend on size. Per the quotas page, ActiveMQ allows 300 wire-level connections per protocol on micro brokers and 2,000 per protocol on large ones. A fleet of short-lived Lambda functions opening a connection each will hit that before it hits anything else. RabbitMQ connection limits are per node by instance size and documented in the sizing guidelines.
Storage fills, then the broker says no. Micro brokers get 20 GB, mq.m5 brokers 200 GB. ActiveMQ also caps the job scheduler store at 50 GB and temporary storage at 5 GB (micro) or 50 GB (m5). The CloudWatch metric StorePercentUsage is the one to alarm on: the docs say that when it reaches 100, the broker refuses messages. Producers then block or fail depending on the client. A consumer outage over a weekend is how you find out.
mq.t3.micro is for evaluation, and on RabbitMQ it is gone. ActiveMQ still offers mq.t3.micro, labelled "Evaluation". For RabbitMQ, mq.t3.micro is no longer available for new brokers and existing ones reached end of support on October 1, 2026. The troubleshooting guide lists "running a production workload on a mq.t3.micro" as a cause of unexplained restarts.
Maintenance restarts are part of the contract. Every broker has a weekly maintenance window of up to two hours, and the troubleshooting guide says brokers might restart at any point inside it. Single-instance brokers go dark; active/standby fails over to the standby, which is why the client failover URL is not optional. Endpoint certificates are also rotated during maintenance, so pin the Amazon root CA, not the broker certificate.
RabbitMQ 4 has sharp edges. Classic mirrored queues are gone in 4.x (convert to quorum queues before the in-place upgrade; AWS provides a migration tool), the metadata store moved from Mnesia to Khepri, the broker blocks all connections during the major upgrade, and Amazon MQ does not support RabbitMQ streams: the version page warns that creating one results in data loss.
Account and API quotas. 200 brokers per region, 5 security groups per broker, 250 users per ActiveMQ broker with simple auth, and the management APIs share an account-wide throttle (burst 100, rate 15 per second). Message traffic itself is not throttled. CloudWatch only reports the first 1,000 ActiveMQ destinations and the first 500 RabbitMQ queues.
Passwords and names. Broker user passwords need at least 12 characters, at least 4 unique, and no commas, colons or equal signs. A failed CreateBroker over a password is a cheap lesson; a failed one after 15 minutes of waiting is not.
Build it
We build an orders queue on Amazon MQ for ActiveMQ 5.19: a single-instance mq.t3.micro broker reachable only from your IP, a Python producer that sends persistent JSON orders over STOMP, a consumer that acknowledges each message individually, and a deliberate crash that proves the broker keeps unacknowledged work. STOMP is used because it is the simplest protocol to drive from Python; a JMS client would talk to the same queue over OpenWire on 61617, and we show that at the end. Plan for 30 minutes of hands-on time plus the broker creation wait.
Prerequisites. An AWS account with a default VPC in your region, Python 3.10+, credentials for a principal that can manage Amazon MQ and EC2 security groups, and two packages: pip install boto3 stomp.py certifi. The code was written against boto3 1.44 and stomp.py 9.0.
IAM. Amazon MQ creates network interfaces in your subnet on your behalf, so the creating principal needs EC2 networking permissions as well as mq:*. The documented shortcut is the AmazonMQFullAccess managed policy. A tighter policy for this tutorial:
{
"Version": "2012-10-17",
"Statement": [
{"Effect": "Allow", "Action": ["mq:CreateBroker", "mq:DescribeBroker", "mq:ListBrokers",
"mq:DeleteBroker"], "Resource": "*"},
{"Effect": "Allow", "Action": ["ec2:CreateNetworkInterface", "ec2:CreateNetworkInterfacePermission",
"ec2:DeleteNetworkInterface", "ec2:DeleteNetworkInterfacePermission", "ec2:DetachNetworkInterface",
"ec2:DescribeInternetGateways", "ec2:DescribeNetworkInterfaces", "ec2:DescribeNetworkInterfacePermissions",
"ec2:DescribeRouteTables", "ec2:DescribeSecurityGroups", "ec2:DescribeSubnets", "ec2:DescribeVpcs",
"ec2:CreateSecurityGroup", "ec2:AuthorizeSecurityGroupIngress", "ec2:DeleteSecurityGroup"], "Resource": "*"},
{"Effect": "Allow", "Action": ["cloudwatch:GetMetricStatistics"], "Resource": "*"}
]
}
Step 1: Create the broker
Export a password first (export MQ_PASSWORD='...', 12+ characters, no , : =). The script finds your default VPC, opens ports 61614 (STOMP over TLS) and 8162 (web console) to your current IP only, creates the broker, and polls until it is RUNNING.
import os, sys, time, urllib.request
import boto3
REGION = os.environ.get("AWS_REGION", "us-east-1")
NAME = "sl-orders"
PASSWORD = os.environ["MQ_PASSWORD"] # 12+ chars, 4+ unique, no , : =
ec2 = boto3.client("ec2", region_name=REGION)
mq = boto3.client("mq", region_name=REGION)
# 1. Default VPC, one subnet, and a security group that admits only your IP
vpc_id = ec2.describe_vpcs(Filters=[{"Name": "isDefault", "Values": ["true"]}])["Vpcs"][0]["VpcId"]
subnet_id = ec2.describe_subnets(Filters=[{"Name": "vpc-id", "Values": [vpc_id]}])["Subnets"][0]["SubnetId"]
my_ip = urllib.request.urlopen("https://checkip.amazonaws.com").read().decode().strip()
sg_id = ec2.create_security_group(
GroupName=f"{NAME}-sg", Description="Amazon MQ tutorial: STOMP and console from one IP", VpcId=vpc_id
)["GroupId"]
ec2.authorize_security_group_ingress(
GroupId=sg_id,
IpPermissions=[
{"IpProtocol": "tcp", "FromPort": p, "ToPort": p, "IpRanges": [{"CidrIp": f"{my_ip}/32"}]}
for p in (61614, 8162) # STOMP over TLS, web console
],
)
# 2. The broker: ActiveMQ 5.19, single instance, evaluation size
broker = mq.create_broker(
BrokerName=NAME,
EngineType="ACTIVEMQ",
EngineVersion="5.19",
DeploymentMode="SINGLE_INSTANCE",
HostInstanceType="mq.t3.micro",
StorageType="EFS",
PubliclyAccessible=True,
AutoMinorVersionUpgrade=True, # required for 5.18 and above
SubnetIds=[subnet_id],
SecurityGroups=[sg_id],
Users=[{"Username": "orders-app", "Password": PASSWORD, "ConsoleAccess": True}],
)
broker_id = broker["BrokerId"]
print("broker", broker_id, "sg", sg_id)
# 3. Wait for RUNNING (CREATION_FAILED means IAM or networking)
while True:
d = mq.describe_broker(BrokerId=broker_id)
state = d["BrokerState"]
print(time.strftime("%H:%M:%S"), state)
if state == "RUNNING":
break
if state == "CREATION_FAILED":
sys.exit("creation failed: check IAM permissions and the subnet")
time.sleep(60)
inst = d["BrokerInstances"][0]
print("console:", inst["ConsoleURL"])
for e in inst["Endpoints"]:
print("endpoint:", e)
A few choices worth defending. PubliclyAccessible=True is for the tutorial only; AWS's security guidance is to prefer private brokers that cannot be reached from outside the VPC, and you should. The security group is what keeps a public broker from being a public broker in practice, so never open these ports to 0.0.0.0/0. StorageType="EFS" is the default and the only option on mq.t3.micro. AutoMinorVersionUpgrade=True is not a preference: the API requires it for ActiveMQ 5.18 and above. Expect the wait to be long; an AWS blog from June 2026 puts creation at roughly 15 to 20 minutes. When it finishes, the script prints the console URL and one endpoint per protocol. Copy the hostname out of the stomp+ssl:// endpoint and export MQ_HOST=b-...-1.mq.<region>.amazonaws.com.
Step 2: Produce and consume over STOMP
import json, os, sys, time, threading
import certifi, stomp
HOST = os.environ["MQ_HOST"] # b-xxxx-1.mq.us-east-1.amazonaws.com
PORT = 61614
USER, PASSWORD = "orders-app", os.environ["MQ_PASSWORD"]
QUEUE = "/queue/orders"
def connect(listener=None):
conn = stomp.Connection11([(HOST, PORT)], heartbeats=(10000, 10000))
conn.set_ssl(for_hosts=[(HOST, PORT)], ca_certs=certifi.where())
if listener:
conn.set_listener("l", listener)
conn.connect(USER, PASSWORD, wait=True)
return conn
def produce(n):
conn = connect()
for i in range(n):
order = {"order_id": i, "sku": f"SKU-{i % 3}", "qty": 1 + i % 4}
conn.send(QUEUE, json.dumps(order), content_type="application/json",
headers={"persistent": "true", "priority": "4"})
conn.disconnect()
print(f"sent {n} persistent messages to {QUEUE}")
class Worker(stomp.ConnectionListener):
def __init__(self, crash_after):
self.seen, self.crash_after, self.done = 0, crash_after, threading.Event()
self.conn = None
def on_message(self, frame):
order = json.loads(frame.body)
self.seen += 1
if self.crash_after and self.seen > self.crash_after:
print(f"crashing before ack of order {order['order_id']}")
self.done.set()
return # never acked: the broker still owns this message
print("processed order", order["order_id"])
self.conn.ack(frame.headers["message-id"], frame.headers["subscription"])
def consume(crash_after=0, seconds=15):
w = Worker(crash_after)
conn = connect(w)
w.conn = conn
# client-individual: each message stays on the broker until we ack it
conn.subscribe(QUEUE, id="workers", ack="client-individual",
headers={"activemq.prefetchSize": "1"})
w.done.wait(seconds)
conn.disconnect()
print(f"consumer saw {w.seen} messages")
if __name__ == "__main__":
cmd = sys.argv[1]
if cmd == "produce":
produce(int(sys.argv[2]))
elif cmd == "crash":
consume(crash_after=int(sys.argv[2]))
else:
consume()
Three details carry the semantics. persistent: true tells ActiveMQ to write the message to the store (EFS here) before acknowledging the send, which is what survives a broker restart; leave it off and you get the fast in-memory path. ack="client-individual" means the broker keeps each message until the consumer acks that specific message id; with auto, the broker forgets the message the moment it hands it over. activemq.prefetchSize: 1 stops the broker from pushing a big batch into a consumer's buffer, so a crash strands at most one message. TLS verification uses the certifi CA bundle, which contains the Amazon root CAs, so certificate rotation during maintenance does not break the client.
Now run the experiment:
python mq_orders.py produce 20 # sent 20 persistent messages to /queue/orders
python mq_orders.py crash 5 # processes 5, receives the 6th, exits without acking it
python mq_orders.py # a fresh consumer processes the remaining 15
The crash run acknowledges orders 0 to 4, receives order 5, and disconnects without acking. Because nothing acknowledged order 5, ActiveMQ returns it to the queue when the connection drops, and the third command processes orders 5 through 19: 15 messages, none lost. That is the guarantee you are paying an hourly rate for. Rerun the crash test with ack="auto" and order 5 is simply gone.
Step 3: Verify from the outside
The broker publishes metrics to CloudWatch every minute under the AWS/AmazonMQ namespace. For a single-instance broker the Broker dimension is the broker name plus -1.
import os, datetime as dt
import boto3
REGION = os.environ.get("AWS_REGION", "us-east-1")
cw = boto3.client("cloudwatch", region_name=REGION)
now = dt.datetime.now(dt.timezone.utc)
def metric(name, dims):
r = cw.get_metric_statistics(
Namespace="AWS/AmazonMQ", MetricName=name,
Dimensions=[{"Name": k, "Value": v} for k, v in dims.items()],
StartTime=now - dt.timedelta(minutes=30), EndTime=now,
Period=60, Statistics=["Maximum"],
)
pts = sorted(r["Datapoints"], key=lambda p: p["Timestamp"])
return pts[-1]["Maximum"] if pts else None
q = {"Broker": "sl-orders-1", "Queue": "orders"} # single instance = name plus -1
for m in ("QueueSize", "EnqueueCount", "DequeueCount", "ConsumerCount"):
print(m, metric(m, q))
for m in ("StorePercentUsage", "HeapUsage", "CpuUtilization"):
print(m, metric(m, {"Broker": "sl-orders-1"}))
After the three commands, QueueSize should read 0, EnqueueCount and DequeueCount should account for the 20 orders (they are per-minute counts, so look across the last few datapoints), and StorePercentUsage should be close to 0. Open the console URL from Step 1 in a browser, sign in as orders-app, and the Queues page shows orders with 20 enqueued and 20 dequeued. A quick network check from your machine works too: curl -s https://$MQ_HOST:8162/index.html | grep -o "Apache ActiveMQ".
Step 4: The JMS client, unchanged
The reason most teams are here is a Java service that already speaks JMS. Pointed at Amazon MQ it changes one string: the broker URL becomes the OpenWire endpoint over TLS, wrapped in a failover URL so the same code survives active/standby failover later (open port 61617 in the security group first).
ActiveMQConnectionFactory f = new ActiveMQConnectionFactory(
"failover:(ssl://b-xxxx-1.mq.us-east-1.amazonaws.com:61617)");
f.setUserName("orders-app");
f.setPassword(System.getenv("MQ_PASSWORD"));
Connection c = f.createConnection();
Session s = c.createSession(false, Session.CLIENT_ACKNOWLEDGE);
MessageProducer p = s.createProducer(s.createQueue("orders"));
p.send(s.createTextMessage("{\"order_id\": 99}"));
c.close();
With an active/standby broker, list both endpoints inside failover:(...), comma separated, and the client reconnects to whichever instance is active. The Python STOMP consumer above will pick up order 99 from the same queue, which is the whole migration story in one line of configuration.
When it breaks
Connection times out. In order: the broker is not RUNNING yet; your IP changed since the security group was created; the broker is private and you are outside the VPC; a corporate firewall blocks 61614. The troubleshooting guide's checklist is firewall, public accessibility or subnet ACLs, security group rules, then nslookup and telnet against the endpoint.
SSL errors after the broker worked yesterday. Endpoint certificates rotate during maintenance. If you pinned the broker's certificate, trust the Amazon root CA (Amazon Trust Services) instead; certifi already does.
CREATION_FAILED. Almost always IAM (the EC2 network interface permissions above) or a subnet in a shared VPC, which Amazon MQ does not support for broker creation.
BadRequestException on create. A password with ,, : or =, fewer than 12 characters, a broker name with unsupported characters, or AutoMinorVersionUpgrade=False on 5.18+.
You changed a user or the configuration and nothing happened. Correct behaviour: user and configuration changes apply at the next reboot or maintenance window. Reboot the broker if you need them now, and plan for the outage on a single instance.
Producers hang or fail with resource errors. The store is full or the heap is exhausted. Check StorePercentUsage and HeapUsage, find the queue nobody is consuming, and remember that the fix for a micro broker under real load is a bigger instance, not a config tweak.
The web console says you are not authorized. If you added an authorization map that does not include the activemq-webconsole group, the console stops working; add the group back.
Cleanup
The broker bills by the second until it is deleted, so do not skip this.
import os, time
import boto3
from botocore.exceptions import ClientError
REGION = os.environ.get("AWS_REGION", "us-east-1")
mq = boto3.client("mq", region_name=REGION)
ec2 = boto3.client("ec2", region_name=REGION)
for b in mq.list_brokers()["BrokerSummaries"]:
if b["BrokerName"] == "sl-orders":
mq.delete_broker(BrokerId=b["BrokerId"])
print("deleting", b["BrokerId"])
while True:
try:
print(mq.describe_broker(BrokerId=b["BrokerId"])["BrokerState"])
except ClientError as e:
if e.response["Error"]["Code"] == "NotFoundException":
break
raise
time.sleep(30)
sg = ec2.describe_security_groups(Filters=[{"Name": "group-name", "Values": ["sl-orders-sg"]}])["SecurityGroups"]
for g in sg:
ec2.delete_security_group(GroupId=g["GroupId"])
print("deleted", g["GroupId"])
print("remaining brokers:", [b["BrokerName"] for b in mq.list_brokers()["BrokerSummaries"]])
Deletion takes a few minutes and the security group can only be deleted after the broker's network interface is gone, which is why the script waits for NotFoundException first. Confirm with aws mq list-brokers (the sl-orders broker should be absent) and check the Billing console the next day: the line items should stop at the hour you deleted the broker.
Amazon MQ is the right answer to one specific question: how do I get a broker my applications already depend on off my own servers without rewriting them? It is a poor answer to "which queue should my new service use". Run the feature inventory before you pick, and if the inventory comes back as queues and nothing else, the cheapest broker is the one you never rent.

