How To Make AWS Not Suck

Fireship
20 Sept 202406:38

Summary

TLDRThis video offers a guide for software developers to optimize their use of cloud platforms like AWS, Google Cloud, and Azure. It explores the spectrum of dependency on cloud services, from self-hosting purists to fully outsourced SaaS users. The video introduces tools like Pulumi, SST, Docker Build Cloud, LocalStack, and Encore to help developers leverage cloud services efficiently, avoid vendor lock-in, and maintain control over their infrastructure. It emphasizes the importance of infrastructure as code and provides practical solutions for managing cloud resources effectively.

Takeaways

  • 🌟 The video discusses how to optimize cloud computing usage for software developers, avoiding dependency extremes on cloud platforms.
  • 💼 It introduces a spectrum with 'self-hosters' at one end,反感专有闭源软件,and 'SaaS sommelier' at the other, unaware of the underlying AWS services they use.
  • 🛠️ Emphasizes the importance of Infrastructure as Code (IaC) for efficient and error-free cloud deployment, contrasting it with the risks of manual deployment.
  • 🌐 Recommends using open-source tools like Pulumi, which allows writing infrastructure code in multiple languages and provides a strong type system and IDE support.
  • 📝 Introduces SST (Serverless Stack) as an optimized IaC tool for fullstack JavaScript developers, allowing infrastructure and databases to be defined in a single TypeScript file.
  • 🚀 Highlights Docker and Docker Build Cloud for efficient containerization and image building, with cache sharing across different machines.
  • 🌐 Suggests LocalStack for local emulation of AWS services, enabling offline development and testing.
  • 📈 Mentions Cloudcraft for visual architecture planning and LocalStack dashboard for local management of cloud services.
  • 🎉 Presents Encore as a tool that combines infrastructure provisioning with application development, streamlining the deployment process.
  • ⚖️ Discusses the trade-offs of using Encore, such as reduced flexibility due to its opinionated nature and assumptions about technology stack and frameworks.

Q & A

  • What is the main topic of the video?

    -The main topic of the video is how to make cloud computing more efficient and cost-effective by leveraging big cloud platforms optimally.

  • What are the two extremes of the cloud dependency spectrum mentioned in the video?

    -The two extremes are the 'base self-hoster' who does everything manually on a low-cost VPS and the 'SaaS Some Leer' who relies heavily on cloud services and spends a lot without realizing it.

  • Why is it not ideal to be at either extreme of the cloud dependency spectrum?

    -Being too self-reliant is time-consuming and error-prone, leading to a superiority complex, while being too reliant on cloud services can lead to vendor lock-in, financial strain, and reduced technical control.

  • What is the role of infrastructure as code (IaC) in cloud computing according to the video?

    -Infrastructure as code is crucial for deploying cloud resources efficiently and safely without manual errors. It helps manage infrastructure in a repeatable and automated way.

  • What is the issue with using cloud platforms directly without IaC tools?

    -Directly using cloud platforms without IaC tools can lead to over-provisioning resources like Kubernetes clusters, which may be unnecessary and can result in homelessness due to overspending.

  • What is Palumi and how does it differ from Terraform?

    -Palumi is an IaC tool that allows writing code in multiple languages and takes a declarative approach. Unlike Terraform, it is open-source and does not require learning a special language.

  • What is SST and how does it optimize IaC for fullstack JavaScript developers?

    -SST (Serverless Shen pans and Tom Foolery) is an IaC tool that optimizes the process for fullstack JavaScript developers by allowing infrastructure and databases to be defined in a single TypeScript file.

  • How does Docker Build Cloud improve the Docker image building process?

    -Docker Build Cloud provides a shared cache that speeds up the Docker image building process both locally and in CI by only rebuilding layers that have changed.

  • What is LocalStack and how does it help with cloud service emulation?

    -LocalStack emulates major AWS services from a single container, allowing developers to test and work with services like S3, Lambda, and DynamoDB locally without an internet connection or AWS account.

  • What is the purpose of the tool Cloudcraft mentioned in the video?

    -Cloudcraft is used to create visual diagrams of cloud architecture, showing how different services connect and interact with each other in a 3D representation.

  • What does the tool Encore offer that is different from other IaC tools?

    -Encore not only provisions infrastructure but also serves as a backend application framework that integrates infrastructure semantics into the application code, automating devops tasks and reducing the need for separate IaC code.

  • What are the trade-offs mentioned for using the Encore tool?

    -The trade-offs for using Encore include reduced flexibility, as it assumes the use of TypeScript or Go, adherence to certain framework conventions, and the use of SQL databases like RDS.

Outlines

00:00

🌟 Optimizing Cloud Computing Efficiency

This paragraph introduces the concept of finding a balance in cloud computing dependency, highlighting the extremes of self-hosting and over-reliance on cloud services. It emphasizes the importance of leveraging cloud platforms efficiently without vendor lock-in. The speaker introduces infrastructure as code (IaC) as a key strategy, mentioning tools like Terraform and Pulumi, which allow for code-based infrastructure management across multiple languages. Pulumi is highlighted for its ability to define, deploy, and manage cloud resources with strong typing and Intellisense support in the IDE. The paragraph also touches on the benefits of using open-source tools to avoid being 'enslaved' by cloud service providers.

05:01

🛠️ Leveraging Tools for Cloud Development

The second paragraph delves into specific tools that can enhance cloud development workflows. It starts with SST (Serverless Shenpans and Tom Foolery), a framework for fullstack JavaScript developers that allows defining infrastructure and databases in a single TypeScript file. The paragraph also discusses the advantages of containerization with Docker and the efficiency gains from Docker Build Cloud, which enables shared caching across builds. LocalStack is introduced as a tool for local emulation of AWS services, facilitating offline development and testing. The paragraph concludes with a mention of Encore, a tool that integrates infrastructure provisioning with application code, aiming to streamline the development process by automating DevOps tasks. The trade-offs of using Encore, such as reduced flexibility due to its opinionated approach, are also briefly discussed.

Mindmap

Keywords

💡Cloud Computing

Cloud computing refers to the delivery of computing services, including servers, storage, databases, networking, software, analytics, and intelligence, over the Internet (the cloud) to offer faster innovation, flexible resources, and economies of scale. In the video, the speaker discusses how to optimize the use of cloud computing platforms like AWS, Google Cloud, and Azure to achieve greater efficiency and avoid vendor lock-in.

💡Vendor Lock-in

Vendor lock-in occurs when a customer is dependent on a single vendor for a product or service, making it difficult to switch to another vendor without significant costs or inconvenience. The video discusses the risks of vendor lock-in with cloud services and how to use open-source tools and infrastructure as code to mitigate this risk.

💡Infrastructure as Code (IaC)

Infrastructure as Code is a method of managing and provisioning computer data centers through machine-readable definition files, rather than physical hardware configuration or interactive configuration tools. The video emphasizes the importance of IaC for deploying cloud resources efficiently and consistently, mentioning tools like Terraform and Pulumi.

💡Pulumi

Pulumi is an infrastructure as code tool that allows developers to use familiar programming languages to define cloud infrastructure. The video highlights Pulumi as an alternative to Terraform, noting its support for multiple languages and its ability to provide a better developer experience with features like type safety and IntelliSense.

💡Serverless

Serverless computing is a cloud computing execution model where the cloud provider dynamically manages the allocation and provisioning of servers. The video mentions serverless frameworks and how they can simplify the deployment of applications without managing servers, using AWS Lambda as an example.

💡Docker

Docker is an open-source containerization platform that allows developers to package an application with all of its dependencies into a standardized unit called a container that can run consistently on any platform. The video discusses Docker Build Cloud, a service that enhances Docker's capabilities by providing a shared cache for building Docker images more efficiently.

💡LocalStack

LocalStack is an open-source cloud stack simulation framework that emulates AWS services on your local machine. The video explains how LocalStack can be used to test cloud applications locally, which is beneficial for developers who want to iterate quickly without relying on an internet connection or cloud credits.

💡Containerization

Containerization is the process of packaging software and all its dependencies into a container that can run on any system. The video mentions containerization as a powerful technique to free applications from vendor lock-in, with Docker being a widely used tool for this purpose.

💡Encore

Encore, as mentioned in the video, is a tool that combines infrastructure as code with backend application frameworks, allowing developers to write application code in Go or TypeScript while integrating infrastructure semantics. It aims to streamline the process of provisioning infrastructure and managing application deployment.

💡TypeScript

TypeScript is a statically typed superset of JavaScript that adds optional types to the language. The video discusses how tools like Pulumi and SST (Serverless Components and Toolkit) allow developers to use TypeScript for defining cloud infrastructure, which can lead to better developer experience and code reliability.

Highlights

The video teaches how to optimize cloud computing usage for software developers.

Developers are categorized based on their dependency on cloud platforms like AWS, Google Cloud, and Azure.

At one end of the spectrum are self-hosters who handle high traffic with minimal resources.

At the other end are developers heavily reliant on SaaS tools, often unknowingly using AWS services.

Being too self-reliant or too dependent on cloud services has its drawbacks.

A balanced approach is suggested, leveraging cloud services efficiently without vendor lock-in.

Open source tools are recommended for optimal cloud usage.

Infrastructure as Code (IaC) is essential for deploying on cloud platforms.

Terraform is a popular IaC tool, but it requires learning a special language.

Pulumi is an alternative to Terraform, supporting multiple programming languages.

Pulumi allows for declarative infrastructure management with strong typing and IDE support.

Serverless Stack (SST) is an optimized IaC tool for fullstack JavaScript developers.

SST allows defining infrastructure and databases in a single TypeScript file.

Docker and Docker Build Cloud are highlighted for efficient containerization and image building.

LocalStack emulates AWS services locally for offline development and testing.

Cloudcraft is a tool for visually diagramming cloud architecture.

Encore is introduced as a tool that combines IaC with application code for streamlined deployment.

Encore automates devops tasks and integrates infrastructure with application code.

The video concludes with advice on using the right tools to make cloud computing work efficiently.

Transcripts

play00:00

in this video you're going to learn how

play00:01

to make cloud computing great again if

play00:03

you're a software developer that means

play00:05

you're on the Spectrum a spectrum that

play00:07

defines how dependent you are on big

play00:09

cloud platforms like AWS Google cloud

play00:12

and Azure on one end we have the based

play00:14

self Hoster this Dev does a million plus

play00:16

an annual recurring revenue and handles

play00:18

5,000 requests per second with PHP and

play00:20

jQuery on a $5 FreeBSD VPS the thought

play00:24

of proprietary close Source software

play00:26

triggers their gag reflex and they pity

play00:28

the fools paying for Jeff beus yacht

play00:29

when Lambda HTTP request at a time but

play00:32

at the other end of the spectrum we have

play00:34

the SAS Som leer this Dev bought a $200

play00:36

template and now pays $20 a month for

play00:38

website hosting at $50 a month for

play00:40

postgress at $10 a month for a

play00:42

notetaking app and $20,000 for data dog

play00:45

all of which is funded by rewards credit

play00:46

cards instead of customer revenue and

play00:48

they had no idea all the things they

play00:49

were paying for are just rappers of AWS

play00:52

but being on either end of the spectrum

play00:54

is not ideal being two based is timec

play00:56

consuming and error prone and leads to

play00:58

superiority complex but not being based

play01:00

enough allows the AWS rapper industry to

play01:03

enslave you which will make you poor and

play01:04

reduce your te count luckily there is

play01:06

another path a path where you leverage

play01:08

big cloud at optimal efficiency with

play01:10

amazing DX and zero vendor lockin and

play01:12

there are some amazing open source tools

play01:14

that can help us get there but first why

play01:16

do I even need a tool well if you go on

play01:17

big Cloud's website you'll look around

play01:19

for the right tool for the job end up

play01:21

deploying a massive kubernetes cluster

play01:22

you don't need then forget about it and

play01:24

end up homeless if you're deploying on

play01:26

big cloud you should never do this and

play01:27

instead use infrastructure as code there

play01:30

are many tools that can get the job done

play01:31

with one of the most popular options

play01:33

being terraform but it's not open-

play01:34

source and requires its own special

play01:36

language a good alternative is palumi

play01:39

which itself is written in go but allows

play01:41

you to write your code in multiple

play01:43

languages like typescript python go the

play01:45

c or just damel taking a declarative

play01:48

approach like this is not only safer but

play01:50

just far more efficient like in this

play01:52

example here I'm using palumi to create

play01:54

a Google Cloud virtual machine I can

play01:56

Define all the machine settings here

play01:58

like the size and operating system as

play02:00

well as all the network and firewall

play02:01

settings and anything else you can

play02:03

imagine all of which is strongly typed

play02:05

and provides intellisense right here in

play02:06

the IDE now if I want to deploy it I can

play02:08

just do pumi up and it will

play02:10

automatically deploy this stuff to my

play02:12

Google Cloud account and likewise when I

play02:13

want to take it down I can do that with

play02:15

a single command in addition you can use

play02:17

their dashboard to keep track of all

play02:18

your projects and there's a bunch of

play02:20

templates for the most common use cases

play02:22

it's incredibly powerful but if you like

play02:24

palumi and also like typescript a tool

play02:26

you're really going to like is SST which

play02:28

stands for serverless Shen pans and Tom

play02:30

Foolery when I found out it was a rapper

play02:32

of palumi I thought it was just a scam

play02:34

but actually it's the most optimized IAC

play02:36

tool if you're a fullstack JavaScript

play02:38

developer you define all of your

play02:39

infrastructure and databases in a single

play02:42

typescript file and what's cool about it

play02:43

is that they've designed specific

play02:45

components or recipes for all the

play02:47

popular Frameworks like nextjs spel kit

play02:49

angular and so on like if I'm deploying

play02:51

a spel kit app I can define a server and

play02:53

then link other resources to it like an

play02:55

S3 storage bucket and now that all

play02:57

that's in place I can easily reference

play02:58

it in my application code because it's

play03:00

also written in typescript we can then

play03:02

deploy the app with a single command or

play03:04

set up the SST console to deploy on get

play03:06

push and it even works with Frameworks

play03:08

like nextjs which is notorious for

play03:10

trapping developers in a triangle that

play03:11

they can never leave it feels good to

play03:13

get pure uncut product by going directly

play03:15

to the supplier but one of the most

play03:17

powerful techniques to free your app

play03:18

from vendor lockin is containerization

play03:20

with Docker the sponsor of today's video

play03:23

we all use Docker but what you likely

play03:25

don't know about is Docker build Cloud a

play03:27

way to build Docker images way faster

play03:29

both locally and in continuous

play03:31

integration Docker is smart enough to

play03:32

know that when you run the build command

play03:34

it should only rebuild layers that have

play03:35

changed and use the cach for everything

play03:37

else the problem is that that cash only

play03:39

exists on your machine with build Cloud

play03:42

though this cash becomes available to

play03:43

every machine remotely that means if Bob

play03:46

builds an image in Tokyo Alice can take

play03:48

advantage of that cash in Austin

play03:49

instantly but most importantly it fixes

play03:51

the massively annoying bottleneck of

play03:53

waiting for your CI server to hurry up

play03:55

and fail the shared cach can make

play03:57

complex builds 39 times faster which

play04:00

means more developer happiness for

play04:01

individuals and potentially millions of

play04:03

dollars saved for a medium-sized company

play04:05

try out Docker build Cloud for free

play04:07

right now with the link below one thing

play04:09

that sucks about the cloud though is

play04:10

that it's utterly useless without an

play04:12

internet connection or credit card the

play04:13

good news is that there's a tool called

play04:15

local stack which emulates all the major

play04:17

services on AWS from a single container

play04:20

that you can run locally that means you

play04:21

can cat up and test all of your buckets

play04:23

lambdas and Dynamo DBS on a flight and

play04:25

then push them to production the moment

play04:27

you land that's impressive because AWS

play04:29

is a massive collection of stuff you

play04:31

don't need and while local stack doesn't

play04:33

cover everything it does cover a lot of

play04:35

things most importantly though it's a

play04:36

playground where you can over engineer

play04:38

your architecture without any real world

play04:40

consequences what I like to do is first

play04:42

create a diagram of my architecture

play04:44

using a tool like cloudcraft which can

play04:46

visually represent different services in

play04:48

3D and how they connect to one another

play04:50

like I might have an S3 static website

play04:52

which has a form that triggers a Lambda

play04:54

function that uploads to another bucket

play04:56

which triggers a resizer Lambda which

play04:57

triggers the simple notification service

play04:59

to send an email with simple email

play05:01

service but to test out my prototype I

play05:03

can now use the AWS local CLI to create

play05:05

all my lambas and buckets locally but

play05:07

once deployed locally I can then go to

play05:09

the local stack dashboard and manage

play05:11

everything just like it was AWS I can

play05:13

even see my uploaded S3 files right here

play05:15

pretty awesome but I've saved the best

play05:17

for last The Encore of this video is a

play05:19

tool named Encore every developer should

play05:22

know how to use infrastructure as code

play05:23

tools but one drawback is that they're

play05:25

totally decoupled from the code that

play05:27

matters your application code in a

play05:29

perfect world we just build an app click

play05:31

deploy and never worry about it and

play05:33

Encore gets us pretty close to that

play05:35

world it's a tool that can help you

play05:36

provision infrastructure on AWS or

play05:38

Google Cloud but it's also a backend

play05:40

application framework that allows you to

play05:42

write your application code in go or

play05:44

typescript however the infrastructure

play05:46

semantics are built into the application

play05:48

code it can do this because at compile

play05:50

time it creates an application model

play05:52

where all the resources required to run

play05:54

your app are identified where you can

play05:56

then configure and customize them from

play05:58

Encore development dashboard board you

play06:00

get the benefits of IEC but without

play06:01

having to actually write the code and it

play06:03

automates all the other devops work like

play06:05

continuous integration and deployment

play06:07

observability tracing IM management and

play06:10

more it sounds too good to be true so

play06:12

what are the trade-offs the big

play06:13

trade-off is flexibility it assumes your

play06:16

application code is written in

play06:17

typescript or go that you're using a SQL

play06:19

database like RDS and that you adhere to

play06:22

OnCourse framework conventions in some

play06:24

cases it might be better to keep your

play06:25

infrastructure code separate it's

play06:27

opinionated but if you agree to those

play06:28

terms you could save yourself thousands

play06:30

of hours of development time and that

play06:32

concludes my Ted Talk on how to make AWS

play06:34

not suck thanks for watching and I will

play06:36

see you in the next one

Rate This

5.0 / 5 (0 votes)

Etiquetas Relacionadas
Cloud ComputingInfrastructure as CodeVendor Lock-inOpen SourceAWSDockerDevOpsEfficiencySaaSDeveloper Tools
¿Necesitas un resumen en inglés?