<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ayo</title>
    <description>The latest articles on DEV Community by Ayo (@meshclan1).</description>
    <link>https://dev.to/meshclan1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1158538%2Ff1abff76-9a55-45aa-9db5-2817aa457a11.jpeg</url>
      <title>DEV Community: Ayo</title>
      <link>https://dev.to/meshclan1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/meshclan1"/>
    <language>en</language>
    <item>
      <title>Beginner's AWS Guide: Containers and Infrastructure as Code (Part 8)</title>
      <dc:creator>Ayo</dc:creator>
      <pubDate>Fri, 08 Aug 2025 16:54:12 +0000</pubDate>
      <link>https://dev.to/meshclan1/beginners-aws-guide-containers-and-infrastructure-as-code-part-8-1d19</link>
      <guid>https://dev.to/meshclan1/beginners-aws-guide-containers-and-infrastructure-as-code-part-8-1d19</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;Objective:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;This section explores &lt;strong&gt;containerisation&lt;/strong&gt; and &lt;strong&gt;Infrastructure as Code (IaC)&lt;/strong&gt; in AWS. We delve into Docker containers and how they solve deployment challenges, along with AWS ECS. We also examine the IaC service &lt;code&gt;CloudFormation&lt;/code&gt; as a means for automating and managing cloud infrastructure through code rather than manual configuration!&lt;/p&gt;




&lt;h2&gt;
  
  
  Key IT Terminology: Containerisation 📦
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Containerisation&lt;/code&gt; is like filling an isolated box with everything an application needs to run — instructions, tools, and supplies.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Once sealed, this box can be:&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Shipped to any environment (local, test, production).&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Duplicated to make identical containers.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Opened/ran anywhere with consistent behaviour — eliminating the “it only works on my machine” problem!&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F28sz2kft0a4bwmecn891.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F28sz2kft0a4bwmecn891.png" alt="Image highlighting containerization architecture" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image sourced from: &lt;a href="https://www.xenonstack.com/insights/containerization" rel="noopener noreferrer"&gt;https://www.xenonstack.com/insights/containerization&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Key IT Terminology: Docker 🐳
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Docker&lt;/code&gt; is a popular containerisation platform as it helps us package an app and everything it needs to run on any system — not just the one it was built on.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;When packaging an app with Docker, we typically include:&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;application code&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Dependencies&lt;/code&gt; (supporting libraries, frameworks, packages)&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;runtime version&lt;/code&gt; (e.g. Node.js, Python, Java)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;System files&lt;/code&gt;, like environment variables and config files (setup blueprints)&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;minimal OS layer&lt;/code&gt;, e.g. Linux or Windows (not the full OS, just what is needed)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Docker Hierarchy&lt;/strong&gt;: Containers are built in layers&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dockerfile&lt;/strong&gt; – A script with step-by-step instructions on what to put inside our box (our packing list).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Docker Image&lt;/strong&gt; – A snapshot built from the Dockerfile (the sealed box). We can store images in registries like &lt;code&gt;DockerHub&lt;/code&gt; or &lt;code&gt;Amazon ECR&lt;/code&gt; to reuse them later.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Container&lt;/strong&gt; – A running instance of that image (the opened box in action). We can run many containers from the same image!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiky8jypdikqj2wl8rv2t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiky8jypdikqj2wl8rv2t.png" alt="Image showing the process of building a docker image, repositories to host our image, and running an instance of an image as a container" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ECS: Elastic Container Service 📦
&lt;/h2&gt;

&lt;p&gt;Amazon ECS is a &lt;code&gt;container orchestration service&lt;/code&gt; which helps us to deploy, manage, and scale Docker containers across AWS infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;We can run containers on two types of infrastructure:&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;EC2 launch type&lt;/code&gt; – We manage the server instances.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Fargate launch type&lt;/code&gt; – AWS manages the servers (serverless approach!).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0yhk9l1lp2ammkffo1zz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0yhk9l1lp2ammkffo1zz.png" alt="Image highlighting ECS core components: clusters, task definitions, tasks, services" width="800" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: ECS Task Definition (EC2 launch type)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"family"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"simple-web-app"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"containerDefinitions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"web"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"image"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"nginx:latest"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Docker&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;image&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;container&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"cpu"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;256&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;                        &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;CPU&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;units&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"memory"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;512&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;                     &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Memory&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;MB&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"portMappings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;                  &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Port&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;mapping&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;network&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;configuration&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"containerPort"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Port&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;inside&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;container&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"hostPort"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="w"&gt;                 &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Port&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;ECS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;host&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"environment"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;                   &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Environment&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;variables&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ENV"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="nl"&gt;"value"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"production"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"essential"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Marks&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;container&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;essential&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;task&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"requiresCompatibilities"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"EC2"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Compatible&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;EC&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;launch&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;type&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"cpu"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"256"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;                          &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Total&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;CPU&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;task&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"memory"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"512"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;                       &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Total&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;memory&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;task&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"taskRoleArn"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"arn:aws:iam::123456789012:role/myTaskRole"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkz58cl07yx58iocvhi61.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkz58cl07yx58iocvhi61.png" alt="Image highlighting CPU/memory allocation for container images in task definitions" width="800" height="644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;EKS (Elastic Kubernetes Service) is another AWS orchestration tool — more advanced and Kubernetes-based.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  CloudFormation: Infrastructure as Code (IaC) 🏗️
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;CloudFormation&lt;/code&gt; lets us write templates that define our desired AWS infrastructure using code rather than clicking through the AWS Console.&lt;/p&gt;

&lt;p&gt;Templates are written in JSON or YAML (YAML is preferred), and can describe entire AWS environments, including EC2 instances, VPCs, databases, security groups, and their relationships.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;CloudFormation Advantages:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64woszx1fa3oc00f4vwr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64woszx1fa3oc00f4vwr.png" alt="Image highlighting the benefits of AWS CloudFormation including; IaC, cost management, &amp;amp; productivity" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CloudFormation Hierarchy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv2h75g52v9zr2b7o1n95.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv2h75g52v9zr2b7o1n95.png" alt="CloudFormation Hierarchy explanation including; Templates, Stacks, StackSets" width="800" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;One template can lead to many different stacks depending on the input parameters and conditions we set in our JSON/YAML file!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh70276a6ukodj2fnv2tu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh70276a6ukodj2fnv2tu.png" alt="Image noting how we upload and reference our templates using CloudFormation" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  CloudFormation: Template Components Overview
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnacd9xjb2i2t98yk0jb7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnacd9xjb2i2t98yk0jb7.png" alt="Table highlighting CloudFormation template sections and their purpose: AWSTemplateFormatVersion, Description, Resources, Parameters, Mappings, Conditions, Outputs" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxd2ixr3bogwbllc4q592.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxd2ixr3bogwbllc4q592.png" alt="Image highlighting the execution of Mapping in CloudFormation" width="800" height="642"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;IaC Example: S3 Bucket&lt;/u&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;
&lt;span class="na"&gt;AWSTemplateFormatVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;2024-09-09'&lt;/span&gt;
&lt;span class="na"&gt;Description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Simple S3 bucket for storing application data&lt;/span&gt;

&lt;span class="na"&gt;Parameters&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;BucketName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;String&lt;/span&gt;
    &lt;span class="na"&gt;Description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;The name of the S3 bucket to create&lt;/span&gt;
    &lt;span class="na"&gt;Default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;my-simple-app-bucket&lt;/span&gt;

&lt;span class="na"&gt;Resources&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;MyS3Bucket&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;AWS::S3::Bucket&lt;/span&gt;
    &lt;span class="na"&gt;Properties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;BucketName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;!Ref&lt;/span&gt; &lt;span class="s"&gt;BucketName&lt;/span&gt;
      &lt;span class="na"&gt;VersioningConfiguration&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;Status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Enabled&lt;/span&gt;
      &lt;span class="na"&gt;PublicAccessBlockConfiguration&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;BlockPublicAcls&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
        &lt;span class="na"&gt;BlockPublicPolicy&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
        &lt;span class="na"&gt;IgnorePublicAcls&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
        &lt;span class="na"&gt;RestrictPublicBuckets&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;span class="na"&gt;Outputs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;S3BucketName&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Name of the created S3 bucket&lt;/span&gt;
    &lt;span class="na"&gt;Value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;!Ref&lt;/span&gt; &lt;span class="s"&gt;MyS3Bucket&lt;/span&gt;

  &lt;span class="na"&gt;S3BucketArn&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;Description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ARN of the created S3 bucket&lt;/span&gt;
    &lt;span class="na"&gt;Value&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;!GetAtt&lt;/span&gt; &lt;span class="s"&gt;MyS3Bucket.Arn&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;em&gt;🎯 TL;DR&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Docker packages our app and everything it needs into portable containers.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ECS orchestrates and manages our Docker containers across AWS infrastructure.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CloudFormation templates define our infrastructure as code for consistency and repeatability, while stacks are running instances of our templates.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;✨ &lt;em&gt;This is part of a mini-series where I delve into everything cloud-related. Check out my other posts for further learning!&lt;/em&gt; ✨&lt;/p&gt;

</description>
      <category>aws</category>
      <category>programming</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>Beginner's AWS Guide: Serverless and Modern Computing (Part 7)</title>
      <dc:creator>Ayo</dc:creator>
      <pubDate>Fri, 08 Aug 2025 16:54:08 +0000</pubDate>
      <link>https://dev.to/meshclan1/beginners-aws-guide-serverless-and-modern-computing-part-7-53lp</link>
      <guid>https://dev.to/meshclan1/beginners-aws-guide-serverless-and-modern-computing-part-7-53lp</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;Objective:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;This section explores &lt;strong&gt;serverless architecture&lt;/strong&gt; in AWS. We delve into its meaning and the associated services available in AWS, including &lt;strong&gt;Lambda&lt;/strong&gt; (serverless functions) and &lt;strong&gt;API Gateway&lt;/strong&gt; (serverless APIs) as means for building modern, cost-effective applications in the cloud.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key IT Terminology: Serverless 🧠
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Serverless&lt;/code&gt; doesn't mean "no servers" — it just means we don’t manage them. AWS handles all the infrastructure provisioning, scaling, and maintenance of servers behind the scenes. We just focus on writing code or storing data!&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Serverless Examples:&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;DynamoDB&lt;/code&gt; – Fully managed NoSQL database&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;AWS Lambda&lt;/code&gt; – Run functions without managing servers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;API Gateway&lt;/code&gt; – Expose APIs to the internet without managing servers&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Here's an AWS Serverless overview, if you would like to dive deeper: &lt;a href="https://aws.amazon.com/serverless/" rel="noopener noreferrer"&gt;https://aws.amazon.com/serverless/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  AWS Lambda 🔁
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;AWS Lambda&lt;/code&gt; lets us run code in response to events — without provisioning or managing servers. It supports various languages, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node.js (JavaScript)&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Java&lt;/li&gt;
&lt;li&gt;C#&lt;/li&gt;
&lt;li&gt;Ruby&lt;/li&gt;
&lt;li&gt;Custom Runtime APIs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How Lambda works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We upload our code (as a function), and Lambda runs it automatically when triggered by an event (e.g. file upload, API request, database update).&lt;/p&gt;

&lt;p&gt;&lt;u&gt;With Lambda, we only pay for:&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Number of invocations&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Execution duration × memory allocated&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It is still a server at the end of the day that requires CPU and memory to work efficiently!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For example, let’s say we upload images to an S3 bucket. A Lambda function can automatically resize those images and save them to another bucket — all without a single server setup.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="c1"&gt;// Sample Node.js Lambda function with Sharp and S3&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AWS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;aws-sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sharp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sharp&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;s3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;AWS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;S3&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;bucket&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Records&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;s3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;bucket&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Records&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;s3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;original&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;s3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getObject&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;Bucket&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;bucket&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;Key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;promise&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;resizedBuffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;sharp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;original&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;jpeg&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;quality&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toBuffer&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;newKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`resized/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\.[^/&lt;/span&gt;&lt;span class="sr"&gt;.&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+$/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;-resized.jpg`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;s3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;putObject&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;Bucket&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;my-resized-images-bucket&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;Key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;newKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;Body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;resizedBuffer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;ContentType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;image/jpeg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nf"&gt;promise&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;statusCode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Resized successfully!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;original&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;resized&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;newKey&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Uploading code to Lambda&lt;/strong&gt; - &lt;em&gt;3 Options depending on Complexity&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;(1) &lt;code&gt;Inline Editor&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We can directly write or paste code into the inline editor on the console. This approach is best for small/test functions.&lt;/p&gt;

&lt;p&gt;(2) &lt;code&gt;Upload .zip file&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We can write code locally in an IDE and compress it into a .zip file (up to 50MB), which we then upload via the AWS console or CLI.&lt;/p&gt;

&lt;p&gt;(3) &lt;code&gt;From S3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For larger codebases (&amp;gt;50MB compressed, up to 250MB uncompressed) or CI/CD pipelines, we upload our .zip file to an S3 bucket. Lambda then retrieves and deploys the code directly from S3.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Concurrency: What If Multiple Events Trigger Lambda?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lambda has what we call &lt;code&gt;concurrency&lt;/code&gt; - it automatically scales, creating multiple instances of our function to handle simultaneous requests.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 event → 1 function instance&lt;/li&gt;
&lt;li&gt;1000 events → 1000 isolated instances run in parallel&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each event gets its own container, so processing is isolated and doesn’t block others.&lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;For example, if 1000 users uploaded photos simultaneously to our S3 bucket, Lambda automatically spins up 1000 separate instances of our resize function - each processing one image.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftftzb1tcvj6gyj6xhixl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftftzb1tcvj6gyj6xhixl.png" alt="Image describing Lambda concurrency and throttling procedures to handle events" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  AWS API Gateway 🚪
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;API Gateway&lt;/code&gt; is a serverless service for building, publishing, and managing REST/HTTP API endpoints. It basically acts as the solitary front door for applications to access data or services.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Analogy: Hospital Reception&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reception Desk = API Gateway&lt;/li&gt;
&lt;li&gt;Patients = Make API requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Each department = An endpoint&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;/emergency → A&amp;amp;E&lt;/em&gt;&lt;br&gt;
&lt;em&gt;/results → Lab reports&lt;/em&gt;&lt;br&gt;
&lt;em&gt;/appointments → Booking system&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;API Gateway routes traffic, handles authentication, enforces rate limits, and provides monitoring — all without server management.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr44tnyx9qxkgaq3evkx6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr44tnyx9qxkgaq3evkx6.png" alt="Image highlighting API Gateway architecture" width="800" height="439"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Do We Pay For?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Even though API Gateway is serverless, we pay for the infrastructure AWS handles behind the scenes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Requests (number of API calls)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Data Transfer&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Caching (if enabled)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Custom domain usage&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;💡 &lt;em&gt;Just like paying reception staff to direct patients efficiently, we pay for API Gateway to route and process traffic.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzaaei224lt1rdfwi2yxn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzaaei224lt1rdfwi2yxn.png" alt="Image highlighting API gateway architecture and its ability to host API endpoints for different applications and resources" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0s2olea61o0wtt9k7mdu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0s2olea61o0wtt9k7mdu.png" alt="Table explaining the top 5 benefits of API Gateway, including: Centralised API Management, Rate Limiting &amp;amp; Throttling, Caching, Custom Domain Names, Built-in Security" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;🎯 TL;DR&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Serverless means AWS manages the servers for us - we just focus on our code.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lambda runs our code as functions when triggered by events - we only pay when it runs.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;API Gateway creates and manages our API endpoints without server management.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;✨ &lt;em&gt;This is part of a mini-series where I delve into everything cloud-related. Check out my other posts for further learning!&lt;/em&gt; ✨&lt;/p&gt;

</description>
      <category>aws</category>
      <category>programming</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>Beginner's AWS Guide: IAM and Security Fundamentals (Part 6)</title>
      <dc:creator>Ayo</dc:creator>
      <pubDate>Fri, 08 Aug 2025 16:54:04 +0000</pubDate>
      <link>https://dev.to/meshclan1/beginners-aws-guide-iam-and-security-fundamentals-part-6-2j1a</link>
      <guid>https://dev.to/meshclan1/beginners-aws-guide-iam-and-security-fundamentals-part-6-2j1a</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;Objective:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;This section looks into IAM and security fundamentals in AWS. We cover the role of &lt;strong&gt;IAM&lt;/strong&gt; in controlling user access to AWS resources and monitoring AWS activity with services including &lt;strong&gt;CloudWatch&lt;/strong&gt; and &lt;strong&gt;CloudTrail&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  IAM: Identity &amp;amp; Access Management 👤
&lt;/h2&gt;

&lt;p&gt;IAM is AWS’s &lt;code&gt;security layer&lt;/code&gt; for managing who can access what in our cloud account, and how they can do it. It fundamentally looks at &lt;code&gt;Authentication&lt;/code&gt; (who are you?) and &lt;code&gt;Authorisation&lt;/code&gt; (what can you do?).&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Principals&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;(1) &lt;strong&gt;Root User&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When we first create an AWS account, we get a &lt;code&gt;Root User&lt;/code&gt; - the account owner with full access to everything. This account should only be used for tasks including: setting up billing, emergency access, or creating initial IAM users or Identity Center setup.&lt;/p&gt;

&lt;p&gt;(2) &lt;strong&gt;IAM Users&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;IAM Users&lt;/code&gt; are identities with permanent credentials (username/password or access keys) that can be grouped into &lt;code&gt;IAM Groups&lt;/code&gt; for permission inheritance. We commonly use it for programmatic access (e.g., an application needing AWS SDK credentials).&lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;IAM Identity Center (formerly AWS SSO) is the preferred way to create and manage human access across multiple accounts using federated login.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpttr2zis5n0l8jdjen25.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpttr2zis5n0l8jdjen25.png" alt="Image highlighting the connected structure of Root Accounts and IAM users" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw46c1k7tj1rayuelr8on.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw46c1k7tj1rayuelr8on.png" alt="Image highlighting Identity Centre operations and setting user account permissions" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(3) &lt;strong&gt;IAM Roles&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;IAM Roles&lt;/code&gt; provide temporary credentials and are assumed by users or services that need specific, time-limited access.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Roles are used for:&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;AWS Services (e.g. EC2 instance accessing S3)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Cross-account access&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Temporary user access (e.g., external contractors or federated identities)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0zzovp20b4bw1tetuzn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0zzovp20b4bw1tetuzn.png" alt="Image highlighting how IAM roles operate in AWS" width="800" height="646"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  IAM: Authentication 👤
&lt;/h3&gt;

&lt;p&gt;If we have an IAM user account, there are three primary ways to connect and interact with AWS services and resources:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw0tld0vxl2lznnhfjnwl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw0tld0vxl2lznnhfjnwl.png" alt="Table highlighting the different authentication protocols: interactive, programmatic, either" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00lodzfhr9fmju02eap9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F00lodzfhr9fmju02eap9.png" alt="Image highlighting the different methods of authentication in AWS" width="800" height="549"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  IAM: Authorisation 👤
&lt;/h3&gt;

&lt;p&gt;Once a principal (user, role, etc.) has been authenticated, we control what they can do using &lt;code&gt;policies&lt;/code&gt; and &lt;code&gt;permission boundaries&lt;/code&gt;. These define what AWS actions and resources the principal can access.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Here are the main types of authorisation mechanisms:&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Inline Policies&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They are attached directly to a specific user, group, or role, and are best used for one-off or tightly scoped permissions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Resource-Based Policies&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They are attached to AWS resources like S3 buckets, SNS topics, or Lambda functions to define which principals can access the resource and what actions they can take.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Managed Policies (AWS or Customer-Managed)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reusable policies created and maintained either by us or AWS. They make it easier to apply policies consistently across multiple users or roles.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Permissions Boundaries&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They set the maximum permissions a user or role can have, even if other policy types grant more.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Service Control Policies (SCPs)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They only apply within &lt;code&gt;AWS Organisations&lt;/code&gt;. SCPs define the maximum allowed permissions across all accounts in an organisation or organisational unit (OU)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image sourced from: &lt;a href="https://www.tecracer.com/blog/2022/03/using-permission-boundaries-to-balance-security-and-developer-productivity.html" rel="noopener noreferrer"&gt;https://www.tecracer.com/blog/2022/03/using-permission-boundaries-to-balance-security-and-developer-productivity.html&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsjrb5d3cy2ae0cufssfs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsjrb5d3cy2ae0cufssfs.png" alt="Venn-diagram showing scope of the different authorisation mechanisms in AWS" width="800" height="650"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxjrzuvsemctwmtiqv34d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxjrzuvsemctwmtiqv34d.png" alt="Image highlighting the authorisation strategies available in AWS and how we apply them to principals" width="800" height="597"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxfbmyakv7otppfixoop8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxfbmyakv7otppfixoop8.png" alt="Image highlighting the structural breakdown of an IAM policy document" width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  CloudWatch (Monitoring) 🔎
&lt;/h2&gt;

&lt;p&gt;Many AWS services automatically send metrics to &lt;code&gt;CloudWatch&lt;/code&gt; at regular intervals (typically every 1 or 5 minutes, depending on the service and plan). &lt;/p&gt;

&lt;p&gt;It's essentially a system that tracks, collects, and responds to resource performance and operational data.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;CloudWatch Metrics&lt;/code&gt; → Performance numbers that appear on a dashboard (CPU usage, storage space, request count, etc.)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CloudWatch Logs&lt;/code&gt; → Detailed text records that document every message from a resource, e.g. timestamp, log group, etc&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CloudWatch Alarms&lt;/code&gt; → Notifications when thresholds are breached (email me when CPU &amp;gt; 80%)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CloudWatch Events&lt;/code&gt; (EventBridge) → Automating responses (e.g. restarting a server when an alarm triggers)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each resource type typically sends its own specific set of metrics, for example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;EC2 specifically sends CPU utilisation, network traffic&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;S3 sends request counts, storage usage&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Custom applications will send their own metrics manually via a CLI or SDK (for apps or on-prem monitoring).&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;Metric Structure Example:&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Metric Name&lt;/strong&gt; → CPUUtilisation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Namespaces&lt;/strong&gt; → Categories (like "AWS/EC2", "AWS/S3")&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dimensions&lt;/strong&gt; (Key-Value) → Specific resource identifiers (InstanceId=i-1234567, BucketName=my-bucket)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metric Value&lt;/strong&gt; → 50%&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Timestamp&lt;/strong&gt; → 2024-11-01&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fisc54odo0afh9di2nmz9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fisc54odo0afh9di2nmz9.png" alt="Image noting the different CloudWatch features including; metrics, logs, alarms and events" width="800" height="553"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  CloudTrail (Auditing) 🔎
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;CloudTrail&lt;/code&gt; captures &lt;strong&gt;all&lt;/strong&gt; control plane API activity (e.g., resource creation, deletion, etc.). It records what action was taken, by whom, when, on what resource, from what IP, and using what method (Console, CLI, SDK).&lt;/p&gt;

&lt;p&gt;It can also be configured to capture data events, such as S3 GetObject, PutObject (but this is not enabled by default).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flg2qobqnencps1weeqqb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flg2qobqnencps1weeqqb.png" alt="Image describing CloudTrail management events vs data events" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;Multi-region logging is enabled by default in CloudTrail, but we can customise its regional scope in the console. The actual audit logs are collected and stored in an S3 bucket (optionally forwarded to CloudWatch Logs)!&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;🎯 TL;DR&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;IAM controls who can do what.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CloudWatch monitors how resources are performing.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CloudTrail audits what actions were actually taken.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;✨ &lt;em&gt;This is part of a mini-series where I delve into everything cloud-related. Check out my other posts for further learning!&lt;/em&gt; ✨&lt;/p&gt;

</description>
      <category>aws</category>
      <category>programming</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>Beginner's AWS Guide: Databases (Part 5)</title>
      <dc:creator>Ayo</dc:creator>
      <pubDate>Fri, 08 Aug 2025 16:54:00 +0000</pubDate>
      <link>https://dev.to/meshclan1/beginners-aws-guide-databases-part-5-3663</link>
      <guid>https://dev.to/meshclan1/beginners-aws-guide-databases-part-5-3663</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;Objective:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;This section dives into &lt;strong&gt;databases&lt;/strong&gt; and builds upon the storage concepts covered in the &lt;strong&gt;Beginner's AWS Guide: Storage Services (Part 3)&lt;/strong&gt;. Here, we explore databases and look into &lt;strong&gt;RDS&lt;/strong&gt; (relational databases) and &lt;strong&gt;DynamoDB&lt;/strong&gt; (NoSQL) as popular service options available in AWS.&lt;/p&gt;




&lt;h2&gt;
  
  
  Databases vs Storage Services
&lt;/h2&gt;

&lt;p&gt;A database is a system that &lt;code&gt;stores&lt;/code&gt;, &lt;code&gt;organises&lt;/code&gt;, and &lt;code&gt;queries&lt;/code&gt; structured or semi-structured data at scale.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Simple Library Analogy for Databases&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;The library shelves&lt;/em&gt; = &lt;code&gt;tables&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Academic books&lt;/em&gt; = &lt;code&gt;structured data&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Magazines&lt;/em&gt; = &lt;code&gt;semi-structured data&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Search system&lt;/em&gt; = &lt;code&gt;query engine&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We don't just store data in a library — we organise and query it efficiently. This has its benefits, including being able to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Model relationships in data.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Query data quickly and flexibly.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Support multi-user reads/writes (multiple people using the library at the same time).&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Enable transactional consistency (ACID compliance - updates in near real-time).&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frlnvnab5b0bfyoz9jyek.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frlnvnab5b0bfyoz9jyek.png" alt="Image highlighting the different feature sets between databases and simple storage options" width="800" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The link below discusses &lt;code&gt;Relational Databases vs. NoSQL Document Databases&lt;/code&gt; in greater depth. I highly recommend having a read to understand the differences between the two: &lt;a href="https://lennilobel.wordpress.com/2015/06/01/relational-databases-vs-nosql-document-databases/" rel="noopener noreferrer"&gt;https://lennilobel.wordpress.com/2015/06/01/relational-databases-vs-nosql-document-databases/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  RDS: Relational Database Service 🏢
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;RDS&lt;/code&gt; is a managed AWS service for creating and managing SQL-based relational databases. For example, we can choose from popular database engines such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PostgreSQL&lt;/li&gt;
&lt;li&gt;MySQL&lt;/li&gt;
&lt;li&gt;Microsoft SQL Server&lt;/li&gt;
&lt;li&gt;Oracle&lt;/li&gt;
&lt;li&gt;MariaDB&lt;/li&gt;
&lt;li&gt;Aurora (AWS's own SQL database engine)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdvrwscqsb2wdvuk1qotw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdvrwscqsb2wdvuk1qotw.png" alt="Image highlighting an example of an efficient SQL query" width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzj9lx6t7mlsqxfg82ho6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzj9lx6t7mlsqxfg82ho6.png" alt="Table describing how RDS works" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;We configure RDS, even though it uses EC2 instances behind the scenes to run our databases.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RDS handles the entire EC2 layer for us&lt;/strong&gt; — including provisioning the server, managing the operating system, handling scaling, and monitoring — so we never need to access or manage the EC2 instance directly.&lt;/p&gt;

&lt;p&gt;We simply choose our engine options, instance type, storage, and other settings — and RDS takes care of the rest.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3y7bt69dfq2no429y4k6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3y7bt69dfq2no429y4k6.png" alt="Image showing table of benefits when using RDS" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  RDS: Creating a Database 🏢
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Choose Engine&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Configure DB instance settings (storage, memory, availability, VPC/network settings, security groups)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Launch DB Instance (AWS handles provisioning)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Connect &amp;amp; Use&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;u&gt;DB connection info to note via the AWS console:&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Our set &lt;code&gt;DB name&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Master Username/Password&lt;/code&gt; - DB login details&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DNS Connection Endpoint&lt;/code&gt; (e.g. mydb.abc123.rds.amazonaws.com)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Port&lt;/code&gt; (e.g., default: 5432 for PostgreSQL)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 &lt;em&gt;The DNS endpoint is how AWS gives us a stable and reliable way to connect to our database — even if the underlying IP changes. Meanwhile, the port is required as it tells the OS which application (PostgreSQL, MySQL, etc.) is handling the request!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect via:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;em&gt;GUI tools&lt;/em&gt; (e.g., pgAdmin, DBeaver)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;CLI tools&lt;/em&gt; (e.g., psql)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Application code&lt;/em&gt; (e.g., Python, Node.js + drivers)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once connected, we can finally create our database structure, i.e. create tables, insert data, and run queries.&lt;/p&gt;




&lt;h2&gt;
  
  
  DynamoDB: NoSQL Database Service 🏢
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;DynamoDB&lt;/code&gt; is AWS’s serverless NoSQL database designed for speed, scalability, and simplicity. We delve into &lt;code&gt;serverless&lt;/code&gt; computing in "Serverless and Modern Computing (Part 7)", but essentially it means we do not need to manage any server infrastructure (AWS does!).&lt;/p&gt;

&lt;p&gt;&lt;u&gt;DynamoDB stores data in tables using:&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Key-value pairs&lt;/li&gt;
&lt;li&gt;Documents (typically in a JSON-like format)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each row in a table is called an &lt;strong&gt;'item'&lt;/strong&gt;, and each item can be up to 400KB in size.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Partition Key&lt;/code&gt;: Groups related items under a unique identifier&lt;br&gt;
&lt;code&gt;Sort Key&lt;/code&gt; (optional): Orders items within the group&lt;br&gt;
&lt;code&gt;Attributes&lt;/code&gt;: The actual data stored within the item&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc8u4ka4v5devxr7t9kgw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc8u4ka4v5devxr7t9kgw.png" alt="Image highlighting DynamoDB structure in AWS - it notes primary keys as the key, and attributes as the value" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EXAMPLE: ONLINE-STORE&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;When a customer makes a purchase, they are assigned a partition key, e.g. Customer-ABC, to uniquely identify them.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;By adding a sort key (e.g. OrderDate or OrderID), we can store multiple orders under that same customer and organise them chronologically or by another order-specific attribute.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;This structure lets us group and query all of a customer's purchases easily, enabling features like tracking spending patterns, generating order histories, or sending targeted promotional offers.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  DynamoDB: Creating a Database 🏢
&lt;/h3&gt;

&lt;p&gt;(1) &lt;strong&gt;Create a Table&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set the table name (e.g. Users)&lt;/li&gt;
&lt;li&gt;Define a partition key (e.g. UserID)&lt;/li&gt;
&lt;li&gt;Add an optional sort key (e.g. Timestamp)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(2) &lt;strong&gt;Configure Table Settings&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Read/Write Capacity (how much traffic our table can handle)&lt;/li&gt;
&lt;li&gt;On-Demand vs Provisioned mode (auto scaling our table or setting planned capacity)&lt;/li&gt;
&lt;li&gt;Optionally enable Global Tables, which quickly replicates our table across multiple AWS regions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(3) &lt;strong&gt;Add Data via:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS Console (manually)&lt;/li&gt;
&lt;li&gt;AWS CLI (put-item)&lt;/li&gt;
&lt;li&gt;SDKs (Python boto3, JavaScript, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft6omtq1zkd8z7vdm6k8t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft6omtq1zkd8z7vdm6k8t.png" alt="Image showcasing the different options to add data to a DynamoDB table" width="800" height="933"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary: RDS vs. DynamoDB 🏢
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2abszeqj792g0qumducz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2abszeqj792g0qumducz.png" alt="Table summarising the key differences between RDS and DynamoDB" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu5sh3l8xrzv2qjqtwrr1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu5sh3l8xrzv2qjqtwrr1.png" alt="Table explaining the difference between managed instances in RDS and serverless computing with DynamoDB" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvxldg5idw8rnmusapkzw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvxldg5idw8rnmusapkzw.png" alt="Image showing comparative use value of DynamoDB vs RDS" width="800" height="237"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;🎯 TL;DR&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;RDS provides all-in-one managed relational database engines (MySQL, PostgreSQL)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DynamoDB is a fast NoSQL database perfect for quick retrieval of lightweight data&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AWS handles scaling and maintenance in both, so that we can prioritise focus elsewhere.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;✨ &lt;em&gt;This is part of a mini-series where I delve into everything cloud-related. Check out my other posts for further learning!&lt;/em&gt; ✨&lt;/p&gt;

</description>
      <category>aws</category>
      <category>programming</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>Beginner's AWS Guide: Network Fundamentals (Part 4)</title>
      <dc:creator>Ayo</dc:creator>
      <pubDate>Fri, 08 Aug 2025 16:53:52 +0000</pubDate>
      <link>https://dev.to/meshclan1/beginners-aws-guide-network-fundamentals-part-4-22ol</link>
      <guid>https://dev.to/meshclan1/beginners-aws-guide-network-fundamentals-part-4-22ol</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;Objective:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;This section introduces key cloud networking concepts, including &lt;strong&gt;Virtual Private Clouds (VPCs)&lt;/strong&gt;, &lt;strong&gt;Subnets&lt;/strong&gt;, &lt;strong&gt;Internet Gateways (IGWs)&lt;/strong&gt;, &lt;strong&gt;NACLs&lt;/strong&gt;, and &lt;strong&gt;Security Groups&lt;/strong&gt;. By the end, you'll have a solid understanding of how AWS networking works behind the scenes and how cloud resources communicate securely.&lt;/p&gt;




&lt;h2&gt;
  
  
  VPC: Virtual Private Cloud 🏢
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;Virtual Private Cloud (VPC)&lt;/code&gt; is like having our own private room in the AWS cloud - isolated from other AWS users. Inside this room, we can place resources like EC2 instances, databases, and more. By default, we're allowed up to 5 VPCs per region, but this limit can be increased. &lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;Each resource inside a VPC needs a private IP address so it can be uniquely identified, to send/receive data, and to avoid IP conflicts.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;When we create a VPC, we customise it by assigning:&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;A name&lt;/code&gt; (e.g. dev-vpc, prod-vpc)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;An IPv4 CIDR block&lt;/code&gt; – this defines the number of  &lt;strong&gt;private IP addresses&lt;/strong&gt; available inside our VPC&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Resources in our VPC must select an IP from one of the following private block address ranges to function accordingly (defined by RFC 1918):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;10.0.0.0&lt;/code&gt; to &lt;code&gt;10.255.255.255&lt;/code&gt; &lt;code&gt;(/8)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;172.16.0.0&lt;/code&gt; to &lt;code&gt;172.31.255.255&lt;/code&gt; &lt;code&gt;(/12)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;192.168.0.0&lt;/code&gt; to &lt;code&gt;192.168.255.255&lt;/code&gt; &lt;code&gt;(/16)&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These private IP ranges allow for internal (non-public) communication between our resources. However, for a resource to access the internet, it must have: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A &lt;code&gt;public IP&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;A connected &lt;code&gt;Internet Gateway (IGW)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;route&lt;/code&gt; in the route table directing outbound traffic (e.g. 0.0.0.0/0) to the IGW&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Example CIDR Breakdown&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;If we set our VPC's CIDR block to 10.0.0.0/18:

10.0.0.0 is the starting IP

The /18 means the first 18 bits of the 32-bit IP address are reserved for the NETWORK portion.

That leaves 14 bits (since 32 - 18 = 14) for the HOST portion — i.e. for AWS to allocate individual IP addresses to resources within the network.

We therefore get 2¹⁴ = 16,384 private IPs, ranging from 10.0.0.0 to 10.0.63.255
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Please let me know if you would like more information on IP addresses in AWS. I appreciate it's a complex topic!&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Subnets: Breaking VPCs into Zones
&lt;/h2&gt;

&lt;p&gt;A &lt;code&gt;Subnet&lt;/code&gt; is a smaller network inside our VPC that is tied to a specific Availability Zone (AZ). It is made by carving out portions of our VPC’s IP range and then assigning them to different AZs.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;💡 So where a VPC exists within a single AWS region, a subnet exists within a single Availability Zone.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We use multiple subnets to separate and configure &lt;strong&gt;public-facing&lt;/strong&gt; and &lt;strong&gt;internal-only&lt;/strong&gt; resources. With &lt;code&gt;route tables&lt;/code&gt; defining how traffic moves between subnets or out to the internet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90xv436xuimjkc1kncbf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90xv436xuimjkc1kncbf.png" alt="Image showing the organisation of subnets in Availability Zones (AZs)." width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  IGW: Internet Gateway 🌐
&lt;/h2&gt;

&lt;p&gt;We have hinted at the &lt;code&gt;IGW&lt;/code&gt; already, but to confirm, it is an AWS component that allows resources in our VPC to connect to the internet. It's not something we need to manage or worry about failing, as it is highly available and scales automatically!&lt;/p&gt;

&lt;p&gt;For example, to enable internet access for an EC2 instance, we require just the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A &lt;strong&gt;public subnet&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;public IP address&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;IGW attached to our VPC&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;route in our route table sending outbound traffic (0.0.0.0/0) to the IGW&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;💡 &lt;em&gt;In AWS, there are two main ways to get a public IP address for EC2 instances and services that run on EC2 infrastructure:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;(1) &lt;strong&gt;Automatically Assigned by AWS (Dynamic Public IP)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When we launch an EC2 instance in a public subnet, AWS can automatically assign a &lt;code&gt;dynamic public IPv4 address&lt;/code&gt;. This public IP is ephemeral, meaning it changes whenever we stop and start the instance.&lt;/p&gt;

&lt;p&gt;(2) &lt;strong&gt;Elastic IP Address (Static Public IP)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is a &lt;code&gt;static public IPv4 address&lt;/code&gt; that we allocate to our AWS account. We can attach/reattach it to an EC2 instance if and when required, and it is free only when we associate it with a running instance.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The diagram below highlights what a configured route table looks like behind the scenes!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnlp8i335js3sic75g2ji.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnlp8i335js3sic75g2ji.png" alt="Image showing how a route table works in AWS" width="800" height="674"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1g7d05w1glrqnpd5pnay.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1g7d05w1glrqnpd5pnay.png" alt="Image showing the bases of a VPC, subnets and the Internet Gateway in AWS" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Network Protection: NACLs vs. Security Groups 🔑
&lt;/h2&gt;

&lt;p&gt;AWS offers two main layers of network protection, each with its own purpose that I believe are worth highlighting:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx2hdtxe8bym1ciump3v5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx2hdtxe8bym1ciump3v5.png" alt="Table noting the key differences between NACLs and Security Groups" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;Each subnet can only have one NACL attached to it, but one NACL can be shared across multiple subnets.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuyugor37vh2c9gwy9y5p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuyugor37vh2c9gwy9y5p.png" alt="Image showing security groups. It allows inbound traffic from an authorised port and IP and automatically returns that traffic." width="800" height="429"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;🎯 TL;DR&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;VPC creates our own private section of AWS cloud.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Subnets divide our VPC into public (internet-facing) and private sections.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Internet Gateway connects our VPC to the public internet.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security Groups and NACLs control what traffic can reach our resources.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;✨ &lt;em&gt;This is part of a mini-series where I delve into everything cloud-related. Check out my other posts for further learning!&lt;/em&gt; ✨&lt;/p&gt;

</description>
      <category>aws</category>
      <category>programming</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>Beginner's AWS Guide: Storage Services (Part 3)</title>
      <dc:creator>Ayo</dc:creator>
      <pubDate>Fri, 08 Aug 2025 16:53:48 +0000</pubDate>
      <link>https://dev.to/meshclan1/beginners-aws-guide-storage-services-part-3-5eb6</link>
      <guid>https://dev.to/meshclan1/beginners-aws-guide-storage-services-part-3-5eb6</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;Objective:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;This section builds upon a key component of servers - &lt;strong&gt;Storage&lt;/strong&gt; as covered in the &lt;strong&gt;Beginner's AWS Guide: Virtual Servers (Part 2)&lt;/strong&gt;. Here, we delve into the available data storage services in AWS, including &lt;strong&gt;S3&lt;/strong&gt;, &lt;strong&gt;EBS&lt;/strong&gt;, and &lt;strong&gt;EFS&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  S3: Simple Storage Service 🪣
&lt;/h2&gt;

&lt;p&gt;Servers need a place to store and retrieve data, and in this case, &lt;code&gt;AWS S3&lt;/code&gt; is a very popular option. We can store and access many data types, including; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Images (JPG, PNG)&lt;/li&gt;
&lt;li&gt;Documents (PDF, DOCX)&lt;/li&gt;
&lt;li&gt;Videos (MP4, MOV)&lt;/li&gt;
&lt;li&gt;Audio (MP3)&lt;/li&gt;
&lt;li&gt;Static files (HTML, CSS, JS)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More precisely, S3 is an object storage service that allows us to store files (called &lt;code&gt;objects&lt;/code&gt;) in &lt;code&gt;buckets&lt;/code&gt;, which act like top-level folders, and to access objects directly via URL.&lt;/p&gt;

&lt;p&gt;Each object can be up to 5TB in size, and buckets can hold an unlimited number of objects.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Each object consists of:&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The data itself&lt;/strong&gt; (e.g. a photo, video, document).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A unique key&lt;/strong&gt; (how we identify it in the bucket).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optional metadata&lt;/strong&gt; (e.g. content type, author, timestamp).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;💡 Each newly created bucket must have a &lt;code&gt;globally unique name&lt;/code&gt;. When we create a bucket, it becomes part of a public web address (&lt;code&gt;URL&lt;/code&gt;). Just like two websites can't share the same domain name, two S3 buckets can't have the same name, otherwise, AWS wouldn't know which bucket to route the request to!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;EXAMPLE:

https://my-GLOBALLY-unique-bucket-name.s3.us-east-1.amazonaws.com/photo.jpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;We can make URL links publicly accessible or limit accessibility using &lt;code&gt;bucket/object policies&lt;/code&gt;, which we cover in IAM and Security Fundamentals (Part 6).&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  S3 FAQs 🪣
&lt;/h3&gt;

&lt;p&gt;✨ &lt;strong&gt;Q. Can we directly upload 5TB in one go?&lt;/strong&gt; ✨&lt;/p&gt;

&lt;p&gt;No. AWS limits a single PUT request per object to 5GB, so anything larger must use a &lt;code&gt;multipart upload&lt;/code&gt; — splitting the file into parts that are uploaded separately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✨ Q. Is S3 free? ✨&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not quite, but it's very low cost, and we only pay for what we use:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Storage used&lt;/strong&gt; (GB/month)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data transferred&lt;/strong&gt; (in/out)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We can also enable &lt;code&gt;Requester Pays&lt;/code&gt;, which charges users for downloading our data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqc1iqk8glsvsfnblw3na.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqc1iqk8glsvsfnblw3na.png" alt="Image showcasing how requester pay works in AWS" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✨ Q. Does S3 come with additional features? ✨&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes — AWS offers features to assist with our goals and objectives, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Cross-region replication&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Access logging&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Versioning&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Lifecycle rules&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Transfer Acceleration&lt;/code&gt; for faster uploads worldwide&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;These are advanced features that I can cover in future posts!&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  S3 Storage Classes 🪣
&lt;/h3&gt;

&lt;p&gt;When we upload an object, it's stored in S3 Standard (General Purpose) by default. But S3 offers several storage classes to optimise cost and performance based on how frequently we access the data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F867uslc1jbucm0w5n0ad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F867uslc1jbucm0w5n0ad.png" alt="Image showing the seven different storage class options. From top to bottom, we have: S3 general Purpose, S3 Standard-Infrequent access, S3 One-Zone infrequent Access, S3 Glacier (Instant, Flexible, Deep), S3 Intelligent -Tiering" width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;💡 Intelligent-Tiering is used if we’re unsure of access patterns. It will move objects between tiers automatically (for a small monitoring fee).&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  EBS Volume: Elastic Block Store 💽
&lt;/h2&gt;

&lt;p&gt;Think of an &lt;code&gt;EBS Volume&lt;/code&gt; as a cloud-based external hard drive (like a USB stick) that we can attach to EC2 servers. It gives us &lt;code&gt;persistent storage&lt;/code&gt;, which survives even if we delete the server.&lt;/p&gt;

&lt;p&gt;Just like physical drives, we can attach/detach EBS volumes from servers, format them, and use them to store logs, databases, or other data.&lt;/p&gt;

&lt;p&gt;EBS volumes are created within a specific Availability Zone (AZ). We can attach/detach volumes between EC2 instances in the same AZ. But to move a volume to another AZ, we must:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;em&gt;Create a snapshot (a copy) of the volume.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Use the snapshot to create a new EBS volume in the target AZ.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;And then attach our volume to another EC2 instance.&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxz3wt9sj5mb0kku73p02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxz3wt9sj5mb0kku73p02.png" alt="Image showing how a server can have multiple EBS volumes attached to it" width="800" height="433"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  EBS: Volume Types 💽
&lt;/h3&gt;

&lt;p&gt;AWS offers different volume types based on performance and price. We determine the type of volume we want based on the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Size (GB)&lt;/code&gt; — how much overall space we want.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;Throughput (MB/s)&lt;/code&gt; — how much data can be read/written per second. A lower throughput means it takes longer to move large amounts of data, while higher throughput allows for faster bulk data transfers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;IOPS&lt;/code&gt; — how many read/write ops per second (important for database-style workloads). A Higher IOPS means our storage can handle more read/write operations per second, resulting in faster application performance.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6b4a5i0tff4rrn99bj1b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6b4a5i0tff4rrn99bj1b.png" alt="Image highlighting each volume type; gp2gp2, io1/io2, st1, sc1 and their associated benefits and use cases" width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;For further info on EBS Volume specs, please check out - &lt;a href="https://digitalcloud.training/amazon-ebs/" rel="noopener noreferrer"&gt;https://digitalcloud.training/amazon-ebs/&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  EFS: Elastic File System 📠
&lt;/h2&gt;

&lt;p&gt;Whereas S3 is object storage and EBS is block storage, EFS is &lt;code&gt;network file storage&lt;/code&gt; - just like a regular file system on our computer.&lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;A &lt;code&gt;file system&lt;/code&gt; is where we can store and access files in folders, and further place those folders inside other folders, and so forth.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;EFS lets multiple servers simultaneously mount and access the same folder structure, which makes it perfect for shared storage scenarios (e.g. logs shared across multiple instances).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How EFS works&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;em&gt;We create an &lt;strong&gt;EFS file system&lt;/strong&gt; in AWS. AWS provides a DNS name (per file system, region, and VPC) to use for mounting.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;We install the &lt;strong&gt;EFS utilities&lt;/strong&gt; on our Linux EC2 instances, which let us communicate with the file system using the &lt;code&gt;mount.efs&lt;/code&gt; helper.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;We configure &lt;strong&gt;mount targets&lt;/strong&gt; across Availability Zones within a VPC (one per subnet/AZ). This ensures EC2 instances in each AZ can access EFS with low latency.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Finally, we &lt;strong&gt;mount the file system&lt;/strong&gt; using the DNS-based mount target.&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;EXAMPLE&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Example EFS Mount Target DNS&lt;/span&gt;
fs-12345678.efs.us-east-1.amazonaws.com

&lt;span class="c"&gt;# Install EFS utilities (Amazon Linux)&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; amazon-efs-utils

&lt;span class="c"&gt;# Make a directory on the EC2 instance to mount the EFS&lt;/span&gt;
&lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /mnt/efs

&lt;span class="c"&gt;# Mount the EFS file system (with encryption in transit)&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;mount &lt;span class="nt"&gt;-t&lt;/span&gt; efs &lt;span class="nt"&gt;-o&lt;/span&gt; tls fs-12345678.efs.us-east-1.amazonaws.com:/ /mnt/efs

&lt;span class="c"&gt;# Once mounted, it's just a folder path!&lt;/span&gt;
&lt;span class="c"&gt;# We can create directories and write files in EFS from the instance:&lt;/span&gt;

&lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /mnt/efs/app-logs
&lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /mnt/efs/shared-data
&lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /mnt/efs/backups

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"log data"&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /mnt/efs/app-logs/app.log
&lt;span class="nb"&gt;sudo cp &lt;/span&gt;important-file.txt /mnt/efs/shared-data/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9uc49bt3tc9kc6pgjdkl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9uc49bt3tc9kc6pgjdkl.png" alt="Image showing the inter-connectivity potential of EFS across Linux instances and on-premise servers" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;EFS has different performance and throughput modes depending on our use case.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzeakrc5b88z9omw3enlm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzeakrc5b88z9omw3enlm.png" alt="Image showing the different performance options when setting up EFS as a shared storage option in the cloud" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;🎯 TL;DR&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;S3: Scalable object storage for files, accessible via URL — great for backups, media, and static content.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EBS: Block-level storage (like a cloud hard drive) attached to one server at a time.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EFS: Shared file system that multiple servers can access at once — perfect for collaboration and distributed workloads.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Choose storage based on how often, how fast, and by whom the data needs to be accessed.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;✨ &lt;em&gt;This is part of a mini-series where I delve into everything cloud-related. Check out my other posts for further learning!&lt;/em&gt; ✨&lt;/p&gt;

</description>
      <category>aws</category>
      <category>programming</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>Beginner's AWS Guide: Virtual Servers (Part 2)</title>
      <dc:creator>Ayo</dc:creator>
      <pubDate>Fri, 08 Aug 2025 16:53:11 +0000</pubDate>
      <link>https://dev.to/meshclan1/beginners-aws-guide-virtual-servers-part-2-1ab4</link>
      <guid>https://dev.to/meshclan1/beginners-aws-guide-virtual-servers-part-2-1ab4</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;Objective:&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;This section explores &lt;strong&gt;virtual servers&lt;/strong&gt; in the cloud, and their role in cloud operations. Here, we dive into managing virtual servers using AWS's primary service, the &lt;strong&gt;Elastic Compute Cloud (EC2)&lt;/strong&gt;, along with &lt;strong&gt;Elastic Load Balancing (ELB)&lt;/strong&gt; for distributing traffic and &lt;strong&gt;Auto Scaling Groups (ASG)&lt;/strong&gt; for automatically managing server capacity.&lt;/p&gt;




&lt;h2&gt;
  
  
  EC2: Elastic Compute Cloud 💻
&lt;/h2&gt;

&lt;p&gt;Amazon EC2 is a service that provides scalable &lt;code&gt;virtual servers&lt;/code&gt; (called &lt;strong&gt;instances&lt;/strong&gt;) in the cloud. These virtual servers run on physical hardware in AWS data centres, but we don't need to manage or buy the hardware itself.&lt;/p&gt;

&lt;p&gt;Thanks to a software layer called a &lt;code&gt;hypervisor&lt;/code&gt;, multiple virtual servers (EC2 instances), including those from different AWS customers, can run safely and independently on the same physical machine!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple Analogy:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;The physical server is like a large apartment building.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Each EC2 instance (virtual server) is like a separate apartment unit.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;The hypervisor is like the building manager who ensures each apartment is isolated, secure, and gets the right utilities (CPU, memory, etc.).&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ok8g46jxqb0qj7zxnx8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ok8g46jxqb0qj7zxnx8.png" alt="Image highlighting the connection between a physical server, hypervisor, and  virtual server in AWS" width="800" height="591"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  EC2: Instance Purchasing Options 💰
&lt;/h3&gt;

&lt;p&gt;When we use EC2, we're renting virtual servers &lt;code&gt;(compute power)&lt;/code&gt; from AWS. The base cost comes from AWS managing the physical servers, networking, and infrastructure behind the scenes.&lt;/p&gt;

&lt;p&gt;However, on top of this, AWS offers different pricing models to suit varying &lt;code&gt;budgets&lt;/code&gt;, &lt;code&gt;workloads&lt;/code&gt;, and &lt;code&gt;time commitments&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Here's a quick overview of the most common EC2 pricing models:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7g3dwxpxxm945atl6ire.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7g3dwxpxxm945atl6ire.png" alt="Image showing the six most common pricing models for renting virtual servers in AWS" width="800" height="383"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  EC2: Instance Set Up 💻🛠️
&lt;/h3&gt;

&lt;p&gt;To launch a virtual server (EC2 instance), we must first choose an &lt;code&gt;Amazon Machine Image (AMI)&lt;/code&gt;, which is basically a pre-configured template that includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The operating system (e.g., Ubuntu, Amazon Linux, Windows)&lt;/li&gt;
&lt;li&gt;Pre-installed applications&lt;/li&gt;
&lt;li&gt;Software configurations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then, from this, we configure our instance by selecting the following components:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq46n4dj4b8s8dlmf7ghx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq46n4dj4b8s8dlmf7ghx.png" alt="Image highlighting key components of instance configuration: Instance type, storage, networking and security" width="800" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Image showing a chart of the EC2 instance type options with an accompanying description and mnemonic.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpmur1vpizi2gzftuyx22.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpmur1vpizi2gzftuyx22.png" alt="Image showing a chart of the EC2 instance types with an accompanying description and mnemonic." width="800" height="516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Simple Analogy: &lt;em&gt;Launching an EC2 Instance is essentially like ordering a custom laptop!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AMI&lt;/strong&gt; - Choosing our OS and default software&lt;br&gt;
&lt;strong&gt;Instance Type&lt;/strong&gt; - Selecting CPU/RAM (hardware specs)&lt;br&gt;
&lt;strong&gt;Storage&lt;/strong&gt; - Picking SSD/HDD or external drives&lt;br&gt;
&lt;strong&gt;Security &amp;amp; Networking&lt;/strong&gt; - Setting up Wi-Fi, firewall, and login password&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;Golden AMI&lt;/strong&gt;: Instead of manually configuring an AMI from scratch every time, we can save a customised AMI with all our preferred software and settings, and quickly configure an instance from it.&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;User Data&lt;/strong&gt;: We can also run custom setup scripts (process called &lt;code&gt;bootstrapping&lt;/code&gt;) when our instance first launches, which helps with automation. Common examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Installing packages&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Downloading files&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Starting apps or services&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  EC2: Connecting to our Instance 🔗
&lt;/h3&gt;

&lt;p&gt;To securely log in to our EC2 instance, we need a &lt;code&gt;key-pair&lt;/code&gt;, which is basically a secure digital password. Depending on the operating system and setup, we can connect using:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdzlpyjjhk0e7qtd9zyb4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdzlpyjjhk0e7qtd9zyb4.png" alt="Image showing table of EC2 Instance connection methods including: SSH, Instance Connect, RDP, and session Manager" width="800" height="281"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ELB: Elastic Load Balancing ⚖️
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Elastic Load Balancing&lt;/code&gt; (ELB) is a fully managed AWS service that automatically distributes incoming traffic across multiple downstream server targets and IP addresses. Under ELB, there are 3 different types of load balancers with unique attributes (&lt;code&gt;ALB&lt;/code&gt;, &lt;code&gt;NLB&lt;/code&gt;, &lt;code&gt;GLB&lt;/code&gt;). &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple Analogy:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;Imagine a busy supermarket with multiple checkout tills (servers).&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Instead of everyone rushing to one till, a smart cashier (the ELB) routes each customer (user request) to the shortest available queue.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;This keeps things flowing smoothly and prevents an overload on any one till.&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu62n23l8xa8nedns9ebf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu62n23l8xa8nedns9ebf.png" alt="Image showing how an ELB directs traffic to multiple downstream instances." width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Why Use an ELB?&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Single Access Point&lt;/strong&gt;: Clients connect to one DNS name (provided by the ELB), rather than targeting specific servers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Traffic Distribution&lt;/strong&gt;: Spreads traffic evenly across healthy servers, boosting performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fault Tolerance&lt;/strong&gt;: If one server fails, ELB redirects traffic to healthy ones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Health Monitoring&lt;/strong&gt;: ELB runs regular checks to ensure targets are responsive.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkysjf2w4rcrhev7x77wn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkysjf2w4rcrhev7x77wn.png" alt="Image highlighting the different types of load balancers and their functionality in ELB; ALB, NLB, and GLB" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;We can map DNS names to a custom domain (e.g. myapp.com) using DNS records for user-friendly access.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  ASG: Auto Scaling Groups 🔃
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Auto Scaling Groups&lt;/code&gt; (ASG) are another free, managed AWS service that automatically launches or terminates EC2 instances based on real-time demand. This helps us with optimising costs and managing server availability!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How ASG Works:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;We initially define rules like keep at least 2, but no more than 5 instances running.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;ASG listens to CloudWatch metrics to make decisions. (Covered further in IAM and Security Fundamentals (Part 6)).&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Based on demand(s), it automatically scales out (adds instances) or scales in (removes instances).&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Essentially, AWS CloudWatch monitors metrics on our instance that we want to track. It then triggers an alarm when thresholds are breached, with ASG responding accordingly. For example, observable metrics could include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;CPU utilisation&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Memory usage&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Network traffic&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Custom metrics (e.g. number of active users)&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fga0gx1vqp022e1iuyzbu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fga0gx1vqp022e1iuyzbu.png" alt="Image highlighting how auto scaling groups work in AWS" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;ASG relies on a &lt;code&gt;Launch Template&lt;/code&gt; that acts like a blueprint, defining exactly what type of EC2 instance to create and how to configure it, including the &lt;code&gt;scaling strategy&lt;/code&gt; for when to add or remove instances.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fob28pvbkezkk0pi8efsw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fob28pvbkezkk0pi8efsw.png" alt="Image highlighting the base requirements for launching new instances in ASG from a launch template" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxoddqr0wa4dm5lhr5k4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxoddqr0wa4dm5lhr5k4.png" alt="Image highlighting different ASG scaling strategies; manual, dynamic, scheduled, and predictive scaling" width="800" height="396"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;🎯 TL;DR&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;EC2 provides virtual servers in the cloud that we can configure and control.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Choose instance types based on CPU, memory, and storage needs.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ELB spreads traffic across multiple servers for better performance.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ASG automatically adds/removes servers based on demand.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;By combining EC2 + ELB + ASG, we create a resilient, scalable, and cost-efficient setup&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;✨ &lt;em&gt;This is part of a mini-series where I delve into everything cloud-related. Check out my other posts for further learning!&lt;/em&gt; ✨&lt;/p&gt;

</description>
      <category>aws</category>
      <category>programming</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>Beginner's AWS Guide: Cloud Computing (Part 1)</title>
      <dc:creator>Ayo</dc:creator>
      <pubDate>Tue, 10 Jun 2025 15:52:58 +0000</pubDate>
      <link>https://dev.to/meshclan1/aws-cloud-computing-101-3p1b</link>
      <guid>https://dev.to/meshclan1/aws-cloud-computing-101-3p1b</guid>
      <description>&lt;h1&gt;
  
  
  About Me 👾
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Hi, I'm Ayo – a self-directed developer from the UK, passionate about cloud and software engineering!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Whether you want to &lt;code&gt;learn more about the cloud&lt;/code&gt;, are &lt;code&gt;starting your cloud journey&lt;/code&gt;, or are &lt;code&gt;looking to deepen your AWS knowledge&lt;/code&gt;, my goal with this series is to provide clear explanations that make topics surrounding the cloud more understandable.&lt;/p&gt;

&lt;p&gt;I hope that by sharing how I've approached various concepts and AWS services, you'll find valuable takeaways for your own personal growth and development.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;For context, I have achieved the following AWS certifications: &lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS Certified &lt;strong&gt;SysOps Administrator - Associate&lt;/strong&gt; (SOA-C02)&lt;/li&gt;
&lt;li&gt;AWS Certified &lt;strong&gt;Developer - Associate&lt;/strong&gt; (DVA-C02)&lt;/li&gt;
&lt;li&gt;AWS Certified &lt;strong&gt;Solutions Architect - Associate&lt;/strong&gt; (SAA-C03)&lt;/li&gt;
&lt;li&gt;AWS Certified &lt;strong&gt;Cloud Practitioner&lt;/strong&gt; (CLF-C02)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;If you find inspiration or develop a greater understanding of AWS Cloud from my work, please share with your wider network and leave a comment below! 😄&lt;/em&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Objective:
&lt;/h1&gt;

&lt;p&gt;This section introduces the &lt;strong&gt;fundamentals of cloud computing&lt;/strong&gt; and its core infrastructure concepts. Here, we explore the different &lt;strong&gt;Cloud Service Models (IaaS, PaaS, SaaS)&lt;/strong&gt;, examine &lt;strong&gt;Server Architecture&lt;/strong&gt;, and understand the &lt;strong&gt;AWS Global Infrastructure&lt;/strong&gt;, including regions, availability zones, and local zones that form the backbone of modern cloud services.&lt;/p&gt;




&lt;h2&gt;
  
  
  Cloud Computing ☁️
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Cloud computing is like renting equipment or services on demand instead of buying them outright.&lt;/code&gt; We can easily set up different services based on our requirements, and scale and measure our service usage.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Key cloud computing features to note:&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pay-as-you-go:&lt;/strong&gt; We only pay for what we use.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instant access:&lt;/strong&gt; We obtain instant access to resources without having to set up hardware or services.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Everything-as-a-service:&lt;/strong&gt; We have web access to services, including database servers, AI tools, computing services, and storage options.&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Cloud Computing Models: IaaS, PaaS, SaaS ☁️
&lt;/h3&gt;

&lt;p&gt;Not all cloud services work the same way. Some require more work from us, while others do more of the work for us. This is where &lt;strong&gt;cloud computing models&lt;/strong&gt; come in — they help explain how much responsibility is ours versus what the cloud provider handles.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Here are the three main models:&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft49d7x6re3bgxmcb1n04.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft49d7x6re3bgxmcb1n04.png" alt="Image showcasing the different cloud computing models" width="800" height="339"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As we move from IaaS to PaaS to SaaS, we trade control for convenience. IaaS gives us the most flexibility but requires the most technical expertise, whereas SaaS is the easiest to use but gives us the least customisation options!&lt;/p&gt;




&lt;h2&gt;
  
  
  Key IT Terminology: Servers 🖥️
&lt;/h2&gt;

&lt;p&gt;A server is a &lt;code&gt;physical or virtual computer with a unique IP address&lt;/code&gt; that stores, processes, and shares information. It responds to requests from other computers, known as &lt;code&gt;clients&lt;/code&gt;, over a &lt;code&gt;network&lt;/code&gt; (like the internet or through a private system).&lt;/p&gt;

&lt;p&gt;While we use servers to host websites, run applications, store files, manage databases, etc, clients are devices that can request data from a server, for example, our phones and laptops.&lt;/p&gt;

&lt;p&gt;And for both the client and server to successfully exchange information over a network, a server needs to implement a type of &lt;code&gt;protocol&lt;/code&gt; like HTTP, FTP, or SMTP, which are essentially communication rules that must be followed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0jcapmqab8jctmgshqww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0jcapmqab8jctmgshqww.png" alt="Image showing the client-server relationship over a network" width="800" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9yotbp5ebjjhux7fcemp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9yotbp5ebjjhux7fcemp.png" alt="Image highlighting the core building blocks behind a server; storage, network interface, RAM, and CPU" width="800" height="258"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In the &lt;strong&gt;Beginner’s AWS Guide: Virtual Servers (Part 2)&lt;/strong&gt;, we dive into virtual servers in the cloud and explore their role and significance in modern cloud computing.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  AWS Global Infrastructure 🧱
&lt;/h2&gt;

&lt;p&gt;AWS hosts &lt;code&gt;physical servers&lt;/code&gt; in data centres worldwide, which are organised into &lt;code&gt;Regions&lt;/code&gt; and &lt;code&gt;Availability Zones&lt;/code&gt; (AZs):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Region is a geographically distinct area, such as eu-west-1 (Ireland) or us-east-1 (N. Virginia).&lt;/li&gt;
&lt;li&gt;Each Region contains multiple Availability Zones (AZs), which are isolated data centres (or groups of data centres) in that region. AZs help with &lt;strong&gt;fault tolerance&lt;/strong&gt; and &lt;strong&gt;high availability&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Typically, each Region has at least 3 AZs, while some have up to 6!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When deciding where our server will physically run in the world, we must weigh several trade-offs, including:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkrt1p4u736gsdct2cm6v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkrt1p4u736gsdct2cm6v.png" alt="Image highlighting trade-off considerations when selecting a region to host our data centre. It considers: Compliance, Proximity, Available Services and Pricing" width="800" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2isblfepdc5uymiuu3l6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2isblfepdc5uymiuu3l6.png" alt="Image sourced from AWSGeek showing the distribution of data centres across AWS regions and availability zones" width="800" height="587"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Local Zones 🏡
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;Local Zones&lt;/code&gt; are smaller data centres placed in or near major cities to reduce network latency for end users. They essentially act as extensions of AWS Regions, allowing us to run certain AWS services closer to users.&lt;/p&gt;

&lt;p&gt;💡 &lt;em&gt;Remember, the closer our compute resources are to users, the faster and smoother their experience will be!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;For example, we could have the region US-East-1 (US East, N. Virginia), with Local Zones placed in nearby cities such as Atlanta and Boston.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft4bbas5gdg9kment2gkj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft4bbas5gdg9kment2gkj.png" alt="Image showcasing the AWS Global Infrastructure structure including regions, AZs and local zones" width="800" height="471"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;🎯 TL;DR&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cloud computing is like renting IT resources instead of buying them.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Instant access to servers, databases, and tools without hardware setup.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IaaS, PaaS, and SaaS offer different levels of management vs control.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AWS global infrastructure (Regions, AZs, Local Zones) provides worldwide availability and disaster recovery.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;✨ &lt;em&gt;This is part of a mini-series where I delve into everything cloud-related. Check out my other posts for further learning!&lt;/em&gt; ✨&lt;/p&gt;

</description>
      <category>aws</category>
      <category>programming</category>
      <category>cloud</category>
      <category>devops</category>
    </item>
    <item>
      <title>Step 1: What you WANT to know about REACT.js</title>
      <dc:creator>Ayo</dc:creator>
      <pubDate>Wed, 13 Sep 2023 15:13:04 +0000</pubDate>
      <link>https://dev.to/meshclan1/step-1-what-you-want-to-know-about-reactjs-3jho</link>
      <guid>https://dev.to/meshclan1/step-1-what-you-want-to-know-about-reactjs-3jho</guid>
      <description>&lt;p&gt;&lt;strong&gt;React.js&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What is it?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's a front-end javascript library that helps us build user interface (UIs) by employing reusable components&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;FOR EXAMPLE&lt;/p&gt;

&lt;p&gt;Let's say you're looking to build a city from scratch right? Now, to build a city you're going to need a few things. Let's say a park, some houses, a few skyscrapers, maybe a few pandas too from China etc;&lt;/p&gt;

&lt;p&gt;(IT'S A WEIRD CITY, I KNOW!)&lt;/p&gt;

&lt;p&gt;So:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UI = Our City&lt;/li&gt;
&lt;li&gt;Reusable Components = Your individual park, house, skyscraper, panda components etc; etc;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Components in this manner are just building blocks that we can either create and/or import to help build our overall UI!!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4x1f5ux0viqwomwhbj9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4x1f5ux0viqwomwhbj9.jpg" alt="Shocked Face" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;And if you're STILL in doubt and someone asks you what React is, then just say its lego blocks but for computers 🤣 - &lt;strong&gt;hey, it worked for me!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>react</category>
      <category>tutorial</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
