Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

amazon-archives/fully-automated-neo4j-to-neptune

Overview

This AWS CDK app helps you migrate the simple Neo4j movies graph database to Amazon Neptune in a hands-free, fully automated way. The AWS database blog Migrating a Neo4j graph database to Amazon Neptune with a fully automated utility has more details

Architecture

architecture

Prerequisites

  • Install Node.js and npm
  • Install Git
  • Install and Configure AWS CLI
  • The IAM user configured in the AWS profile must have the privileges to provision the following resources. Please note, while working with AWS acounts, IAM users and policies always follow IAM best practices:
    • Amazon VPC and Subnets
    • Amazon EC2 instance
    • Amazon S3 bucket
    • Amazon S3 Gateway VPC Endpoint
    • An Amazon Neptune cluster
  • Install AWS CDK

Configuration

  • Verify the app specific configuration saved in bootstrapper/cdk.json to ensure you have the right values for your environment
    • (Required) replace <your-key-pair-name> with your own EC2 key pair name e.g. my-us-west-2-key-pair
    • (Required) replace <provide-your-ip> with your current IP address e.g. 8.8.8.8/32 Know your IP address

The contents of the file looks like this. Feel free to change the values before running the app

{
	"app": "node bin/bootstrapper.js",
	"context": {
		"vpc_cidr": "192.168.0.0/16",
		"ec2_class": "t3a",
		"ec2_type": "xlarge",
		"ec2_key_pair": "<your-key-pair-name>",
		"sg_fromIp": "<provide-your-ip>"
	}
}

Download

Download the code using the following git command

$ git clone https://github.com/aws-samples/fully-automated-neo4j-to-neptune.git

Run

Run the app

$ cd fully-automated-neo4j-to-neptune/bootstrapper
$ npm install
$ npm run deploy

Detailed architecture architecture

The app will ask questions while showing you what it's trying to create. Just respond with a 'y' to let it do its stuff. It will take about 10 minutes to deploy the infrastructure and run the required code to automate the migration.

When you run the app the following are downloaded and installed:

After running the app, you'll see an output similar to the following: output

Please note: the code uses the default AWS CLI profile

Destroy

To cleanup after you are done

$ npm run destroy

Please note: this command doesn't delete the Amazon S3 bucket it creates, you'll have to do it manually