Latest / CyberSecurity Summary / Learn Amazon Web Services in a Month of Lunches
Transcript
- 0:00Speaker 1: Right this second, the most powerful computer in the world
- 0:03Speaker 1: isn't actually sitting in some secret government bunker somewhere.
- 0:06Speaker 2: No, not at all.
- 0:07Speaker 1: It's like this massive invisible hive mind that literally spans
- 0:11Speaker 1: the globe. And the wildest part is that you can
- 0:14Speaker 1: rent a piece of it for, you know, about three
- 0:17Speaker 1: cents an hour.
- 0:17Speaker 2: Which is just crazy to think about.
- 0:19Speaker 1: It is. So welcome to today's deep dive. We are
- 0:22Speaker 1: basically tearing down the intimidating buzzwords of... cloud computing. We
- 0:28Speaker 1: want to give you a practical architectural blueprint of how
- 0:31Speaker 1: the modern internet actually runs behind the scenes.
- 0:34Speaker 2: Yeah, and we're using David Clinton's book, Learn Amazon Web
- 0:36Speaker 2: Services in a Month of Lunches, as our roadmap today.
- 0:40Speaker 2: It's super effective at bridging that gap between the abstract
- 0:43Speaker 2: idea of the cloud and the actual concrete reality of
- 0:46Speaker 2: building a functional system.
- 0:48Speaker 1: Because the shun in how we build businesses today is
- 0:51Speaker 1: just staggering. I mean, think about it. If you wanted
- 0:53Speaker 1: to launch a tech startup, like 20 years ago.
- 0:56Speaker 2: Oh, good luck.
- 0:57Speaker 1: Right. You had to secure massive capital up front. You
- 1:00Speaker 1: were basically a real estate and hardware speculator at that point.
- 1:03Speaker 2: Yeah, you had to actually buy physical server racks.
- 1:05Speaker 1: Exactly. And lease specialized facility floor space.
- 1:08Speaker 2: Yeah.
- 1:08Speaker 1: You had to install these like heavy duty HVAC systems
- 1:11Speaker 1: so your machines wouldn't literally melt.
- 1:13Speaker 2: And then the hardest part, you had to guess your capacity.
- 1:16Speaker 1: Oh, yeah.
- 1:16Speaker 2: If you guess too low, your site completely crashes under
- 1:20Speaker 2: the launch day traffic. But if you guess too high,
- 1:24Speaker 2: you just have... hundreds of thousands of dollars of silicon
- 1:27Speaker 2: blinking in the dark doing absolutely nothing.
- 1:30Speaker 1: It was incredibly risky. But today it's all about renting
- 1:34Speaker 1: fractions of a penny of on demand compute power.
- 1:37Speaker 2: Right. The barrier to entry shifted from, you know, huge
- 1:40Speaker 2: capital expenditure to an operational expenditure model. The risk of
- 1:44Speaker 2: guessing capacity is practically gone now.
- 1:46Speaker 1: Which is amazing. Whether you are prepping for a tech
- 1:49Speaker 1: meeting or maybe you're considering a migration for your company,
- 1:52Speaker 1: or you're just insanely curious about how an e-commerce site functions,
- 1:57Speaker 1: this deep dive is going to give you those essential
- 1:59Speaker 1: aha moments.
- 2:00Speaker 2: Without the information overload, hopefully.
- 2:02Speaker 1: Exactly. So before we can actually build a cloud server,
- 2:05Speaker 1: we need to understand the environment we're stepping into. And specifically,
- 2:09Speaker 1: we're talking about Amazon Web Services. or AWS.
- 2:13Speaker 2: Yeah, AWS is just massive. To put it in perspective,
- 2:17Speaker 2: the text points out that by 2016, AWS was already
- 2:20Speaker 2: generating nearly $ 12 billion in revenue.
- 2:23Speaker 1: $ 12 billion?
- 2:24Speaker 2: Yeah.
- 2:24Speaker 1: And that was years ago. So the scale today is, like,
- 2:28Speaker 1: almost incomprehensible.
- 2:30Speaker 2: Totally. There's an old tech adage that goes, no one
- 2:33Speaker 2: ever got fired for choosing IBM.
- 2:36Speaker 1: Right, because it was the safe bet.
- 2:37Speaker 2: Exactly. IBM was so established, it was undeniably the safe choice.
- 2:41Speaker 2: And according to the Gartner research cited in our sources,
- 2:44Speaker 2: AWS has achieved that exact same status today. It's the
- 2:47Speaker 2: massive elephant in the room.
- 2:49Speaker 1: The totally safe choice for virtualization. Okay, so let's unpack
- 2:52Speaker 1: the mechanics of this elephant. Because the cloud makes it
- 2:55Speaker 1: sound like our data is just, you know, magically floating
- 2:57Speaker 1: in the ether.
- 2:58Speaker 2: Yeah, spoiler alert, it's not.
- 3:00Speaker 1: Right. At the end of the day, the cloud is
- 3:02Speaker 1: just someone else's physical computer sitting in a warehouse. So
- 3:06Speaker 1: how exactly does AWS take a warehouse full of hardware...
- 3:11Speaker 1: And securely rented out to millions of different people at
- 3:14Speaker 1: the exact same time.
- 3:16Speaker 2: So the foundational magic here is a technology called virtualization.
- 3:19Speaker 1: Okay.
- 3:20Speaker 2: In the old model we just talked about, you had
- 3:23Speaker 2: one standalone physical server dedicated to one operating system. The
- 3:27Speaker 2: hardware and software were permanently tied together.
- 3:30Speaker 1: Like a one-to-one relationship. Exactly.
- 3:32Speaker 2: AWS completely breaks that link. They start with a bare
- 3:35Speaker 2: metal Linux server. And by bare metal, we mean the
- 3:37Speaker 2: actual physical silicon and circuitry.
- 3:40Speaker 1: Okay, the actual machine.
- 3:41Speaker 2: Right. And on top of that, they run a software
- 3:43Speaker 2: layer called a Xen hypervisor.
- 3:45Speaker 1: Wait, hold on. How does a software layer carve up
- 3:49Speaker 1: physical hardware? If I just have one physical processor, how
- 3:52Speaker 1: do multiple customers use it without constantly colliding into each
- 3:55Speaker 1: other's data?
- 3:56Speaker 2: It's all about how the hypervisor manages requests. It sits
- 3:59Speaker 2: right between the physical hardware and the virtual machines. You
- 4:02Speaker 2: can think of it as this master orchestrator. It intercepts
- 4:06Speaker 2: every single request for processing power, memory, network access, all
- 4:10Speaker 2: of it. And it logically divides that single physical machine
- 4:14Speaker 2: into multiple isolated units.
- 4:16Speaker 1: Which AWS calls EC2 instances, right?
- 4:19Speaker 2: Yes, Elastic Compute Cloud instances. The hypervisor is basically doing
- 4:23Speaker 2: this incredibly complex, high-speed, time-slicing operation.
- 4:28Speaker 1: So wait, is it sort of like taking a massive,
- 4:31Speaker 1: really expensive physical mansion and carving it up into highly
- 4:35Speaker 1: efficient apartment units?
- 4:37Speaker 2: Yeah, that's a pretty good way to look at it.
- 4:38Speaker 1: Like all the tenants share the same building, but they
- 4:40Speaker 1: each have their own locks and none of them even
- 4:42Speaker 1: know the others are there. Or, I mean, almost like
- 4:45Speaker 1: a master chess player playing 50 simultaneous games against 50
- 4:49Speaker 1: different people.
- 4:50Speaker 2: Oh, the chess one is actually perfect because the hardware,
- 4:53Speaker 2: the chess master moves so incredibly fast from board to board.
- 4:56Speaker 2: that every single opponent feels like they have 100% of
- 4:58Speaker 2: the master's attention.
- 4:59Speaker 1: That is wild.
- 5:00Speaker 2: It really is. The individual tenants are completely unaware of
- 5:04Speaker 2: each other. They operate as if they own the entire
- 5:07Speaker 2: physical server. And what's fascinating here is that this decoupling
- 5:11Speaker 2: of software from hardware provides instant scalability.
- 5:15Speaker 1: Because it's all just software files now.
- 5:17Speaker 2: Exactly. Instead of waiting weeks for IT to purchase a
- 5:20Speaker 2: new server, a virtual server can be spun up in
- 5:24Speaker 2: literally minutes.
- 5:25Speaker 1: And destroyed seconds later when the task is done.
- 5:27Speaker 2: Right. You completely eliminate the need to over-provision hardware. You
- 5:31Speaker 2: only pay for the exact seconds your instance was alive.
- 5:34Speaker 1: Okay. So that totally makes sense for the processing power
- 5:36Speaker 1: side of things. But when I spin up this virtual apartment,
- 5:40Speaker 1: essentially what exactly is inside that unit? Because I need
- 5:43Speaker 1: an operating system to run my code.
- 5:45Speaker 2: Right. You need a template. In AWS, that's called an
- 5:48Speaker 2: AMI or Amazon Machine Image. It's the blueprint that defines
- 5:51Speaker 2: your server's operating system.
- 5:53Speaker 1: And the source materials is this crazy statistic. Over 92%
- 5:57Speaker 1: of all EC2 instances run some flavor of Linux, like Ubuntu.
- 6:02Speaker 2: Oh, yeah. Windows is available, obviously. But Linux absolutely dominates
- 6:06Speaker 2: the infrastructure of the Internet. It's the undisputed baseline.
- 6:09Speaker 1: Okay, so we've got our Linux template. But an operating
- 6:12Speaker 1: system needs a hard drive to live on.
- 6:14Speaker 2: True. And this brings us to a major architectural philosophy
- 6:18Speaker 2: of AWS. They don't just hand you one massive hard drive.
- 6:21Speaker 2: They actually split storage into two completely distinct services.
- 6:25Speaker 1: Right, EBS and S3.
- 6:27Speaker 2: Exactly. EBS is Elastic Block Store, and S3 is the
- 6:31Speaker 2: Simple Storage Service.
- 6:32Speaker 1: Okay, here's where it gets really interesting and where I
- 6:34Speaker 1: want to push back a little.
- 6:35Speaker 2: Sure.
- 6:36Speaker 1: Because if an EBS volume acts just like my LAPCOP
- 6:39Speaker 1: standard hard drive attached right to my virtual server, why
- 6:43Speaker 1: wouldn't I just dump all my data there? Like my
- 6:45Speaker 1: application code, user images, database backups, all of it. Why
- 6:49Speaker 1: complicate things by introducing a completely separate service like S3?
- 6:53Speaker 2: If we connect this to the bigger picture, it really
- 6:55Speaker 2: comes down to cost and efficiency dynamics. EBS is block storage,
- 7:00Speaker 2: meaning it breaks data down into raw, unformatted chunks.
- 7:04Speaker 1: Right.
- 7:04Speaker 2: Which allows for ultra-fast, really complex read and write operations.
- 7:09Speaker 2: If you need to dive into a massive database and
- 7:12Speaker 2: change one single address... Block storage lets you alter just
- 7:16Speaker 2: that specific block without touching the rest of the data.
- 7:19Speaker 1: Which requires a lot of underlying performance.
- 7:21Speaker 2: Right.
- 7:21Speaker 1: So I'm guessing EBS is pretty expensive per gigabyte.
- 7:24Speaker 2: Highly expensive. Which is exactly why the default Linux server
- 7:28Speaker 2: in our deep dive text only requires an 8 gigabyte
- 7:31Speaker 2: EBS drive.
- 7:32Speaker 1: Oh, wow. 8 gigs is tiny.
- 7:34Speaker 2: Right. But it's just enough for the operating system and
- 7:37Speaker 2: the core application code. If you tried to store terabytes of, say,
- 7:41Speaker 2: user-uploaded videos on an EBS volume... Your monthly bill would
- 7:45Speaker 2: just be astronomical.
- 7:47Speaker 1: So that's where S3 comes in. What makes S3 so
- 7:49Speaker 1: much cheaper?
- 7:50Speaker 2: S3 uses object storage instead of block storage. It bundles
- 7:54Speaker 2: data into a single discrete object with metadata and stores
- 7:57Speaker 2: it in a flat bucket. It's infinitely scalable and super cheap,
- 8:00Speaker 2: but it operates differently.
- 8:02Speaker 1: How so?
- 8:02Speaker 2: Well, if you want to change a database entry on S3,
- 8:04Speaker 2: you can't just edit a tiny block. You have to
- 8:06Speaker 2: rewrite the entire object.
- 8:08Speaker 1: Ah, okay. So it's terrible for an actively running database.
- 8:11Speaker 2: Exactly. But it's perfect for writing once and reading many times.
- 8:14Speaker 2: system backups, heavy video files, static images. It forces you
- 8:19Speaker 2: to design a more modular, cost-effective system than you ever
- 8:23Speaker 2: would on a home PC.
- 8:24Speaker 1: It's almost like having your RAM right at your desk
- 8:26Speaker 1: for immediate calculations. That's EBS. But across town, you have
- 8:31Speaker 1: access to this massive, permanent library where retrieval takes a
- 8:35Speaker 1: millisecond longer, but the storage space is practically free. That's S3.
- 8:39Speaker 2: That's a great way to put it. And if your
- 8:41Speaker 2: virtual saver ever gets corrupted... your vast library on S3
- 8:45Speaker 2: is totally untouched. You just spin up a new instance,
- 8:48Speaker 2: attach a fresh EBS drive, and point it back at
- 8:50Speaker 2: your S3 bucket.
- 8:52Speaker 1: I love that. OK, so we have our virtual server
- 8:54Speaker 1: built and our storage mapped out. But putting a server
- 8:57Speaker 1: directly on the open internet without protection is basically a
- 8:59Speaker 1: recipe for disaster.
- 9:01Speaker 2: Oh, it would be hammered by malicious bots in seconds.
- 9:03Speaker 1: Right. So how do we build walls around our new infrastructure?
- 9:06Speaker 2: We use a VPC, or virtual private cloud. Think of
- 9:09Speaker 2: it as this overarching network boundary It isolates all your
- 9:13Speaker 2: resources from the rest of Amazon's massive data center.
- 9:16Speaker 1: It's like the gated community.
- 9:17Speaker 2: Exactly. And inside that VPC, you can create subnets, public
- 9:22Speaker 2: subnets that touch the internet and private subnets that are
- 9:25Speaker 2: completely invisible to the outside world.
- 9:27Speaker 1: Where you'd hide your sensitive databases, right?
- 9:29Speaker 2: Spot on. But even for the web server in the
- 9:32Speaker 2: public subnet, we need to control the actual movement of data.
- 9:36Speaker 2: That's where security groups come in. They act as virtual
- 9:39Speaker 2: firewalls at the instance level.
- 9:41Speaker 1: OK, so the VPC is the gated community and the
- 9:43Speaker 1: security group is like the bouncer at the club door
- 9:46Speaker 1: checking IDs. Yes.
- 9:48Speaker 2: And they inspect traffic based on specific port numbers. Right.
- 9:51Speaker 1: Let's dive into the specific rules, the source details, because
- 9:55Speaker 1: this gets fascinating. If I'm running a website, I obviously
- 9:58Speaker 1: need anyone in the world to be able to see it.
- 10:00Speaker 2: Right. So you open port 80 for HTTP traffic.
- 10:03Speaker 1: And you set the source IP address to 0.0.0000. Now
- 10:07Speaker 1: that literally looks like a glitch in the matrix to me.
- 10:10Speaker 1: What does that actually mean?
- 10:11Speaker 2: It's called CIDR notation. Without getting bogged down in the
- 10:14Speaker 2: crazy math of it all, it basically translates to any
- 10:17Speaker 2: IP address from anywhere on the planet.
- 10:20Speaker 1: So it's global wildcard pass.
- 10:22Speaker 2: Exactly. It lets all web traffic through to your site.
- 10:25Speaker 1: But then there's port 22, which is for SSH or
- 10:28Speaker 1: secure shell. That's what I use to remotely manage the
- 10:31Speaker 1: Linux server, right? Right.
- 10:32Speaker 2: And you heavily restrict port 22. If you open that
- 10:35Speaker 2: to 0.0.0.0, you're basically inviting every hacker on earth to
- 10:42Speaker 2: attack your system.
- 10:43Speaker 1: So what do you do instead?
- 10:45Speaker 2: You configure the security group rule so it only accepts
- 10:47Speaker 2: connections from your specific personal home IP address. If anyone
- 10:51Speaker 2: else tries to connect, the bouncer just silently drops the
- 10:53Speaker 2: data packets.
- 10:54Speaker 1: The server doesn't even acknowledge they exist.
- 10:56Speaker 2: Exactly.
- 10:57Speaker 1: But wait, what about passwords? The bouncer checked my IP,
- 10:59Speaker 1: but how do I actually log in?
- 11:01Speaker 2: AWS doesn't use passwords for Linux by default. They rely
- 11:04Speaker 2: on cryptographic key pairs. It's an unforgeable text file, usually
- 11:08Speaker 2: ending in. pem, that acts as your ultimate VIP pass.
- 11:11Speaker 1: Okay, this is where I start sweating a little bit
- 11:13Speaker 1: as a user.
- 11:14Speaker 2: Okay.
- 11:14Speaker 1: Because what happens if I accidentally delete my private. pim
- 11:17Speaker 1: key file on my home laptop? Or my hard drive
- 11:19Speaker 1: just dies? I can just call Amazon to reset it, righter?
- 11:22Speaker 2: No!
- 11:23Speaker 1: You cannot.
- 11:24Speaker 2: Wait, really? If you lose the key, it's gone. You
- 11:26Speaker 2: lose access to that server forever.
- 11:28Speaker 1: Forever. That feels, I don't know, almost reckless on their part.
- 11:32Speaker 1: Why wouldn't they keep a backup?
- 11:33Speaker 2: This actually raises an important question about the shared responsibility
- 11:36Speaker 2: model of the cloud.
- 11:37Speaker 1: Okay, what's that?
- 11:38Speaker 2: AWS provides military-grade security of the cloud, the physical data centers,
- 11:42Speaker 2: the hypervisors, all of that. but you hold the ultimate
- 11:45Speaker 2: responsibility for security in the cloud.
- 11:48Speaker 1: So access management falls squarely on my shoulders.
- 11:51Speaker 2: Exactly. If AWS kept a copy of your private key,
- 11:55Speaker 2: it would introduce a systemic vulnerability. By mathematically guaranteeing they
- 11:59Speaker 2: can't access your instance, they're keeping it perfectly secure. Treating
- 12:03Speaker 2: that key with extreme care is just the operational price
- 12:06Speaker 2: you paid for absolute control.
- 12:08Speaker 1: Wow. Okay, so our server is built, stored, and perfectly secured.
- 12:13Speaker 1: But let's say launch day arrives. The horde of users
- 12:16Speaker 1: finally shows up. How do we know if our virtual
- 12:18Speaker 1: machine is about to just collapse under the weight of
- 12:21Speaker 1: the traffic?
- 12:21Speaker 2: Well, we have to look at how AWS measures capacity.
- 12:24Speaker 2: Processing power is measured in vCPUs, virtual central processing units.
- 12:29Speaker 1: And the deep dive text mentions one vCPU is roughly
- 12:32Speaker 1: equivalent to like a 2007 era physical processor.
- 12:36Speaker 2: Right. And these instances come in specific families tailored for
- 12:40Speaker 2: different needs, like the T family. The book uses the T2. micro,
- 12:45Speaker 2: which is meant for general-purpose workloads that sit idle but
- 12:49Speaker 2: need sudden bursts of power.
- 12:50Speaker 1: Okay, so if I'm building a simple WordPress site using
- 12:53Speaker 1: what they call the OLAMP stack, right? Linux, Apache, MySQL, PHP.
- 12:58Speaker 2: The classic setup.
- 12:59Speaker 1: Is knowing when to upgrade my server just a guessing game?
- 13:03Speaker 1: Or is there a definitive gauge?
- 13:04Speaker 2: There is a gauge. It's an essential Linux diagnostic tool
- 13:07Speaker 2: called the top command.
- 13:08Speaker 1: Ah, right. So when you run top, what are you
- 13:10Speaker 1: actually looking for?
- 13:11Speaker 2: You're monitoring your percent CPU and percent memory. When the
- 13:14Speaker 2: server is quiet, it idles at nearly 0% usage. But
- 13:18Speaker 2: the second someone loads a web page, you'll see active spikes.
- 13:21Speaker 1: Because Apache, the web server, has to wake up.
- 13:23Speaker 2: Exactly. And MySQL spins up to grab the database content.
- 13:27Speaker 2: Simulating traffic and watching the top command is the best
- 13:29Speaker 2: way to find your exact breaking point.
- 13:31Speaker 1: But if I do hit 100% CPU and my server
- 13:34Speaker 1: starts choking, isn't that a crisis?
- 13:37Speaker 2: In the old physical hardware days, absolutely. But because of
- 13:40Speaker 2: cloud elasticity, a choking server isn't a permanent hardware crisis anymore.
- 13:45Speaker 2: It is just a temporary metric.
- 13:47Speaker 1: Meaning I just need a slightly larger instance type.
- 13:49Speaker 2: Precisely. You stop the instance, change the metadata to a
- 13:53Speaker 2: larger size, say from a micro to a medium, and
- 13:56Speaker 2: start it back up. The hypervisor reallocates you to a
- 14:00Speaker 2: bigger slice of hardware in minutes.
- 14:02Speaker 1: That is just incredible, the sheer flexibility of it all.
- 14:05Speaker 1: It really is. So to recap our journey today, We've
- 14:09Speaker 1: gone from these abstract buzzwords to really understanding the concrete
- 14:13Speaker 1: architecture of an AWS web server.
- 14:15Speaker 2: We've covered a lot.
- 14:16Speaker 1: We really have. From the Evzen hypervisors time slicing the
- 14:19Speaker 1: bare metal to configuring the VPC gated communities, managing EDS
- 14:24Speaker 1: and S3 storage. And locking it all down with security
- 14:27Speaker 1: groups and unforgeable keys.
- 14:29Speaker 2: And this foundational knowledge applies whether you're migrating a massive
- 14:31Speaker 2: enterprise database or just tinkering with a free tier website
- 14:35Speaker 2: on a Sunday afternoon.
- 14:36Speaker 1: It's the exact same physics underneath it all. But before
- 14:38Speaker 1: we leave you today, I want to bring up one final,
- 14:40Speaker 1: somewhat provocative thought to mull over.
- 14:42Speaker 2: Oh, right. The catch.
- 14:44Speaker 1: The catch. The text explicitly mentions that old joke about
- 14:48Speaker 1: AWS being the safe choice, the new IBM. But it
- 14:51Speaker 1: also warns of a very specific whisk, vendor lock-in.
- 14:55Speaker 2: Yeah, that's also the dark side of all this convenience.
- 14:58Speaker 1: Right. If you build an incredible, highly customized infrastructure that
- 15:03Speaker 1: relies intimately on uniquely AWS technologies, like specific Amazon machine images,
- 15:09Speaker 1: their proprietary database tools, or complex VPC routings, you might
- 15:14Speaker 1: become practically unable to ever move your resources elsewhere.
- 15:17Speaker 2: Your code becomes fundamentally intertwined with their ecosystem.
- 15:20Speaker 1: Exactly. So as you design your own projects going forward,
- 15:23Speaker 1: we want you to consider this. Is true cloud independence
- 15:27Speaker 1: even possible anymore? Or is locking yourself into a single
- 15:31Speaker 1: mega vendor just the invisible price we now have to
- 15:33Speaker 1: pay to avoid buying physical hardware?
- 15:35Speaker 2: That's a tough question for sure.
- 15:36Speaker 1: It really is. Something to explore on your own. But
- 15:39Speaker 1: that is all for today's Deep Dive. Thanks so much
- 15:41Speaker 1: for joining us, and we will catch you next time.