Need help with nodejs-aws-workshop?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

nathanpeck
175 Stars 73 Forks Apache License 2.0 108 Commits 3 Opened issues

Description

Learn to deploy a Node.js API using Elastic Beanstalk, AWS Lambda, Elastic Container Service, Amazon Fargate, and Kubernetes

Services available

!
?

Need anything else?

Contributors list

# 20,369
nginx
Amazon ...
aws-ecs
aws-far...
102 commits

Deploying Node.js on AWS

As a developer you are probably already familiar with how to build and run an application on your local machine:

small localhost

But the next step is packaging your application up and running it on a server, or even a whole fleet of servers, and managing this can be challenging:

large deployment

This workshop will help you take the same sample app from localhost to deployed on AWS multiple times, using a variety of different deployment mechanisms:

For this workshop the sample application code is written in Node.js but the same deployment mechanisms can be applied to other runtime languages.

Sample Application

The sample app is a simple REST API for an Adventure Time fan website. The API provides endpoints for consuming structured data about Adventure Time characters and locations.

You can view an example of the raw data here

The external HTTP interface of the API has a basic spec:

  • GET /api/
    - A simple welcome message
  • GET /api/characters
    - A list of all characters
  • GET /api/characters/:id
    - Fetch a specific character by ID
  • GET /api/locations
    - A list of all locations
  • GET /api/locations/:id
    - Fetch a specific location by ID
  • GET /api/characters/by-location/:locationId
    - Fetch all characters at a specific location
  • GET /api/characters/by-gender/:gender
    - Fetch all characters of specified gender
  • GET /api/characters/by-species/:species
    - Fetch all characters of specified species
  • GET /api/characters/by-occupation/:occupation
    - Fetch all characters that have specified occupation

 

Instructions

  1. Create a remote development machine to use for the rest of workshop
  2. Deploy API using Elastic Beanstalk
  3. Deploy API using AWS Lambda
  4. Deploy API using Elastic Container Service
  5. Deploy API using AWS Fargate
  6. Deploy API using Kubernetes with kops

If you are running at home or on your own personal dev machine you technically don't have to use the remote development machine from step #1 and could instead choose to setup the dev environment on your own machine. This workshop encourages the use of a remote dev machine to avoid variations in personal devices when giving the workshop to many attendees, and additionally to move the burden of package downloads and container uploads onto an AWS internet connection instead of the local wifi connection at the workshop venue.

You will notice throughout this workshop that the instructions tend to focus on how to deploy architectures using infrastructure as code. So you will see a lot of commands that files from a

recipes
folder, for example. You should definitely check out the contents of these "recipes" to see more details about what is being deployed, and how it is configured.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.