Remake-Serverless — use Remake without a server

Sai Ramachandran
4 min readDec 31, 2021

This is Part 2 of a two part series introducing you to Remake. This is Part 1 which covers the rationale behind using Remake.

tl;dr; — a deep dive into Remake’s serverless version backend.

Full Disclosureremake-serverlesshhas little to do with remakeproper. David Miranda has graciously helped me better understand and appreciate remake but, at the end of the dayremake-serverless scratches a personal itch — since I’m very much invested in the Serverless ecosystem, particularly AWS, remake in its original form wouldn’t work for me.

Photo by Marc PEZIN on Unsplash

Introduction

In Part 1, I briefly talked about remake-serverless (Github) which makes it possible for you to use Remake without needing to spin up an Express server.

In this article, I will dive more deeply into how we can use remake-serverlessto read and write data to an S3 backend instead of relying on an Express server.

Orientation

Since we are going to use Remake in a Serverless environment, we can no longer rely on the Express server to manage user auth and file management.

Therefore, user auth is being handled by AWS Cognito while file management is being handled by a combination of S3 and a single Lambda function.

Of course, once you understand how these are being used, you can always fork the repo and use your own Auth and file management subsytems.

Note that JSON files you save to the Serverless backend are publicly available and visible to anyone who knows the URL. It is delivered globally using CloudFront, AWS’s CDN.

First things first

  1. Clone this repository git clone https://github.com/saiorama/remake-serverless.git
  2. …then cd remake-serverless
  3. Start http-server or any other such static website server
  4. Visit http://localhost:8080/remake.html

Signup

When you first visit the above URL, you will notice a message like the below. Clicking on Sign up/login will kick off the Cognito account creation flow.

Sai Ramachandran

Building https://squadgpt.ai - GPT for teams. Manage AI costs and retain visibility with SquadGPT. All views personal. Email = sai@squadgpt.ai