Prerequisites for connecting Amazon Neptune databases using IAM authentication
The following are instructions for installing Apache Maven and Java 8 on an Amazon EC2 instance. These are required for the Amazon Neptune Signature Version 4 authentication samples.
To Install Apache Maven and Java 8 on your EC2 instance
Connect to your Amazon EC2 instance with an SSH client.
-
Install Apache Maven on your EC2 instance. If using Amazon Linux 2023 (preferred), use:
sudo dnf update -y sudo dnf install maven -yIf using Amazon Linux 2, download the latest binary from https://maven.apache.org/download.cgi:
sudo yum remove maven -y wget https://dlcdn.apache.org/maven/maven-3/ <version>/binaries/apache-maven-<version>-bin.tar.gz sudo tar -xzf apache-maven-<version>-bin.tar.gz -C /opt/ sudo ln -sf /opt/apache-maven-<version> /opt/maven echo 'export MAVEN_HOME=/opt/maven' >> ~/.bashrc echo 'export PATH=$MAVEN_HOME/bin:$PATH' >> ~/.bashrc source ~/.bashrc -
The Gremlin libraries require Java 8. Enter the following to install Java 8 on your EC2 instance.
sudo yum install java-1.8.0-devel -
Enter the following to set Java 8 as the default runtime on your EC2 instance.
sudo /usr/sbin/alternatives --config javaWhen prompted, enter the number for Java 8.
-
Enter the following to set Java 8 as the default compiler on your EC2 instance.
sudo /usr/sbin/alternatives --config javacWhen prompted, enter the number for Java 8.