Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon

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.

Google Cloud Platform icon

Path Info

Clock icon Intermediate
Clock icon 1h 30m
Clock icon Oct 09, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Create an S3 Bucket and Grant Access

    1. In the AWS Management Console, navigate to S3.

    2. Click Create bucket.

    3. Set the following settings:

      • Bucket name: "neptune-import<INSERT_CURRENT_DATE_HERE>"
      • Region: US East (N. Virginia)
    4. Copy the S3 bucket name into a text file for later use.

    5. Select Next.

    6. Under Tags, set Key to "name" and Value to "neptune-import".

    7. Select Next >> Next >> Create bucket.

    8. Visit this lab's GitHub repo and download the neptune-data.rdf file to your local machine.

    9. Click on the bucket's name and select Upload.

    10. Click Add files.

    11. Select the neptune-data.rdf from your machine.

    12. Select Upload.

    13. Click on Services and select IAM.

    14. Select Roles >> Create role >> S3 >> Next: Permissions.

    15. Select AmazonS3ReadOnlyAccess.

    16. Select Next:Tags >> Next:Review.

    17. For Role name, enter "neptune-import".

    18. Click Create role.

    19. Search for and select neptune-import.

    20. Select the Trust relationships tab.

    21. Click Edit trust relationship.

    22. In the policy document, edit the Service: line to read

       "Service": [
    1. Select Update Trust Policy.
    2. Click Services and select Neptune.
    3. Select the neptune-cluster.
    4. Click Actions >> Manage IAM roles.
    5. With the neptune-import role selected, click Done.
  2. Challenge

    Load the Data

    1. In the AWS Management Console, navigate to VPC.
    2. On the left menu, click Endpoints >> Create Endpoint.
    3. In Service category, select Find service by name.
    4. In Service Name, enter "" and click Verify.
    5. In VPC, select the existing VPC from the dropdown menu.
    6. Under Route Table ID, select the ID associated with 2 subnets.
    7. Click Create endpoint >> Close.
    8. Navigate to IAM.
    9. On the left menu, click Roles.
    10. Click the neptune-import role.
    11. Under Summary, copy the role ARN into a text file for later use.
    12. Navigate to Neptune.
    13. Select the neptune-cluster.
    14. Under Connectivity & security, copy the cluster endpoint and port number into a text file for later use.
    15. Connect to the bastion host using the provided lab credentials and save the endpoint URL as an environment variable.
    16. Install curl with https support.
    17. Use curl to submit the upload, adding your unique role ARN to iamRoleArn and unique bucket name to source. If successful, a "200 OK" status will appear.
    18. Copy the loadID (from the 200 OK message) to monitor the job.
  3. Challenge

    Query the Data

    1. Download the RDF4J client.
    2. Extract the client.
    3. Create a SPARQL repo. Be sure to include your Neptune endpoint and append :8182/sparql at the end of the line.
    4. Type "yes" to overwrite the configuration. If successful, a repository created message should appear.
    5. Open the repo to view the submitted S3 bucket data.
    6. Query the data.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

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.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans