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

This is how we did it 🚀

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

🧵👇
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

19 Jul
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 Jul
Did you know that Slack started out as an online game made in Flash? 😳

How did they go from a Flash game to a $630M ARR SaaS?

Let's take a look 👇🧵 Image
"Never mind the part where we first tried to make a web-based massively multiplayer game and failed" - the Co-Founder of Slack says.

They spent almost 4 years working on that game.

Today, Slack is valuated to $5B.

Let's see what we can learn from Slack 👇
🔹 They took their own medicine

Slack became their own first users.
They had been using IRC while developing Glitch, the Flash-based game, and the team appreciated how this chat-based communication channel allowed them to work more focused and productive.
Read 13 tweets
29 Jun
10 Title Formulas that Hook 👀

I've written thousands of posts and titled hundreds of articles and YouTube Videos.
It is a fully determining factor, how well your title hooks!

Let me share 10 of the best formulas with explanations 👇🧵
Writing a title that hooks is selling!
If you feel "above" that, chances are that your content will never really make it.

And why would you write great content and then not use the title to sell it?

Use and combine from these 10 formulas, and start seeing a difference 👇
Formula:
[number] + [adjective] + [keyword] + [promise].

This is a very popular formula.
It hooks because it clearly states the topic, thus implicitly promising multiple ways of achieving a goal.

Example:
"The 5 BEST Side Hustles To Start in 2021"
Read 13 tweets
24 Jun
❌ STOP USING SCRUM

Especially if you're a startup!
There's a much better alternative.

🧵👇
Scrum is almost 30 years old.
30 years!

Think about that for a second - what was considered "agile" in 1994 isn't necessarily agile today.

In fact - by the very definition of what "agile" means, it's not!
Yet, Scrum still seems to be the preferred goto for managing small software teams - especially adopted by large organizations.

Maybe it's just me.
I've seen project after project being butchered by Scrum for the past 10 years now.
Read 10 tweets
22 Jun
Dealing with rejection 👊

Running a startup comes with a *lot* of rejection.

Here are 5 tips on how to deal with them, and even make them work for you 👇🧵
1️⃣ Don't take it personally.

When you let rejection entail "I'm not good enough", you will start fearing and avoiding it.

Be very careful here.

You can't make a perfect product, and it's crucial for you to get feedback.
Rejection is much more valuable than no feedback at all.
2️⃣ Adopt a curious mindset.

Try your best to not let emotions, cognitive schemas, or other internal mechanisms obscure what a rejection actually means.

It means that your product currently doesn't solve the problem sufficiently.
And that's all.

Now go and work on that 💪
Read 6 tweets
17 Jun
4 sources of income to consider without being an employee.

💰 Selling products
For instance a SaaS.

💰 Offering information
YouTube, eBooks, online courses.

💰 Selling yourself
Freelancing, consulting.

💰 Passive income
Dividends, real-estate, index funds.

🧵👇 Image
💰 Selling products

Use your programming skills to build SaaS products.

This type of income is very uncertain and typically has a very slow start off.

On the other hand, there are almost unlimited gains to collect from launching your own SaaS product.

The potential is huge.
💰 Offering information

Create videos on YouTube, put your Medium articles behind the paywall, or sell ebooks on Gumroad.

This type of income is more easily accessible, and also has a huge potential.

It's also very unreliable and can vary greatly from month to month.
Read 7 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 Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(