Did you know that FeedHive is built using a fully serverless architecture with monthly server costs of <$100?

This is how we did it 🚀

Learn how to create a Full Stack Serverless Application using React and Amazon Web Services.

🧵👇 Image
First of all - there are many different ways to compose a Serverless Stack application.

With that said, let's start.

Tech Stack:
🔹 DynamoDB
🔹 GraphQL
🔹 AWS Lambda
🔸React
🔸Static hosting in AWS S3

Tools:
🔵 AWS Amplify
🔵 Serverless
🔹 DynamoDB (1/3)

A managed database provided by AWS.

It supports both key-value entries and documents.
That means that a field can contain a single value, such as a string or a number, but can also contain a document, i.e. a JSON-object.
🔹 DynamoDB (2/3)

It's schemaless, so besides a key, it doesn't rely on a predefined schema.
You can think of this as a combination of relational and document-based databases such as MongoDB.
🔹 DynamoDB (3/3)

It's fully managed by AWS, so you don't need a server running to host the database.
This enables extremely high flexibility when it comes to up- and down-scaling your solution.

Get started with DynamoDB on AWS website.
aws.amazon.com/dynamodb
🔹 GraphQL (1/3)

GraphQL is a query language and an alternative to SQL and MySQL.
With GraphQL we can specify exactly what we need and the relation between the data coming from the backend, all in a single request.

graphql.org
🔹 GraphQL (2/3)

AWS has a solution called AppSync which enables you to create a managed GraphqQL layer to securely access, write and combine data from one or more data sources.

You can link a DynamoDB table as a data source directly, without having to write custom resolvers.
🔹 GraphQL (3/3)

AWS AppSync is again fully managed, so you don't need a server running your GraphQL API.
Additionally, you can easily configure authentication based on an API-Token or OAuth 2.

Get started with AppSync on AWS website.
aws.amazon.com/appsync
🔹 AWS Lambda (1/2)

AWS Lambda functions enable you to write the entire Back-End using individual functions that run in the Cloud.
This is an extremely powerful alternative to managing and provisioning servers for your Back-End.
🔹 AWS Lambda (2/2)

Even though you can link a DynamoDB table as a data source directly using AppSync, you typically need a bit more custom resolver-logic.

Fortunately, you can use Lambda as a data source as well.
This allows us to write custom resolvers when needed.
🔸 React (1/2)

React is a JavaScript library for building user interfaces.
It's especially powerful for writing Single Page Applications.

It's very little likely that you haven't heard of it already, but if not, I'll drop a link to their website here.
🔸 React (2/2)

By far the easiest way to get started with a new React App, is not use create-react-app.

It comes with a comprehensive toolchain for both developing, bundling, and shipping your React App.
reactjs.org/docs/create-a-…
🔸 Static hosting in AWS S3 (1/2)

S3 is a storage service in AWS.
We will host our application using AWS S3.

After we have used create-react-app to build our React App, we will simply upload it to an S3 bucket where the static files can be accessed.
🔸 Static hosting in AWS S3 (2/2)

AWS CloudFront is a blazing fast Content Delivery Network, and we will use this to direct traffic from our domain to the S3 Bucket.

This offers additional capabilities in regards to caching, load balancing, and more.
🔵 AWS Amplify (1/2)

AWS Amplify is a framework that enables us to integrate a lot of the things we have covered so far.

With AWS Amplify we can quickly create a stack, add authentication, add a GraphQL API using AppSync, and host the app using S3 and CloudFront.
🔵 AWS Amplify (2/2)

AWS Amplify is CLI-based and will get you started with a cloud-powered app in minutes (literally).

It will make our lives SO much easier!

docs.amplify.aws
🔵 Serverless (1/2)

The Serverless Framework is a tool that enables us to develop, manage, and deploy Lambda Functions with absolute ease!

It allows us to use infrastructure-as-code for the entire cloud infrastructure.
🔵 Serverless (2/2)

We can set up both DynamoDB, AppSync, GraphQL Schema, and all our Lambdas in a single yml-file.
It's an incredible tool!

serverless.com
Additionally, to minimize costs, it can be of great importance to understand where to use caching effectively.

How and where to cache very much depends on the application you're building.

See more in this thread.
The biggest takeaway from this stack is that it's serverless!

🔥 No need to manage servers.
🔥 Pay-per-use instead of paying for uptime.
🔥 Serverless is inherently scalable.
🔥 Reducing cost.
🔥 Energy-efficient, ultimately better for the climate.
If you want more details about AWS and Serverless, and how we applied this architecture while building FeedHive - then check out this YouTube video 👇

I hope you learned something new.

Please, go back to the first tweet and give it a like 🧡 and retweet 🔁.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Simon Høiberg

Simon Høiberg Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @SimonHoiberg

22 Dec
Do you like my content here on Twitter?

I'm active on other social platforms as well!
Do you wanna connect or subscribe? 🤩

I've made a collection of links below 👇 Image
You can find me on YouTube here 👇

I share everything I know about making money online 🔥

youtube.com/simonhoiberg
Of course, I'm also on LinkedIn 👇

On LinkedIn, I'm allowed to share a little longer posts, so I often go a little more in-depth here 😉

Feel free to both follow and connect with me.

linkedin.com/in/simonhoiberg
Read 6 tweets
21 Dec
Do you also love JavaScript? 😍

Here are 8 of my best JavaScript Threads.

All collected into one SUPER THREAD
🧵👇
Read 9 tweets
16 Dec
VSCode Shortcuts ⚡

7 Essential VSCode Shortcuts that you should learn by heart.

Save time and become super-efficient while coding.

🧵👇
Search text through all files.

By hitting ctrl + shift + F, we can quickly open the sidebar and search through all files.
Open the command palette.

Instead of clicking around, spending time looking for something somewhere in the menu, simply use ctrl + shift + P to open the command palette.

Now invoke the desired functionality by using a command instead.
Read 10 tweets
14 Dec
20 of my most popular JavaScript Tips 💡

Thread 🧵👇
Pass arguments as an object.

The meaning becomes much more clear from the names of the properties.
Also, the order doesn’t matter anymore.

Trust me - your teammates will be happy 🙌
Extending the standard built-ins is considered bad practice.

Create your own utility class instead 🙌
(...And share it on NPM, if it's useful to others).
Read 23 tweets
7 Dec
Want to start a business?

Keep it simple!
Become a solopreneur and start on your own.

🔸 You can get started almost for free.
🔸 You don't need to quit your regular job.

Here are 5 ideas + strategies you can use to get started 🚀

🧵👇
⚠️ Disclaimer:
You're not gonna be rich overnight.
Building up a business requires hard work.

The good news is - it's probably easier than you think 😉

Keep reading 👇
If you're interested in this topic, be sure to check the video version of this thread as well. I go into much more details here 👇

Read 30 tweets
6 Dec
⚡ I created my first NFT ⚡

It's now for sale 💸

And it's a special NFT as well 👇🧵
I am dedicated to reaching 100K subscribers on YouTube in 2022!

The owner of this NFT will get a 1-minute shoutout in one of my YouTube videos, once I get there!

Let me explain 👇
Do you want to own this NFT?
Then drop an offer here 👇

It is listed for sale until January 1st, 2022 🚀

opensea.io/assets/matic/0…
Read 5 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(