- Lab
- A Cloud Guru
Deploy a Serverless Application to AWS with Lambda and Neptune
In this lab, you will deploy a serverless social media application that uses Neptune to recommend friends to the main user, Bob. You will start by deploying the Neptune stack and import the data into Neptune using an EC2 instance and an S3 bucket. Then, you will deploy the API stack that will interface with the Neptune database for the UI. Finally, you will deploy the UI.
Path Info
Table of Contents
-
Challenge
Install Serverless
- Create an access key for the
cloud_user
. - Update the cloud instance.
- Install Node,js.
- Install serverless globally.
- Export the access key and secret access key at the command line.
- Create an access key for the
-
Challenge
Deploy Neptune Stack
- Create a key pair called
neptune-key
from the EC2 dashboard. - Use the
serverless.yml
file located in~/Labs/Neptune
when deploying the Neptune stack. - Deploy Neptune using the following parameters:
- Parameter 1:
ssh-key-name
with a value ofneptune-key
. - Parameter 2:
dbcluster
. Come up with the name of the cluster as the value.
- Parameter 1:
- Create a key pair called
-
Challenge
Deploy API Stack
- Install the Node.js packages.
- Deploy the API stack using serverless using the
serverless.yml
file located in~/Lab/API
. - Save the API URL. You will need it in the next objective.
- Test the AI URL to make sure the stack deploys properly.
-
Challenge
Deploy UI Stack
- Install Node.js packages for the UI.
- Deploy the UI stack using the
serverless.yml
file located in~/Lab/UI
. - Edit the
config.js
file:- Modify the
api
element.
- Modify the
- Deploy the UI stack using serverless.
-
Challenge
Add Data to Neptune
- Deploy and S3 bucket using serverless using the serverless.yml file located in
~/Lab/S3
. - Download the CSV files from GitHub or
scp
them from~/Lab/S3
to your local system. - Upload the CSV files to the S3 bucket you created.
- Modify the curl command provided in the lab guide with the S3 role ARN and CSV file URIs.
- Connect to the EC2 instances included with the lab.
- Use the curl command below to import the data into Neptune for each file in the bucket.
- Start with the vertex files first.
- Deploy and S3 bucket using serverless using the serverless.yml file located in
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.