The Complete AWS Boilerplate
Re-Create any Internet Company by copying this Cloud Boilerplate for Startups
Want to re-make Netflix? How about AirBnb and Zillow? This boilerplate is for rapidly building the backends of modern internet businesses using AWS. Everything from A to Z π
π ~ Welcome to The Complete AWS Boilerplate ~ π
This is the Official 2019 Edition written by Kangzeroo (see original 2017 here). It is based on the practical knowledge Iβve gained from building many products in my own startup, RentHero. This tutorial series shows you step-by-step how to set-up and connect your backends on the AWS Cloud (with screenshots). It is meant to be easy to understand and skips the unnecessary details. Our focus is gettings things done fast and done right. π
Who Is This For?
This is NOT for system admins looking to pass the official AWS Certificate Exam. This boilerplate is for:
- CTOs π€
- Startup developers πͺ
- Enterprise developers reading startup stuff on their spare time π
- Non-programmers curious to see what the AWS Cloud is capable of π±
What Can I Expect?
I made this boilerplate to be a 10X βforce multiplierβ for small teams, so you can expect to gain 6 months of knowledge in 2 weeks. Weβll focus on:
- Core AWS Services and their Use Cases
- Foundational Security from Day 1
- Pro-Tips for Rapid Iteration
This boilerplate helps you achieve 10X results by letting you:
- Skip the learning curves
- Copy boilerplate code
- Enjoy a free 30% productivity boost* by using Javascript on the frontend and backend (*not actually 30%, thatβs just an expression I like to use)
- Let Amazon do the heavy lifting
Excited yet?
The first step is to click SUBSCRIBE and CLAP for this article (50 claps max if youβre feeling it π ). Because this requires a huge amount of time and commitment on my end, the speed that this tutorial series will come out depends on how much YOU the reader expresses your support π I work best when people are relying on me. Share this with your friends if you think they might find it interesting.
Amazon, if youβre reading thisβ¦ π Please send some Cloud Credits my way, it would help cover the costs for hosting live demos and Iβd appreciate it very much β€οΈ
Table of Contents
These articles are meant to be read in order as each article builds upon previous concepts taught. But you can also read them independently if youβre already familiar with AWS.
[ 2 completed, 27 pending ] Github repos coming soon.
- Creating Your AWS Account β Initial Setup with Security from Day 1
- $0.01 Websites with Amazon S3 β Hosting Websites
- Security from Day 1 β With IAM
- Visit Me At WWW β Domain Registration with Amazon Certificate Manager and Route53
- Literally Hello World β Global Content Delivery with Amazon CloudFront
- Admin vs Developer β Setting Up Account Security with Amazon IAM
- Passwordless Sign In β User Accounts with Amazon Federated Identities
- Is Your Name on the GuestList? β Secure Amazon S3 Storage with ACLs and IAM Roles
- A Web Security Walkthrough β Amazon Security Groups, Access Control Lists & Origin Checks
- We Donβt Talk With The Outside World β Setting up Amazon VPC security
- The Cloud Workhorse β Amazon EC2
- Infinitely Scalable Backends Pt 1 β Amazon Lambda
- Infinitely Scalable Backends Pt 2 β Amazon API Gateway
- Infinitely Scalable Backends Pt 3 β Serverless Framework
- Infinitely Scalable Backends Pt 4 β Amazon Cloudwatch
- Infinitely Scalable Backends Pt 5 β Scheduled Lambda Jobs
- Infinitely Scalable Backends Pt 6 β Honorable Mentions: Amazon ELB and FarGate
- Super Databases Pt 1β NoSQL with Amazon DynamoDB
- Super Databases Pt 2 β SQL with Amazon RDS
- Super Databases Pt 3 β Hosted ElasticSearch on Amazon
- Super Databases Pt 4 β Amazon S3 with Athena
- Super Databases Pt 5 β Graph Networks with Amazon Neptune and GraphQL
- Super Databases Pt 6 β Information Across Time with Amazon TimeSeries
- Super Databases Pt 7 β Getting Superfast with Amazon Elastic-Cache
- Super Databases Pt 8 β Everything In One Place with Amazon RedShift
- You And What Army β Custom Email Accounts with Amazon SES
- The Infrastructure Is Talking β Coordinating Notifications with Amazon SNS
- The Phone Lines Are Tapped β Controlling Calls and SMS with Twilio
- Get In Line Buddy β Managing Queues with Amazon SQS
- Catch Me If You Can β Scraping Web Data with Chrome Puppeteer
- An Intelligence Walkthrough β A Tour of Amazon A.I. Services
- How Would You Like To Pay? β Stripe Integration on AWS
- Paying Rent To Big Daddy AWS β Billings and Monitoring
Articles Categorized By Subject Acts:
Act 1: Website Hosting
When hosting a website, there are 3 things we want it to be:
- Available β can visitors access your website fast around the world?
- Secure β does your website have the HTTPS green bar?
- Cheap β website hosting for minimal cost
If you donβt need server-side rendering, we can very conveniently achieve all of these easily using two AWS services:
- Amazon S3 β File Storage which will act as cheap website hosting
- Amazon CloudFront β Global distribution of your website with HTTPS green bar
Accompanied by these supporting AWS services:
- Amazon Route 53 β Managing your domain routes and where they point to
- Amazon Certificate Manager β Managing your domain ownership
Act 2: User Authentication and Security
As a general rule of thumb, security should be foundationally built into your product. Most of what we need for security can be achieved with the following AWS and 3rd party services:
- Amazon Identity Access Management (IAM) β Deciding who gets access to what
- Amazon Virtual Private Cloud (VPC) β Isolating your services into private intranets to protect sensitive resources
- Amazon Federated Identities (FedID) + Passwordless (3rd Party)β Giving your users a convenient login system with its own IAM roles
We will also cover some key concepts such as:
- IAM Roles
- Security Groups
- JSON Web Tokens & Origin Checks
- Special Mention: AWS Key Management Service (KMS)
Act 3: Scalable Backends
There are tradeoffs to be made with backends. You can either take a microservices approach or a serverless approach. The benefit of microservices is that they are much easier to develop for, but require a little bit more management. The benefit of serverless is that they have very little management, easy security and automatic logging, but development can be a headache, especially with multiple team members.
This tutorial series will cover the serverless approach as it is the greater force multiplier for small teams. We will cover these AWS and 3rd party services:
- Amazon Lambda β run code on the cloud without managing servers or worrying about load balancing traffic
- Amazon API Gateway β turn your Lambda functions into a REST api
- Serverless Framework (3rd Party) β managing multiple lambda functions for sanity
- Amazon CloudWatch β automatic logging for your backends
And with special mentions about:
- Amazon Elastic Compute Cloud (EC2) β virtual servers on the cloud
- Amazon Elastic Beanstalk (ELB) β load balancing traffic to EC2
- Amazon FarGate β manage Docker containers
- Amazon Lambda Scheduled Jobs β prescheduled tasks on the cloud
Act 4: The Super Databases
This is the longest chapter of this entire series. It covers the wide variety of storage options available to you and their use cases. We will cover these AWS Services:
- Amazon DynamoDB (DYN) β scalable noSQL database for unstructured data
- Amazon Relational Database Service (RDS) β scalable SQL database for structured data, with a special focus on Amazon Aurora SQL
- Amazon hosted ElasticSearch (ELS) β an amazing noSQL database that allows for extremely flexible and precise querying on unstructured data
- Amazon Simple Secure Storage (S3) β the easiest way to store data and make it available for users
We will also have special mentions for:
- Amazon Neptune (NEP) β a hosted Graph database useful for querying on complex multi-dimensional relationships
- Amazon Timeseries (TMS) β an immutable database of events happening over time
- Amazon ElasticCache (ELC) β a hosted key-value store useful for rapid efficient retrieval of information when querying an entire database doesnβt make sense
- Amazon RedShift (RED) β a massive columnar database where you can injest all your other data for one central place for querying
- Amazon Athena (ATH) β run SQL queries on data inside your S3 buckets
Act 5: Communications F*ck Yeah
Here we will cover the various AWS and 3rd party services available for managing your communications infrastructure.
- Amazon Simple Email Service β create and manage custom emails accounts for users or your organization
- Amazon Simple Notification Service β lets your AWS services talk to each other with pub/sub messaging
- Twilio β lets you integrate phone calls and SMS text messaging into your product infrastructure
- Amazon Simple Queue Service β an easy way to queue requests or messages for batch handling
Act 6: Intelligence and Data Collection
Itβs no surprise that the next big technology your organization needs to be leveraging is A.I. (Artificial Intelligence). Luckily you donβt need a team of PhDs to benefit from A.I. thanks to Amazonβs rapidly growing arsenal of intelligence-as-a-service. A.I. requires lots of data, but sometimes we donβt have it ourselves. Luckily the internet is the worldβs largest store of information and we will go over how to scrape this data. This Act will cover:
- Puppeteer β control a chrome browser using code and run it on virtual servers without needing a physical screen
- Amazon Rekognition β image recognition that can be modified to your subject domain. how many people are in this image? What is the dominant color scheme?
- Amazon Comprehend β natural language processing that can be modified to your subject domain. what are users saying? how do they feel?
There has been an explosion of intelligence services from Amazon that are worth a special mention. Some are publically available while others are in private beta.
- Amazon Polly β Turn text into spoken word
- Amazon Transcribe β Turn spoken audio into text
- Amazon Translate β Translate text between languages
- Amazon Lex β Build chatbot flows
- Amazon DeepLens β identify whatβs happening in videos
- Amazon Textract β turn articles and blogs into intelligent question and answer databases
- Amazon Forecast β used with Amazon Timeseries database. predict what will happen next based on past events
- Amazon Personalize β generates recommendations to your users based on what theyβve already liked
So It Beginsβ¦
Have I missed anything? Tell me in the comments below! π If you havenβt yet already, subscribe and leave some claps! I look forward to learning together with you in 2019.