Neo4j on AWS

Neo4j can be easily deployed on EC2 instances in Amazon Web Services (AWS) by using the official listing for Neo4j Enterprise or Neo4j Community Edition on the AWS Marketplace.

The AWS Marketplace listing uses a CloudFormation template maintained by Neo4j. The template’s code is available on GitHub and can be customized to meet more complex or bespoke use cases.

Neo4j does not provide Amazon Machine Images (AMIs) with a pre-installed version of the product. The Neo4j AWS Marketplace listings (and listings on GitHub) use CloudFormation templates that deploy and configure Neo4j dynamically with a shell script.

Supported Neo4j versions

The Neo4j AWS marketplace listing can be configured to deploy either Neo4j Enterprise Edition 5 or 4.4, or Neo4j Community Edition 5. The CloudFormation template always installs the latest available minor version of each release. For example, the latest minor release of Neo4j 5 is 5.21.

Neo4j CloudFormation template

AWS CloudFormation is a declarative Infrastructure as Code (IaC) language that is based on YAML and instructs AWS to deploy a set of cloud resources. The Neo4j CloudFormation template repository contains code for Neo4j 5 on the main branch and code for Neo4j 4.4 on the Neo4j-4.4 branch:

The Neo4j CloudFormation template takes several parameters as inputs, deploys a set of cloud resources, and provides outputs that can be used to connect to a Neo4j DBMS.

Important considerations

  • The deployment of cloud resources will incur costs.

  • The Neo4j CloudFormation template deploys a new VPC.

    • AWS accounts are limited to an initial quota of 5 VPCs (you can view your current quota by viewing the Limits page of the Amazon EC2 console).

    • Your VPC quota can be increased if needed by contacting AWS support.

  • The Neo4j CloudFormation template uses an Auto Scaling group (ASG) to deploy EC2 instances.

    • This means that to stop or terminate EC2 instances, you must first remove them from the ASG, otherwise, the ASG will automatically replace them.

  • SSH Keys are not generated as part of the CloudFormation template.

    • Use EC2 Instance Connect (via the EC2 console) to connect to deployed EC2 instances if needed.

Input parameters

Parameter Name Description

Stack Name

A name for the CloudFormation stack to be deployed, e.g., my-neo4j-cluster. Stack name can include letters (A-Z and a-z), numbers (0-9), and dashes (-).

Install Graph Data Science

An option to install Graph Data Science (GDS). Accepted values are Yes or No.

Graph Data Science License Key

A valid GDS license key can be pasted into this field. License keys will be sent to and stored by Neo4j. This information is used only for product activation purposes.

Install Bloom

Optionally install Neo4j Bloom. Accepted values are Yes or No.

Bloom License Key

A valid Bloom license key can be pasted into this field. License keys will be sent to and stored by Neo4j. This information is used only for product activation purposes.


A password for the neo4j user (minimum of 8 characters)

Number of Servers

Specify the number of desired EC2 instances to be used to form a Neo4j cluster (a minimum of 3 instances is required to form a cluster).

Instance type

The class of EC2 Instances to use.

Disk Size

Size (in GB) of the EBS volume on each EC2 instance. Larger EBS volumes are typically faster than smaller ones, therefore 100GB is the recommended minimum size.


Specify an address range from which EC2 instances are accessible on port 22, via SSH. You can use to allow access from any IP address. This field must also be correctly populated to allow the use of EC2 instance-connect.

Deployed cloud resources

The environment created by the CloudFormation template consists of the following AWS resources:

  • 1 VPC, with a CIDR range (address space) of

    • 3 Subnets (if a cluster has been selected), distributed evenly across 3 Availability zones, with the following CIDR ranges:




    • A single subnet (if a single instance has been selected) with the following CIDR range:


    • A security group.

    • An internet gateway.

    • Routing tables (and associations) for all subnets.

  • An auto-scaling group and launch configuration, which creates:

    • 1, or between 3 and 10 EC2 instances (Depending on whether a single instance or an autonomous cluster is selected).

  • 1 Network (Layer 4) Load Balancer.

    • A target group for the EC2 instances.

Template outputs

After the installation finishes successfully, the CloudFormation template provides the following outputs, which can be found in the Outputs tab of the CloudFormation page on the AWS console.

Output Name Description


The http URL of the Neo4j Browser.


The Bolt URL of the Neo4j Browser.


The username neo4j and a reminder to use the password that was specified earlier when filling out the CloudFormation template.

Cluster version consistency

When the CloudFormation template creates a new Neo4j cluster, an Auto Scaling group (ASG) is created and tagged with the minor version of the installed Neo4j database. If you add more EC2 instances to your ASG, they will be installed with the same minor version, ensuring that all Neo4j cluster servers are installed with the same version, regardless of when the EC2 instances were created.


Installing and starting Neo4j from the AWS marketplace constitutes an acceptance of the Neo4j license agreement. When deploying Neo4j, users are required to confirm that they either have an enterprise license or accept the terms of the Neo4j evaluation license.

If you require the Enterprise version of either Graph Data Science or Bloom, you need to provide a key issued by Neo4j as this will be required during the installation.

To obtain a valid license for either Neo4j, Bloom, or GDS, reach out to your Neo4j account representative or get in touch using the contact form.

Delete CloudFormation Stack and destroy resources

Select the CloudFormation stack to be removed and click the Delete button. The stack deletion cleans up all AWS resources deployed by it.