Blog Insights
  • Teammates sitting together and looking at code

    Node Reference - Validation

    Prerequisites This article builds on the prior article: Node Reference - Put. Add model validation We now have a service that allows us to create product records but does not provide any mechanism for ensuring those products contain all the required data we need in the correct format. For this,...
  • Teammates sitting together and looking at code

    Node Reference - Put Product

    Prerequisites This article builds on the prior article: Node Reference - DynamoDB. Create put test/endpoint First, lets write a spec for our POST /products endpoint. Create a file called products/createProduct.spec.js with the following contents: const proxyquire = require('proxyquire'); describe('products', function () { describe('createProduct', function () { beforeEach(function () { process.env.PRODUCTS_TABLE_NAME...
  • Teammates sitting together and looking at code

    Node Reference - DynamoDB

    Prerequisites This article builds on the prior article: Node Reference - Authentication. Add DynamoDB Before we can start building out our product endpoints, we need a place to store them. For that, we are turning to DynamoDB. Tables are the main component, not a “database”, so we can create just...
  • Teammates sitting together and looking at code

    Node Reference - Authentication

    Prerequisites This article builds on the prior article: Node Reference - Cognito. Adding authentication In order to leverage our new identity provider, we need to add a middleware into our Koa pipeline. This middleware will reject requests that do not contain valid tokens. We can accomplish this by using two...
  • Teammates sitting together and looking at code

    Node Reference - Cognito Setup

    Cognito setup In order to secure our application we are going to leverage OpenID Connect. Each request to our application from either another service or a logged in human user will contain a JSON Web Token (a.k.a. JWT) as a “Bearer” token in the Authorization header. This token not only...
  • Teammates sitting together and looking at code

    Node Reference - HTTPS

    Prerequisites This article builds on the prior article: Node Reference - HTTPS/DNS. HTTPS and DNS In this post we are going to add a friendly DNS address that can be used to invoke our service so that clients do not have to use the auto-generated AWS load balancer name. We...
  • Teammates sitting together and looking at code

    Node Reference - Application Load Balancer

    Prerequisites This article builds on the prior article about AWS Fargate. Add an Application Load Balancer For a long time, AWS has supported an HTTP(S) load balancing service in the form of an Elastic Load Balancer (now called a “Classic load balancer”). When paired with ECS, a classic load balancer...
  • Teammates sitting together and looking at code

    Node Reference - Fargate

    Prerequisites This article builds on the prior article about AWS CodePipeline. Fargate History With an automated build process underway, it is now time to switch focus to the application’s runtime environments. We will be creating two environments: Development (aka. Dev) and Production (aka. Prod). Consider wether your project needs more...
  • Teammates sitting together and looking at code

    Node Reference - Code Pipeline

    Prerequisites This article builds on the prior article: CloudFormation. Continuous building via AWS CodePipeline Not only are we going to manage our application environments with Cloudformation but we are also going to manage our deployment pipeline in the same manner. CodePipeline (Not to be confused with CodeDeploy) is the Continuous...
  • Teammates sitting together and looking at code

    Node Reference - Cloudformation

    Prerequisites This article builds on the prior article: Dockertize. Introduction In the articles leading up to this one, we’ve created a docker image of a minimal tested NodeJS microservice. Our next step is to deploy the docker image into a container running in the AWS cloud platform. AWS CloudFormation allows...