- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud
- Data

Loading and Retrieving Data in Neptune
In this lab, you will load data from an S3 bucket into an existing Neptune instance using the bulk load feature. This is far more efficient than executing a large number of `INSERT` statements, `addVertex`, and `addEdge` steps, or other API calls. The Neptune instance will be available when you start the lab. However, you will need to create an IAM role and an S3 bucket, so prior knowledge of the IAM and S3 services are suggested.

Lab Info
Table of Contents
-
Challenge
Create an S3 Bucket and Grant Access
- In the AWS Management Console, navigate to S3.
- Visit this lab's GitHub repo and download the neptune-data.rdf file to your local machine.
- Create a S3 bucket with the following parameters:
- Bucket name: neptune-import<INSERT_CURRENT_DATE_HERE>
- Region: US East (N. Virginia)
- Copy the S3 bucket name into a text file for later use.
- Upload the neptune-data.rdf from your local machine.
- Create an IAM Role called neptune-import with AmazonS3ReadOnlyAccess permissions.
- Edit trust relationship for neptune-import and add the rds.amazonaws.com service.
- Add the neptune-import role to your
neptune-cluster
.
-
Challenge
Load the Data
- In the AWS Management Console, navigate to VPC.
- Create an Endpoint for the S3 service using "com.amazonaws.us-east-1.s3" and use the Route Table ID with two subnets.
- Copy the
neptune-import
role ARN into a text file for later use. - Copy the
neptune-cluster
endpoint and port number into a text file for later use. - In your local terminal, connect to the lab instance using the provided lab credentials.
- Save the neptune-import endpoint URL as an environment variable.
- Use
curl
to submit the upload, adding your unique role ARN toiamRoleArn
and unique bucket name tosource
. If successful,200 OK
status will appear. - Copy the loadID (from the
200 OK
message) to monitor the job.
-
Challenge
Query the Data
- Download the RDF4J client.
- Extract the client.
- Create a SPARQL repo. Be sure to include your Neptune endpoint and append
:8182/sparql
at the end. - Open the repo to view the submitted S3 bucket data.
- Query the data.
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.