LavinMQ Guides

How to deploy LavinMQ from AWS Marketplace

How to deploy LavinMQ from AWS Marketplace
You can deploy a fully managed LavinMQ message broker through AWS Marketplace and pay for it through your existing AWS bill. CloudAMQP handles provisioning, maintenance, and the underlying broker infrastructure, so you can focus on building your applications.

This guide walks you through subscribing to CloudAMQP on AWS Marketplace, deploying a LavinMQ instance, and verifying your deployment by publishing and consuming a message.

Deployment overview

Deploying LavinMQ through AWS Marketplace involves the following steps:

  1. Subscribe to CloudAMQP on AWS Marketplace.
  2. Sign in to or create a CloudAMQP account.
  3. Accept the AWS Marketplace invitation.
  4. Select the team linked to your Marketplace subscription.
  5. Configure a LavinMQ instance.
  6. Review and deploy the instance.
  7. Retrieve your connection details.
  8. Verify message publishing and consumption.

AWS Marketplace handles subscription and billing, while CloudAMQP handles instance provisioning and management.

Subscribing through AWS Marketplace does not automatically create a message broker. You deploy the broker separately through the CloudAMQP console.

Prerequisites

Before you begin, you need:

  • An active and verified AWS account with a valid payment method.
  • AWS permissions to subscribe to Marketplace products.
  • A CloudAMQP account or the ability to create one.
  • Permission to create instances in the CloudAMQP team linked to your Marketplace subscription.

If you want to run the messaging example in Step 8, you also need Python 3 and a terminal.

Step 1: Open the AWS Marketplace listing

Open the RabbitMQ & LavinMQ by CloudAMQP listing on AWS Marketplace.

Alternatively, sign in to your AWS account, navigate to AWS Marketplace, and search for LavinMQ.

RabbitMQ & LavinMQ by CloudAMQP on AWS Marketplace

Figure 1. RabbitMQ & LavinMQ by CloudAMQP on AWS Marketplace.

The listing supports both RabbitMQ and LavinMQ. You select your preferred message broker later in the CloudAMQP console.

Step 2: Subscribe to CloudAMQP

On the Marketplace product page:

  1. Click View purchase options.
  2. Review the pricing and subscription terms.
  3. Click Subscribe.

AWS Marketplace subscription page

Figure 2. AWS Marketplace subscription page.

AWS Marketplace subscription confirmation

Figure 3. AWS Marketplace subscription confirmation.

Step 3: Connect your AWS Marketplace subscription to CloudAMQP

After AWS Marketplace confirms your subscription, click Set up your account. This redirects you to the CloudAMQP login page.

CloudAMQP uses its own account system, even when billing is handled through AWS Marketplace.

CloudAMQP sign-in page reached via AWS Marketplace

Figure 4. CloudAMQP sign-in page reached via AWS Marketplace.

If you already have a CloudAMQP account, sign in. Otherwise, create one.

CloudAMQP sends an invitation by email. Sign in to the CloudAMQP console and accept the invitation to join the team linked to your AWS Marketplace subscription.

Step 4: Select your AWS Marketplace team

Your CloudAMQP account can belong to multiple teams. The active team determines how your instances are billed.

Open the team selector in the top-right corner of the CloudAMQP console and select the team linked to your AWS Marketplace subscription.

Selecting the AWS Marketplace team

Figure 5. Selecting the AWS Marketplace team.

Create your instance under this team to ensure that billing is handled through AWS Marketplace.

Step 5: Configure your LavinMQ instance

In the CloudAMQP console:

  1. Navigate to the Instances page.
  2. Click Create New Instance.
  3. Enter an instance name, such as lavinmq-aws-demo.
  4. Select LavinMQ as the message broker.
  5. Choose a plan.
  6. Add tags if needed.
  7. Click Select Region.
  8. Choose an AWS region and data center, then click Configure to continue to the configuration review page.

Configuring a LavinMQ instance in CloudAMQP

Figure 6. Configuring a LavinMQ instance in CloudAMQP.

Choose a plan based on your application’s expected message throughput, connection count, resource requirements, and availability needs. See the CloudAMQP pricing page for available plans.

When deploying through AWS Marketplace, you can only select supported AWS regions. Choose a region close to your applications to reduce network latency.

Step 6: Review and deploy your instance

Before clicking Create Instance, check your configuration:

Configuration Expected value
Instance name Your chosen name
Message broker LavinMQ
Cloud provider AWS
Region Your selected AWS region
Plan Your selected plan
Active team AWS Marketplace team

If any of these settings are incorrect, go back and update your configuration. Otherwise, review the instance plan charges and click Create Instance.

CloudAMQP begins provisioning your instance. Once provisioning is complete, open the instance from the Instances page to access its connection details.

Step 7: Retrieve your connection details

Locate the AMQP connection URL on the instance overview page in the CloudAMQP console.

The URL contains the hostname, port, username, password, and virtual host your application needs to connect to LavinMQ.

An encrypted AMQP connection URL typically looks like this:

amqps://USERNAME:PASSWORD@HOSTNAME:5671/VHOST

Copy the connection URL provided by CloudAMQP rather than constructing it manually. Use an amqps:// URL to connect over TLS.

Treat the connection URL as a secret. Store it in an environment variable or a secrets management service, and never commit it to source control or expose it in logs.

Step 8: Verify your LavinMQ deployment

Before integrating LavinMQ into your application, verify that the management interface is accessible and that the broker can exchange messages.

Open the LavinMQ management interface

From the instance overview page, click LavinMQ Manager.

The management interface allows you to inspect and manage queues, exchanges, connections, channels, and other broker resources.

Confirm that the interface is accessible and that the deployed broker is LavinMQ.

Publish and consume a message using Python

Use Pika, a Python client for AMQP 0-9-1, to verify connectivity and message delivery. The following example connects to LavinMQ, creates a temporary queue, publishes a message, retrieves it, and acknowledges it.

This example verifies basic messaging functionality, not performance, durability, or high availability.

Set up your Python environment

Create a project directory and install Pika in a virtual environment. The following commands are for macOS and Linux:

mkdir lavinmq-aws-demo
cd lavinmq-aws-demo

python3 -m venv .venv
source .venv/bin/activate

python -m pip install pika

Configure your connection URL

Set the BROKER_URL environment variable to the AMQPS connection URL copied from the CloudAMQP console.

Run the following command to enter your connection URL without displaying it on the screen or saving it directly in your shell history:

export BROKER_URL="$(python -c 'from getpass import getpass; print(getpass("AMQPS URL: "))')"

Paste your connection URL when prompted and press Enter.

Create the verification script

Create a file named verify.py with the following content:

import os
import ssl
import uuid

import pika

broker_url = os.environ.get("BROKER_URL")

if not broker_url or not broker_url.startswith("amqps://"):
    raise SystemExit("Set BROKER_URL to a valid AMQPS URL.")

parameters = pika.URLParameters(broker_url)
parameters.ssl_options = pika.SSLOptions(
    ssl.create_default_context(),
    parameters.host
)

parameters.connection_attempts = 3
parameters.retry_delay = 2
parameters.socket_timeout = 10
parameters.stack_timeout = 15
parameters.blocked_connection_timeout = 15

message = f"Hello from LavinMQ! {uuid.uuid4()}"

with pika.BlockingConnection(parameters) as connection:
    channel = connection.channel()
    print("Connected to broker")

    result = channel.queue_declare(
        queue="",
        exclusive=True,
        auto_delete=True
    )
    queue_name = result.method.queue

    channel.confirm_delivery()

    channel.basic_publish(
        exchange="",
        routing_key=queue_name,
        body=message.encode(),
        mandatory=True
    )

    print(f"Published: {message}")

    method, _, body = channel.basic_get(
        queue=queue_name,
        auto_ack=False
    )

    if method is None or body != message.encode():
        raise RuntimeError("Message verification failed.")

    channel.basic_ack(
        delivery_tag=method.delivery_tag
    )

    print(f"Received: {body.decode()}")
    print("Deployment verification successful!")

Run the verification script

python verify.py

Expected output:

Connected to broker
Published: Hello from LavinMQ! <message-id>
Received: Hello from LavinMQ! <message-id>
Deployment verification successful!

The script generates a unique message identifier each time it runs. The published and received messages should match.

If the script completes successfully, you have verified that:

  • Your application can establish a TLS-encrypted AMQP connection.
  • Your connection credentials are valid.
  • Your application can declare a queue.
  • The broker accepts and routes published messages.
  • Your application can retrieve and acknowledge messages.

The temporary queue is automatically deleted when the connection closes.

For more messaging examples, see the CloudAMQP Python documentation.

Troubleshooting

Use the table below to troubleshoot common deployment and connection issues.

Problem What to check
Unable to subscribe Verify your AWS account status and Marketplace permissions.
Marketplace invitation not received Check your email, spam folder, and pending CloudAMQP invitations.
AWS Marketplace team not visible Sign in to the correct CloudAMQP account and accept the invitation.
Instance not billed through AWS Marketplace Check which CloudAMQP team owns the instance. Contact support if you selected the wrong team.
AWS region unavailable Check the regions supported by your selected plan.
RabbitMQ deployed instead of LavinMQ Check the broker type and provision a LavinMQ instance if necessary.
Connection timeout Check instance readiness, network connectivity, and firewall settings.
Authentication failed Verify the credentials and virtual host in your connection URL.
TLS connection failed Check your certificate trust configuration and AMQPS connection settings. Do not disable certificate verification.
Queue declaration or publishing fails Check broker permissions and resource limits.

If the problem persists, contact CloudAMQP support. Include your instance name, the error message, and the step where the problem occurred. Do not include passwords or complete connection URLs.

Automating LavinMQ deployments

If you manage your infrastructure programmatically, you can use the CloudAMQP Terraform provider or the CloudAMQP API to automate supported instance management operations.

Before provisioning an instance programmatically, complete your AWS Marketplace registration and obtain credentials for the CloudAMQP team linked to your subscription.

Check which operations your chosen tool supports, as Marketplace subscription and account registration are separate from instance provisioning.

Cleaning up your resources

If you created an instance only to follow this guide, delete it when you finish testing to avoid unnecessary instance charges.

Open the CloudAMQP console, select the correct team, and delete your test instance. Deleting an instance can permanently remove its queues, messages, and configuration, so confirm that you no longer need its data.

Deleting a CloudAMQP instance does not cancel your AWS Marketplace subscription. Manage the subscription separately through AWS Marketplace.

What’s next?

With LavinMQ running on AWS and your connection verified, you’re ready to integrate messaging into your application.

Explore the CloudAMQP documentation for client libraries, connection examples, monitoring, and instance management. To learn more about LavinMQ and its messaging features, visit the LavinMQ documentation.