DEV Community


Posted on

Deploying a "serverless" app


So last night I decided to deploy a serverless app that generates some number of random words.

AWS Services

  • Route53
  • Lambda
  • API Gateway
  • S3 Storage
  • Cloudfront Cache
  • Certificate Manager

First up, this isn't a tutorial as there are plenty of those about and I wanted to share a more high level description of the various AWS services used and how they all linked together in my example deployment.

So first off the example app, its a very simple react app that takes a user given number of random words to return and a time setting as to how frequently those words should be updated.

This react app is deployed at a domain name configured via Route53

This app is being served from an S3 Bucket, via Cloudfront using an AWS managed SSL Certificate.

When the app is set to fetch some random words, every 5, 15 or 30 seconds, it sends a request to an API Gateway this request is then passed to a Lambda function, which is written in Javascript.

This Lambda function returns a JSON response containing the requested number of random words back to the API Gateway

This is then returned to the waiting react app, and all in less than 40ms in most cases!

Discussion (0)