Skip to Content
Getting StartedAWS Marketplace AMI

Deploying the Flavius Database via AWS Marketplace

This tutorial will guide you on how to quickly deploy the Flavius database using a Marketplace AMI on AWS EC2, and perform basic connection and management tasks.

You will learn:

  • How to subscribe to the Flavius AMI on AWS Marketplace;
  • How to launch a Flavius EC2 instance;
  • How to connect to the Flavius database via a client;
  • How to safely shut down the instance.

Prerequisites

  • Have an AWS account with permissions to launch EC2 instances;
  • Have access to AWS Marketplace enabled;
  • Be familiar with basic AWS console operations.

1. Subscribe to the Flavius AMI

  1. Log in to AWS Marketplace.
  2. Search for “Flavius” and navigate to the product page.
  3. Click “View purchase options” to go to the subscription page.
  4. Read and agree to the relevant terms, then click “Subscribe”.

After subscribing successfully, you will see:

subscribe_success


2. Launch a Flavius EC2 Instance

  1. On the Flavius subscription page or in the AWS Marketplace management page, click “Launch”.
  2. Highly recommended select the “Launch from EC2 Console” method.

launch_from_ec2_console

  1. Select or create a key pair for subsequent SSH login.

create_new_pair_1

create_new_pair_2

  1. In the EC2 console, configure the network and security group as needed (it is recommended to open port 7687 for the Bolt protocol, port 30000 for HTTP access, and port 22 for SSH management).

network_setting_1

network_setting_2

launch_from_ec2_network

allow_flavius_port

  1. (Optional) Create a data disk and mount it to the directory /var/lib/docker/volumes/.

launch_from_ec2_storage

To automatically mount the data disk to the directory /var/lib/docker/volumes/, refer to the following method:
Configure in the “User Data” section under “Advanced details”:

#!/bin/bash DEVICE="/dev/sdb" MOUNT_DIR="/var/lib/docker/volumes/" while [ ! -e "$DEVICE" ]; do echo "wait $DEVICE attach..." sleep 5 done if ! blkid "$DEVICE" &>/dev/null; then echo "disk unformated, formating XFS..." mkfs -t xfs "$DEVICE" else echo "disk formarted" fi mkdir -p "$MOUNT_DIR" if ! grep -qs "$MOUNT_DIR" /proc/mounts; then mount "$DEVICE" "$MOUNT_DIR" echo "already mount $DEVICE to $MOUNT_DIR" fi FSTAB_ENTRY="UUID=$(blkid -s UUID -o value "$DEVICE") $MOUNT_DIR xfs defaults,nofail 0 2" if ! grep -q "$MOUNT_DIR" /etc/fstab; then echo "$FSTAB_ENTRY" >> /etc/fstab echo "add /etc/fstab" else echo "/etc/fstab already has entry for $MOUNT_DIR" fi df -h "$MOUNT_DIR"

launch_from_ec2_userdata

  1. After verifying the configuration, click “Launch instance” to start.

Please note in particular that when the EC2 instance is stopped, the data stored in Flavius will be lost (unless the data on the EBS volume is additionally backed up).


3. Connect to the Flavius Database

There are two ways to connect to the Flavius database:

  • Flavius shell
  • Python/Java SDK

The default username is admin, and password is admin123

Flavius Shell

Please refer to the Flavius Shell documentation.

Login to the Flavius EC2 instance(the username of EC2 is ec2-user), and execute:

flavius-shell --user admin --password admin123

Python/Java SDK

Flavius supports Bolt protocol. User can use Neo4j Python/Java SDK to access flavius database.

Please refer to SDK documentation.


4. Shut Down and Release Resources

  1. After use, it is recommended to stop or terminate the instance in the EC2 console to avoid unnecessary costs.
  2. Ensure important data is backed up in advance.

Frequently Asked Questions

  • Unable to connect to the database?
    • Check if the security group ports (7687/30000) are open.
    • Check the instance status and network configuration.

For other issues, please contact Flavius official support.

Last updated on