<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ilham Ismail on Medium]]></title>
        <description><![CDATA[Stories by Ilham Ismail on Medium]]></description>
        <link>https://medium.com/@IlhamIsmail1?source=rss-c4aaed5de31------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zk_4Xwd5yHx_fmxeTBxbUg.jpeg</url>
            <title>Stories by Ilham Ismail on Medium</title>
            <link>https://medium.com/@IlhamIsmail1?source=rss-c4aaed5de31------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 12:11:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@IlhamIsmail1/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Terraform: A Guide to Creating Custom EC2, Security Group, and VPC Modules]]></title>
            <link>https://towardsaws.com/terraform-a-guide-to-creating-custom-ec2-security-group-and-vpc-modules-72e99a310a67?source=rss-c4aaed5de31------2</link>
            <guid isPermaLink="false">https://medium.com/p/72e99a310a67</guid>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[modules]]></category>
            <category><![CDATA[infrastructure-as-code]]></category>
            <dc:creator><![CDATA[Ilham Ismail]]></dc:creator>
            <pubDate>Mon, 13 Feb 2023 16:30:24 GMT</pubDate>
            <atom:updated>2023-02-14T05:31:14.372Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZdiPQkwXdh4Kzf0auK_UOA.png" /></figure><p>In this post, we’ll demonstrate how to create a modular and repeatable infrastructure using Terraform. We’ll cover the creation of a custom EC2 module, a security group module, and a VPC module, and show how to connect them together to create a web server in the cloud.</p><p>Whether you’re new to Terraform or an experienced user, this post will give you an understanding of how to create scalable and efficient infrastructure in the cloud.</p><h4>Objectives:</h4><ol><li>Create a custom EC2 module that can be used as repeatable infrastructure.</li><li>Create a variables.tf file for the EC2 module.</li><li>Create a Security Group module that allows for HTTP web access.</li><li>Assign the security group to the EC2 module.</li><li>Add a bootstrap script to the EC2 module to launch an Nginx webserver.</li><li>Create a VPC module.</li><li>Add a public subnet to the VPC module.</li><li>Modify the EC2 module and Security Group module to use the new VPC ID.</li></ol><h4>Let’s Begin!</h4><h4>Step 1: Create the folders</h4><p>Since we are working with modules, we need to create folders for each part. We will have our main root (parent) folder and three child folders.</p><p>These would be called modules.</p><p>I will be using VS code for this project and this is how I created my modules:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x-sFzY0OoeCTT1ID540hoA.png" /></figure><p>As you can see, we have our main folder named <em>Week21</em> as the parent module and three child modules called <em>ec2</em>, <em>security_group</em> and <em>vpc.</em></p><h4>Step 2: EC2 Module</h4><p>We will start with the EC2 module first.</p><p>To begin, you will need to create a variable.tf file for your EC2 module, which will define the input variables required to create an EC2 instance.</p><pre>variable &quot;ami_id&quot; {<br>  default = &quot;ami-0aa7d40eeae50c9a9&quot;<br>}<br><br>variable &quot;instance_type&quot; {<br>  default = &quot;t2.micro&quot;<br>}<br>variable &quot;vpc_id&quot; {<br>  type = string<br>}<br>variable &quot;security_group_id&quot; {<br>  type = string<br>}<br>variable &quot;public_subnet_id&quot; {<br>  type = string<br>}</pre><p>Next, you can make a separate provider.tf file if you want or just add that part to your main.tf but I chose to separate them.</p><p>provider.tf:</p><pre>terraform {<br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;~&gt; 4.16&quot;<br>    }<br>  }<br><br>  required_version = &quot;&gt;= 1.2.0&quot;<br>}<br><br>provider &quot;aws&quot; {<br>region = &quot;us-east-1&quot;<br>}</pre><p>main.tf:</p><pre>resource &quot;aws_instance&quot; &quot;webserver&quot; {<br>  ami           = var.ami_id<br>  instance_type = var.instance_type<br>  vpc_security_group_ids = [var.security_group_id]<br>  subnet_id     = var.public_subnet_id<br>  tags = {<br>    Name = &quot;web_server&quot;<br>  }<br><br>  <br>  user_data = &lt;&lt;-EOF<br>#!/bin/bash<br>sudo yum update -y<br>sudo amazon-linux-extras install nginx1 -y <br>sudo systemctl enable nginx<br>sudo systemctl start nginx<br>EOF<br>}</pre><h4>Step 3: Security group module</h4><p>In the security group module, it will consists of a main.tf file , a outputs.tf file, a variable.tf file</p><p>I like to separate the files to be more organized and if I make any errors , I can look through things with ease.</p><p>Variable.tf file:</p><pre>variable &quot;vpc_id&quot; {<br>  type = string<br>}</pre><p>Outputs.tf file:</p><pre>output &quot;security_group_id&quot; {<br>  value = aws_security_group.http_access.id<br>}</pre><p>main.tf file:</p><pre>resource &quot;aws_security_group&quot; &quot;http_access&quot; {<br>  name        = &quot;http_access&quot;<br>  description = &quot;Allow HTTP access&quot;<br>  vpc_id = var.vpc_id<br><br>  ingress {<br>    from_port   = &quot;22&quot;<br>    to_port     = &quot;22&quot;<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br><br>  ingress {<br>    from_port   = 80<br>    to_port     = 80<br>    protocol    = &quot;tcp&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>  egress {<br>    from_port   = 0<br>    to_port     = 0<br>    protocol    = &quot;-1&quot;<br>    cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>  }<br>}</pre><h4>Step 4: VPC module</h4><p>In the vpc module, it will consists of a main.tf file , a outputs.tf file, a variable.tf file</p><p>Variable.tf file:</p><pre>variable &quot;vpc_id&quot; {<br>  type = string<br>}</pre><p>Outputs.tf file:</p><pre>output &quot;vpc_id&quot; {<br>  value = aws_vpc.default.id<br>}<br>output &quot;public_subnet_id&quot; {<br>  value = aws_subnet.public.id<br>}</pre><p>Main.tf file:</p><pre>resource &quot;aws_vpc&quot; &quot;default&quot; {<br>  cidr_block = &quot;10.0.0.0/16&quot;<br><br>  tags = {<br>    Name = &quot;default_vpc&quot;<br>  }<br>}<br><br>resource &quot;aws_subnet&quot; &quot;public&quot; {<br>  vpc_id     = aws_vpc.default.id<br>  cidr_block = &quot;10.0.1.0/24&quot;<br>  map_public_ip_on_launch = true<br>  tags = {<br>    Name = &quot;public_subnet&quot;<br>  }<br>}</pre><h4>Step 5: Parent/root module</h4><p>Now that we have created the child modules, we need to connect them in our main.tf file on the root module.</p><p>We need to make sure our EC2 is connected the vpc and security group we have formed.</p><p>Provider.tf file:</p><pre>terraform {<br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;~&gt; 4.16&quot;<br>    }<br>  }<br><br>  required_version = &quot;&gt;= 1.2.0&quot;<br>}<br><br>provider &quot;aws&quot; {<br>region = &quot;us-east-1&quot;<br>}</pre><p>Main.tf file:</p><pre>module &quot;vpc&quot; {<br>  source = &quot;./vpc&quot;<br>  vpc_id = module.vpc.vpc_id<br>}<br><br>module &quot;security_group&quot; {<br>  source = &quot;./security_group&quot;<br>  vpc_id = module.vpc.vpc_id<br>}<br><br>module &quot;ec2&quot; {<br>  source = &quot;./ec2&quot;<br><br>  vpc_id = aws_vpc.default.id<br>  security_group_id = module.security_group.security_group_id<br>  public_subnet_id = module.vpc.public_subnet_id<br><br>}<br></pre><p>We can see on the root/parent module all three child modules inserted in.</p><p>Within each child module, you will need to provide the source file first. You can also see that I added additional information under each module to ensure the modules are connecting with each other.</p><h4>Step 6: Run it!</h4><p>Let’s run our configurations.</p><p>Make sure you have already inserted your AWS credentials and are operating from the root directory before starting these Terraform commands.</p><p>First we need to initiate our Terraform by running this command:</p><pre>terraform init</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PmiEtYDTuBWX0E8lJCjIeg.png" /></figure><p>We will also like to know our configurations are valid so we will run this command as well:</p><pre>terraform validate</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZMiqAPJj3f1ACimVAgix4A.png" /></figure><p>lastly, you can run <em>terraform plan</em> to see what terraform will be creating then run the <em>terraform apply</em> to start creating</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CDUZJ1F8_w-V_xUdByT7fQ.png" /></figure><h4>Step 7: Verify!</h4><p>We can now go on our AWS console to verify if our resources have been created as designed by us.</p><p>Let’s check with our EC2 instance:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ufyM6fKZZImawMtPOri7yA.png" /></figure><p>Our instance named <em>web_server </em>has been created with a public ip address. We can also see our vpc(<em>default</em>) and subnet(<em>public_subnet</em>) is associated with our instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kgJ4gIwhlMvRjxo6Px1PRg.png" /></figure><p>The security group named <em>http_access </em>was also created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XtVN4sMVCHB6hht2xDhZWw.png" /></figure><p>The Nginx web server is also running.</p><h4>Step 8: Destroy!</h4><p>We were able to accomplish our objectives very well and we can see by our AWS console that our resources were created.</p><p>Now we can push our files to GitHub and save our work.</p><p>Remember to destroy your resources once we are done with them by running this command:</p><pre>terraform destroy</pre><p>Thank you for following along. I hope this tutorial was easy to understand.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72e99a310a67" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/terraform-a-guide-to-creating-custom-ec2-security-group-and-vpc-modules-72e99a310a67">Terraform: A Guide to Creating Custom EC2, Security Group, and VPC Modules</a> was originally published in <a href="https://towardsaws.com/">Towards AWS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying Jenkins using Terraform]]></title>
            <link>https://aws.plainenglish.io/deploying-jenkins-using-terraform-f3a36e738807?source=rss-c4aaed5de31------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3a36e738807</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[continuous-delivery]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[jenkins]]></category>
            <dc:creator><![CDATA[Ilham Ismail]]></dc:creator>
            <pubDate>Thu, 02 Feb 2023 17:53:55 GMT</pubDate>
            <atom:updated>2023-02-03T16:32:36.451Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vXyomVSmGh6lRexPbnINUQ.png" /></figure><p>Jenkins is a popular open-source tool for Continuous Integration and Continuous Deployment (CI/CD) used by many organizations.</p><p>In this project, we aim to set up a Jenkins server using Terraform, a popular Infrastructure as Code (IaC) tool. By using Terraform, we can automate the creation of the Jenkins server, ensure consistency and repeatability across different environments, and track changes to the infrastructure.</p><h4>Objective:</h4><p>In this project, you will:</p><ol><li>Deploy an EC2 instance in your default VPC.</li><li>Bootstrap the EC2 instance with a script that installs and starts Jenkins.</li><li>Create and assign a security group to the Jenkins instance that allows traffic on ports 22 and 8080.</li><li>Create a private S3 bucket for storing Jenkins artifacts that is not open to the public.</li></ol><h4>Perquisites:</h4><ol><li>AWS account and administrative access to create and manage EC2 instances, security groups, and S3 buckets.</li><li>Terraform installed on your local machine.</li><li>Basic knowledge of Terraform syntax and resource creation.</li><li>Knowledge of bash scripts and their execution on Linux systems.</li></ol><h3>Let’s Begin!</h3><h4>Step 1: Creating a variable.tf file</h4><p>In Terraform, you can define your variables in a separate file called “variables.tf”. This file contains a list of all the variables you want to use in your Terraform code along with their data type and default values.</p><p>Here the variables.tf file I used</p><pre>variable &quot;aws_region&quot; {<br>default = &quot;us-east-1&quot;<br>}<br><br>variable &quot;jenkins_instance_type&quot; {<br>default = &quot;t2.micro&quot;<br>}<br><br>variable &quot;jenkins_ami&quot; {<br>default = &quot;ami-0aa7d40eeae50c9a9&quot;<br>}<br></pre><p>As you can see, I used variables for a few places to make my main.tf easier and cleaner to read.</p><h4>Step 2: Create a provider.tf file</h4><p>This file is used to define the provider that Terraform will use to manage your resources in the infrastructure. In this case, you are using AWS as your infrastructure and so you will be using the AWS provider</p><p>Here is the provider.tf file I used</p><pre>terraform {<br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;~&gt; 4.16&quot;<br>    }<br>  }<br><br>  required_version = &quot;&gt;= 1.2.0&quot;<br>}<br><br>provider &quot;aws&quot; {<br>region = var.aws_region<br>}</pre><p>As you can see in the provider.tf file, you will specify the version of the AWS provider you want to use and the region where your resources will be created.</p><h4>Step3: Creating the main.tf file</h4><p>The main.tf file is the backbone of your Terraform infrastructure as code project. This file contains all the resources that you want to create, manage, and configure.</p><p>Here is the main.tf file I used</p><pre>resource &quot;aws_instance&quot; &quot;jenkins_server&quot; {<br>  ami = var.jenkins_ami<br>  instance_type = var.jenkins_instance_type<br>  vpc_security_group_ids = [&quot;sg-0264e51a4aa6e4d5e&quot;]<br><br>  key_name = &quot;week20&quot;<br><br>  user_data = &lt;&lt;-EOF<br>  #!/bin/bash<br>  yum update -y<br>  wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo<br>  rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key<br>  yum upgrade -y<br>  amazon-linux-extras install java-openjdk11 -y<br>  yum install jenkins -y<br>  systemctl enable jenkins<br>  systemctl start jenkins<br>  EOF<br>}<br><br>resource &quot;aws_security_group&quot; &quot;jenkins_security_group3&quot; {<br>name = &quot;jenkins_security_group3&quot;<br>description = &quot;Allow SSH and HTTP traffic&quot;<br><br>ingress {<br>from_port = 22<br>to_port = 22<br>protocol = &quot;tcp&quot;<br>cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>}<br><br>ingress {<br>from_port = 8080<br>to_port = 8080<br>protocol = &quot;tcp&quot;<br>cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>}<br><br>egress {<br>from_port = 0<br>to_port = 0<br>protocol = &quot;-1&quot;<br>cidr_blocks = [&quot;0.0.0.0/0&quot;]<br>}<br>}<br><br>resource &quot;aws_s3_bucket&quot; &quot;jenkins_artifacts20562345&quot; {<br>bucket = &quot;jenkins-artifacts20562345&quot;<br>acl = &quot;private&quot;<br>}<br><br></pre><p>With this file, I am deploying an EC2 instance with Jenkins installed and configured, as well as creating a security group to allow traffic to the Jenkins server and an S3 bucket to store Jenkins artifacts.</p><h4>Step 4: Run the files!</h4><p>Now that we have made our files, we need run the files to achieve our objectives.</p><p>First thing is to is initializes a working directory by running the command:</p><pre>terraform init</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rTXtP5UaTVrsCGf3FQFQQw.png" /></figure><p>To ensure our files is valid, we can run these command:</p><pre>terraform validate</pre><p>Finally, we can now run our files and start our deployments:</p><pre>terraform apply</pre><p>This should be our output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*om-pL4uHn8EEDqaYKTRJ-Q.png" /></figure><p>Type yes to continue</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ptshoCuCgRrCWJpWlq3tBg.png" /></figure><p>As you can see our instance, bucket and security group are being created.</p><h4>Step 5: Verify</h4><p>Now that we have ran our files and terraform has completed the task, we can now go onto the Amazon console to verify everything.</p><p>Go to the Amazon Console and see if our EC2 instance is up and running:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a6DyDGyFbSjjPJ_HUGfETQ.png" /><figcaption>Perfect</figcaption></figure><p>We can go to the public ip address assigned to this instance to see if the Jenkins webpage shows up:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6vgok2xaXGmFlPUjLs9aKg.png" /></figure><p>To see if our Jenkin server is running in our instance, we can SHH into it and check the status of Jenkins:</p><pre>systemctl status jenkins</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*658zKu--jUHf3ITw1udt3w.png" /></figure><p>Jenkins is active and running in our EC2 instance.</p><p>Lastly, we can quickly check to see if our security group and S3 bucket can be found in the Amazon console:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GBnWTfrYVJkpvN8gHuLujA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G0qrA_k7q5oc9JvBR54oRQ.png" /></figure><p>All of our objectives were meant.</p><h4>Step 6: Destroy!</h4><p>By running this command, we are able to delete everything that was created within our main.tf:</p><pre>terraform destroy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*1nhlQsOROtZqkQTvt0f5XQ.png" /><figcaption>I destroyed the bucket manually.</figcaption></figure><p>Just like that, we were able to use Terraform to deploy with ease.</p><p><em>More content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><em>.</em></p><p><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a>, <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><strong><em>, </em></strong><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a><strong><em>, and</em></strong><em> </em><a href="https://discord.com/invite/GtDtUAvyhW"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></p><p><strong><em>Build awareness and adoption for your tech startup with </em></strong><a href="https://circuit.ooo/?utm=publication-post-cta"><strong><em>Circuit</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3a36e738807" width="1" height="1" alt=""><hr><p><a href="https://aws.plainenglish.io/deploying-jenkins-using-terraform-f3a36e738807">Deploying Jenkins using Terraform</a> was originally published in <a href="https://aws.plainenglish.io/">AWS in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Amazon EKS: Deploy Nginx using Kubernetes]]></title>
            <link>https://towardsaws.com/amazon-eks-deploy-nginx-using-kubernetes-b826005f0fee?source=rss-c4aaed5de31------2</link>
            <guid isPermaLink="false">https://medium.com/p/b826005f0fee</guid>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws-eks]]></category>
            <category><![CDATA[ec2-instance]]></category>
            <dc:creator><![CDATA[Ilham Ismail]]></dc:creator>
            <pubDate>Mon, 30 Jan 2023 17:45:27 GMT</pubDate>
            <atom:updated>2023-02-04T03:50:50.604Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vDC60jKj4SFa3do7sJLuAA.png" /></figure><p>Amazon Elastic Kubernetes Service (EKS) is a managed Kubernetes service that makes it easy to run, manage, and scale containerized applications using Kubernetes.</p><p>In this post, we will demonstrate how to deploy an Nginx web server using the Kubernetes command-line interface (CLI). We will cover the basics of setting up an EKS cluster and using kubectl to manage the deployment and scaling of Nginx. By the end of this post, you will have a basic understanding of how to use EKS and kubectl to deploy and manage containerized applications in the cloud.</p><h4>Objectives:</h4><ol><li>Launch an EC2 instance</li><li>Connect to the EC2 instance</li><li>Update the AWS CLI and install kubectl and eksctl</li><li>Create a AWS EKS cluster</li><li>Deploy an Nginx image</li><li>Verify/ check the deployments and logs</li><li>Delete it all!</li></ol><h3>Let’s begin!</h3><h4>Step 1: Launch an EC2 instance and Connect to it:</h4><p>We will need to enter our AWS console and start a EC2 instance. I will be using an Amazon Linux 2 AMI with a free tier t2.micro instance type with a key pair attached to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jm4_P8HvMqCZZSeITWoJxg.png" /></figure><p>Key pair created and Security group formed :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mrqWDN51oI0DSY1MtTxDYQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NQq6rWTi4iryiC8gdJozng.png" /></figure><p>Click Launch.</p><p>We will connect to our instance using the EC2 Connect Instance instead of SSH into our personal Terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vqBu66iovMnIh7Hza7j0Ww.png" /></figure><h4>Step 2: Update/ install:</h4><p>We will first make sure we have the updated version of our AWS CLI. We can check by using :</p><pre>aws --version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B0wBWMfS_zz85G_laSKcaQ.png" /></figure><p>Run these commands to update our version of AWS CLI:</p><pre>curl &quot;https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip&quot; -o &quot;awscliv2.zip&quot;<br>unzip -u awscliv2.zip<br>sudo ./aws/install<br>/usr/local/bin/aws --version</pre><p>This should have updated the AWS CLI</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bm2SlIEIMWGvwyZm-SXZCw.png" /><figcaption>Updated!</figcaption></figure><h4>Step 3: Login using IAM user credentials :</h4><p>Using the command:</p><pre>aws configure</pre><p>You will enter your access key and secret access key. You will also pick a region and format you want. I chose region<em> us-east-1 </em>and format is<em> Json.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nZImpzSMOWBEUTwWnn8mqg.png" /></figure><h4>Step 4: Install kubectl &amp; eksctl:</h4><p>We will need to start with kubectl first before we install eksctl. We can reference this documentation <a href="https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html">here</a></p><p>Run these commands on the terminal</p><pre>curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.16.8/2020-04-16/bin/linux/amd64/kubectl<br>chmod +x ./kubectl<br>mkdir -p $HOME/bin &amp;&amp; cp ./kubectl $HOME/bin/kubectl &amp;&amp; export PATH=$PATH:$HOME/bin<br>kubectl version --short --client</pre><p>By following these commands in order, the output should look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mxxTQydG_LkjdJbkZKXMiQ.png" /></figure><p>To install eksctl, we will be referencing this documentation <a href="https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html">here </a>.</p><p>We will run these commands to accomplish this install:</p><pre>curl --silent --location &quot;https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz&quot; | tar xz -C /tmp<br>sudo mv /tmp/eksctl /usr/local/bin<br>eksctl version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tkNrQGyEXWYYDblw_yAKuQ.png" /></figure><p>Perfect! We have now updated the AWS CLI, installed both kubectl and eksctl.</p><h4>Step 5: Create a EKS cluster</h4><p>We will now start to create our cluster by running this command:</p><pre>eksctl create cluster --name my-eks --region us-east-1 --nodegroup-name pro-19 --node-type t3.medium --nodes 3 --nodes-min 1 --nodes-max 4 --managed </pre><p>This command will create a eks cluster named <em>my-eks r</em>unning in the region<em> us-east-1. </em>I want 3 worker nodes with at least 1 minimum to 4 maximum that are managed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LCozClgrZ70RBkkgjtCnVQ.png" /></figure><p>We can go into our AWS console and go to Cloudformation to see how everything is being created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wSGdTQtWITWM6DTYJjl9xA.png" /></figure><p>It might take some time but the cluster is finally up and active</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FOs2L73PZPlsiTCZHAnmWg.png" /></figure><p>If we check in our EC2 instances, we can find our nodes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dLKdjf70GjSOUOp2DUGfyA.png" /></figure><h4>Step 6: Deploy Nginx :</h4><p>In the CLI, lets get into our cluster and check out our nodes:</p><pre>eksctl get cluster<br>aws eks update-kubeconfig --name my-eks --region us-east-1<br>kubectl get nodes</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c1krJQ3x7p0YQ1-wTSMovA.png" /><figcaption>You can see our 3 worker nodes.</figcaption></figure><p>Time for deployment!</p><pre>kubectl create deployment nginx-deploy --image nginx</pre><p>Let’s check/ describe our deployment:</p><pre>kubectl get deployments<br>kubectl get pods<br>kubectl describe deployment nginx-deploy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SiE9QeNevqGZo_CfwQRbFw.png" /></figure><p>We cn also check the logs for our deployment:</p><pre>kubectl logs deployment/nginx-deploy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ys7GjAP7jqR9HcYVeyyPZw.png" /></figure><p>And just like that, We were able to create a EKS cluster! Our deployment worked well and we were able to check and verify it.</p><p>Now let’s start the process of deleting our cluster and EC2 instances :</p><p>For our cluster, run this command to delete it :</p><pre>eksctl delete cluster my-eks</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VA6wYAON6Syahpv90ESZmQ.png" /></figure><p>For the Instances, you can simply go back onto the AWS console and terminate the instances we created</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qqi6IZDW03rP6nf8GzKWMA.png" /></figure><p>Thank you for following along! This tutorial was definitely a long one but a necessary one. We were able to accomplish a lot and succeed.</p><p>👉🏽 Follow me on L<a href="https://www.linkedin.com/in/ilham-ismail-43b081250/">inkedln</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b826005f0fee" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/amazon-eks-deploy-nginx-using-kubernetes-b826005f0fee">Amazon EKS: Deploy Nginx using Kubernetes</a> was originally published in <a href="https://towardsaws.com/">Towards AWS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes: ConfigMaps & CronJobs]]></title>
            <link>https://towardsaws.com/kubernetes-configmaps-cronjobs-4dd9c41a4599?source=rss-c4aaed5de31------2</link>
            <guid isPermaLink="false">https://medium.com/p/4dd9c41a4599</guid>
            <category><![CDATA[configmap]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cronjob]]></category>
            <dc:creator><![CDATA[Ilham Ismail]]></dc:creator>
            <pubDate>Mon, 23 Jan 2023 15:39:45 GMT</pubDate>
            <atom:updated>2023-02-04T03:50:46.427Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*BMD1QTKx68aKzQxf.png" /></figure><p>In this guide, we will be covering how to use Kubernetes to spin up two deployments, each containing two pods running an Nginx image. We will also include a ConfigMap that points to a custom index.html page, where one deployment will have the text “This is Deployment One” and the other deployment will have the text “This is Deployment Two”.</p><p>We will then create a service that points to both deployments, allowing access to both using the same IP address and port number. To automate this process, we will also create a Kubernetes CronJob that runs at a specific time, spinning up both deployments and the service.</p><p>By the end of this guide, you will have the knowledge and tools to test and ensure that the CronJob is working as expected.</p><h4>Objectives:</h4><ul><li>First deployment contains 2 pods running the Nginx image</li><li>Include a ConfigMap that points to a custom index.html page that contains the line “This is Deployment One”</li><li>Second deployment contains 2 pods running the Nginx image</li><li>Include a ConfigMap that points to a custom index.html page that contains the line “This is Deployment Two”</li><li>Create a service that points to both deployments</li><li>Able to access both deployments using the same IP address and port number</li><li>At the end, add all the data under one Manifest file with a cronjob at the end to connect it all.</li></ul><h4>Let’s Begin!</h4><h4>Step 1: Create the Deployments with a Configmap on Each</h4><p>First, let’s write down the two deployments. Each deployment will contain two pods running the Nginx image. We will also include a ConfigMap that points to a custom index.html page.</p><p>Deployment 1 :</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: deployment-one<br>spec:<br>  replicas: 2<br>  selector:<br>    matchLabels:<br>      app: nginx-one<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx-one<br>    spec:<br>      containers:<br>      - name: nginx<br>        image: nginx<br>        ports:<br>        - containerPort: 80<br>        volumeMounts:<br>         - name: config-volume<br>           mountPath: /usr/share/nginx/html<br>      volumes:<br>      - name: config-volume<br>        configMap:<br>          name: config-one<br>---<br>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: config-one<br>data:<br>  index.html: |<br>    &lt;html&gt;<br>      &lt;body&gt;<br>        &lt;h1&gt;This is Deployment One&lt;/h1&gt;<br>      &lt;/body&gt;<br>    &lt;/html&gt;</pre><p>Deployment 2:</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: deployment-two<br>spec:<br>  replicas: 2<br>  selector:<br>    matchLabels:<br>      app: nginx-two<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx-two<br>    spec:<br>      containers:<br>      - name: nginx<br>        image: nginx<br>        volumeMounts:<br>        - name: config-volume<br>          mountPath: /usr/share/nginx/html<br>      volumes:<br>      - name: config-volume<br>        configMap:<br>          name: config-two<br>---<br>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: config-two<br>data:<br>  index.html: |<br>    &lt;html&gt;<br>      &lt;body&gt;<br>        &lt;h1&gt;This is Deployment Two&lt;/h1&gt;<br>      &lt;/body&gt;<br>    &lt;/html&gt;</pre><h4>Step 2: Service</h4><p>Now that we have our two deployments, we can write a service YAML file that points to both of them. The service will allow us to access both deployments using the same IP address and port number. Here is the YAML configuration file for the service:</p><pre>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: podnode<br>spec:<br>  type: NodePort<br>  selector:<br>    app: nginx<br>  ports:<br>  - port: 80<br>    nodePort: 30080</pre><h4>Step 3: Cronjob</h4><p>Let’s write our Cronjob in YAML.</p><pre>apiVersion: batch/v1<br>kind: CronJob<br>metadata:<br>  name: time<br>spec:<br>  schedule: &quot;*/1 * * * *&quot;<br>  jobTemplate:<br>    spec:<br>      backoffLimit: 1<br>      ttlSecondsAfterFinished: 30<br>      template:<br>        spec:<br>          containers:<br>          - name: time<br>            image: nginx:1.22.1-alpine<br>            imagePullPolicy: IfNotPresent<br>            args:<br>            - /bin/sh<br>            - -c<br>            - date; echo Hello there!<br>          restartPolicy: OnFailure<br>      parallelism: 1<br>      completions: 1<br>  concurrencyPolicy: &quot;Forbid&quot;<br>  successfulJobsHistoryLimit: 4<br>  failedJobsHistoryLimit: 3</pre><h4>Step 4: Create one Manifest file</h4><p>Now that we have our information, we will place them together in one Yaml File and created that file. It will be lengthy but it should look like this :</p><pre>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: deployment-one<br>spec:<br>  replicas: 2<br>  selector:<br>    matchLabels:<br>      app: nginx<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx<br>    spec:<br>      containers:<br>      - name: nginx<br>        image: nginx<br>        ports:<br>        - containerPort: 80<br>        volumeMounts:<br>         - name: config-volume<br>           mountPath: /usr/share/nginx/html<br>      volumes:<br>      - name: config-volume<br>        configMap:<br>          name: config-one<br>---<br>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: config-one<br>data:<br>  index.html: |<br>    &lt;html&gt;<br>      &lt;body&gt;<br>        &lt;h1&gt;This is Deployment One&lt;/h1&gt;<br>      &lt;/body&gt;<br>    &lt;/html&gt;<br><br>---<br>apiVersion: apps/v1<br>kind: Deployment<br>metadata:<br>  name: deployment-two<br>spec:<br>  replicas: 2<br>  selector:<br>    matchLabels:<br>      app: nginx<br>  template:<br>    metadata:<br>      labels:<br>        app: nginx<br>    spec:<br>      containers:<br>      - name: nginx<br>        image: nginx<br>        ports:<br>        - containerPort: 80<br>        volumeMounts:<br>        - name: config-volume<br>          mountPath: /usr/share/nginx/html<br>      volumes:<br>      - name: config-volume<br>        configMap:<br>          name: config-two<br>---<br>apiVersion: v1<br>kind: ConfigMap<br>metadata:<br>  name: config-two<br>data:<br>  index.html: |<br>    &lt;html&gt;<br>      &lt;body&gt;<br>        &lt;h1&gt;This is Deployment Two&lt;/h1&gt;<br>      &lt;/body&gt;<br>    &lt;/html&gt;<br>--- <br>apiVersion: v1<br>kind: Service<br>metadata:<br>  name: sernode<br>spec:<br>  type: NodePort<br>  selector:<br>    app: nginx<br>  ports:<br>    - port: 80<br>      targetPort: 80<br>      nodePort: 30080<br>---<br>apiVersion: batch/v1<br>kind: CronJob<br>metadata:<br>  name: time<br>spec:<br>  schedule: &quot;*/1 * * * *&quot;<br>  jobTemplate:<br>    spec:<br>      backoffLimit: 1<br>      ttlSecondsAfterFinished: 30<br>      template:<br>        spec:<br>          containers:<br>          - name: print-current-date<br>            image: nginx:1.22.1-alpine<br>            imagePullPolicy: IfNotPresent<br>            args:<br>            - /bin/sh<br>            - -c<br>            - date; echo Hello there!<br>          restartPolicy: OnFailure<br>      parallelism: 1<br>      completions: 1<br>  concurrencyPolicy: &quot;Forbid&quot;<br>  successfulJobsHistoryLimit: 4<br>  failedJobsHistoryLimit: 3</pre><p>Run this command to create our Cronjob:</p><pre>kubectl apply -f &lt;filename.yaml&gt;</pre><p>The output should look like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hAcdsl0P6Xi3PbRrwuDDCw.png" /></figure><h4>Step 5: Verify</h4><p>Let’s go through each item to see if it is running perfectly.</p><p>Let’s check on the deployments and configMaps by running these commands:</p><pre>kubectl get deployments<br>kubectl get cm</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mS0VZskkz_4HzIg8jTZ6HQ.png" /></figure><p>Let’s check on the Service and the cronjob by running these commands:</p><pre>kubectl get svc<br>kubctl get cronjobs</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1m5G6MO-Tg-q6s51uKuQWA.png" /></figure><p>lastly, let’s check on the logs of our cronjob but first we need to run the “get pods” command to get the pod number :</p><pre>kubectl get pods <br>kubectl logs &lt;pod name&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MHWNOTY1vpEXA940TQeaiQ.png" /></figure><p>Our Cronjob was a success!</p><p>And if we look to see if our deployments were success, run this command:</p><pre>localhost:&lt;NodePort&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3VzZeyfVIKp5eSORSPBTuQ.png" /><figcaption>Deployment-one is working</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eLxSvA_WMQJQe1b56iXyFQ.png" /><figcaption>Deployment-two is working</figcaption></figure><h4>Step 6: Delete and clean up!</h4><p>Now that we have confirmed everything is working as desired we can start cleaning up and deleting our deployments, configmaps, service and cronjob. Run these commands:</p><pre>kubectl delete deployment &lt;deployment name&gt;<br>kubcetl delete cm &lt;configmap name&gt;<br>kubectl delete service &lt;service name&gt;<br>kubectl delete cronjob &lt;cronjob name&gt;</pre><p>Thanks for following along! We were able to form a single Manifest file step by step and put it all together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4dd9c41a4599" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/kubernetes-configmaps-cronjobs-4dd9c41a4599">Kubernetes: ConfigMaps &amp; CronJobs</a> was originally published in <a href="https://towardsaws.com/">Towards AWS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Examining Kubernetes: Run Nginx Containers Using YAML File.]]></title>
            <link>https://medium.com/@IlhamIsmail1/run-nginx-containers-using-yaml-file-using-kubernetes-c4a773e0333c?source=rss-c4aaed5de31------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4a773e0333c</guid>
            <category><![CDATA[kubernetes-cluster]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[yaml]]></category>
            <category><![CDATA[command-line]]></category>
            <dc:creator><![CDATA[Ilham Ismail]]></dc:creator>
            <pubDate>Mon, 16 Jan 2023 21:51:56 GMT</pubDate>
            <atom:updated>2023-01-17T18:20:36.317Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b0lVc8ChIsTV8EKU.png" /></figure><p>In this tutorial, I will walk you through two types of ways to run Nginx containers on Kubernetes clusters using the CLI and a YAML file.</p><h4>Our objective:</h4><h4><strong><em>Part one</em></strong></h4><p>1.Create a deployment that runs the NGINX image.<br>2. Display the details of this deployment<br>3. Check the event logs from the deployment<br>4. Delete the deployment</p><h4>Part two</h4><p>1. Create the same deployment using a yaml file<br>2. Display the details of this deployment via the command line<br>3. Update the yaml file to scale the deployment to <strong>4</strong> N<strong>ginx containers</strong><br>4. Verify the change via the command line</p><h4>Prerequisites:</h4><h4><strong><em>Enable Kubernetes</em></strong></h4><p>You will need to enable Kubernetes on your Docker Desktop</p><ol><li>From the Docker Dashboard, select the <strong>Preferences</strong> icon.</li><li>Select <strong>Kubernetes</strong> from the left sidebar.</li><li>Click <strong><em>Enable Kubernetes</em></strong>, select the checkbox.</li><li>Select <strong>Apply &amp; Restart</strong> to save the settings and then click <strong>Install</strong> to confirm.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-FgaFpgvrC5bKUhZVmt0kg.png" /></figure><p>Head over to VSCode (Visual Studio Code), you will need to install the Kubernetes extension.</p><ol><li>Open the Extensions view (⇧⌘X) and search for “Kubernetes”.</li><li>Select the Microsoft <a href="https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools">Kubernetes</a> extension. And download</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5Dyc3ZL1NBlLjO9f_iyCQ.png" /></figure><h4><strong>Let’s get started!</strong></h4><p><strong>Step 1: Deployment using the CLI</strong></p><pre>kubectl create deployment pro17-deploy --image=nginx --replicas=4</pre><p>When you run the above command, you will see the following output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2fnZT8_BuKI8EqCqffqndg.png" /></figure><p>As you can see, our pro17-deploy was successfully created. Now let’s check it’s state and descriptions :</p><pre>kubectl get deployment<br>kubectl describe deployment pro17-deploy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jw-yVD-1p6vhKmEA38EXYA.png" /></figure><p>Perfect! Now let’s delete deployments, use the following command:</p><pre>kubectl delete deployment pro17-deploy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uP-LH5lY6A6ZYoth2ZjlCQ.png" /><figcaption>Goodbye</figcaption></figure><h4>Step 2: Deployment using Yaml</h4><p>First create a new directory and cd into that directory. Created a file in this directory</p><p>Afterwards run a yml file on vim :</p><pre>mkdir (name)<br>cd (name)<br>Touch (new file name)<br>vim my-pro17.yml</pre><p>After you are done writing everything you will need to save (:wq)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*t9iD_Y1XobGcm3_9lbajPA.png" /></figure><p>Now we need to run it using this command:</p><pre>kubectl apply -f my-pro17.yml</pre><p>Let’s check the deployment and also do a describe command to see more info. To do this, run the following commands:</p><pre>kubectl get pods<br>kubectl get deployments<br>kubectl get services</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xk506FhmCUAyjAF6pHjCig.png" /></figure><p>To delete the deployment, run this command:</p><pre>kubectl delete deployment my-pro17</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Of5muNtNVqwTNTLYGx9WiQ.png" /></figure><p>And that’s how you run the NGINX container on a local Kubernetes cluster!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4a773e0333c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create Docker NGINX Image and Push to AWS ECR]]></title>
            <link>https://medium.com/@IlhamIsmail1/create-docker-nginx-image-and-push-to-aws-ecr-61c3b9104beb?source=rss-c4aaed5de31------2</link>
            <guid isPermaLink="false">https://medium.com/p/61c3b9104beb</guid>
            <category><![CDATA[ecr]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Ilham Ismail]]></dc:creator>
            <pubDate>Tue, 10 Jan 2023 16:54:07 GMT</pubDate>
            <atom:updated>2023-01-10T16:54:07.276Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*jGo_xuOA1L8F8jWA" /></figure><p><strong>Our scenario:</strong></p><p><em>Your team needs you to deploy a custom image quickly and write a quick script in a file to accomplish a task. You will do a task that you may not have done before so make sure you research if you do not know-how.</em></p><p><em>1. Create your own image using Nginx and add a file that will tell you the date the container has been deployed</em></p><p><em>2. Deploy your container with port 8080 open</em></p><p><em>3. Save your container data to the AWS Elastic Container Registry (ECR)</em></p><h3><strong><em>Let’s get started!</em></strong></h3><h4>Step 1: Create a Directory</h4><p>Create a directory where you will save your HTML &amp; Dockerfile. To do this, we will use the following commands to make directory and then cd into said directory:</p><pre>mkdir &lt;DIRECTORY NAME&gt;<br>cd &lt;DIRECTORY NAME&gt;</pre><p>Afterwards, we need to pull Nginx from the Docker registry:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y8w4pWZTpquRKCPmG0VYow.png" /></figure><h4>Step 2: Create Dockerfile &amp; index.html</h4><p>I will be using VS code, under our newly created directory “docker16”, we will create a dockerfile and an index.html file.</p><p>Our Dockerfile will be very simple with a <em>FROM</em> step and <em>COPY</em> step. The FROM step will be the nginx image that will be downloaded from Docker hub. The COPY step will be the html file and the path where Nginx uses the index.html file from.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AIOR9nmcTmWrG1ZCmLDTOw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RKLvrj0nqx3kniyl6_GxFA.png" /></figure><p>Now that we have created these two files, let’s beginning building our image.</p><h4>Step 3: Build</h4><p>Ensure you are working in the correct directory, mine being “docker16”. Input the following command into the terminal in VS code.</p><pre>docker build -t docker-image .</pre><p>This will build the image from the Dockerfile in the current directory and tag it, name it, “docker-image”. Once it has completed, type in docker image ls . This will list the docker images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XSdbQ9PFcIrKmoWXAqca0g.png" /></figure><h4>Step 4: Deploy!</h4><p>Now that our Docker image is made, we can deploy our container. Run the following command in your terminal.</p><pre>docker run -d --name ilham-container -p 8080:80 docker-image</pre><p>Just to have a look at our containers you can put in docker ps . This will show the running containers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dQQUuWRifEdb97wlam0XMQ.png" /></figure><p>Now to see the website we can type in a browser <a href="http://localhost:8080/">http://localhost:8080</a> or we can open it from Docker desktop as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qIhOT59seWXJv8XEW7Ra3Q.png" /></figure><p>Click to see the website</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KJrQ8s9rEgowFb3sHdEoEg.png" /><figcaption>Perfect!</figcaption></figure><h4>Step 5: ECR</h4><p>To push the data to AWS ECR, we must first create a repository. Use the following command to initialize a new repository:</p><pre>aws ecr create-repository --repository-name project-16 --region us-east-1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5L7vXo6n2AJB7hgjaudQ_g.png" /></figure><p>We can confirm the creation of our repository, by checking in the AWS Console:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zlo6LiDXuGTAaoK7mXw7JQ.png" /></figure><h4>Step 5: Push</h4><p>So for Docker to push an image to ECR we first have to authenticate with a token. To get the token input the following command.</p><pre>aws ecr get-login-password --region us-east-1</pre><p>Copy down the output token. Now enter the following command including your URI and token.</p><pre>aws ecr --region us-east-1| docker login -u AWS -p &lt;encrypted_token&gt; &lt;repo_uri&gt;</pre><p>The output should say <em>Login Succeeded</em></p><p>Now we need to tag the image so it can be pushed to the repo. To do so enter the following command using your image name and ECR repository URI.</p><pre>docker tag docker-image &lt;target_ecr_repo_uri&gt;</pre><p>Finally input the following to push the local Docker image to the remote ECR repo.</p><pre>docker push &lt;ecr-repo-uri&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EqvgYU-KTOZVq7eLLiptXQ.png" /></figure><p>And if we go back to the AWS Console, we shall see our image in our repository</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ynv5J4m9aKaqGmSqRd4TdA.png" /></figure><p><strong><em>Congratulations, you just created a Docker NGINX image and pushed to ECR.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61c3b9104beb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to use Python to create and send messages to SQS using Lambda with an API Gateway trigger]]></title>
            <link>https://python.plainenglish.io/how-to-use-python-to-create-and-send-messages-to-sqs-using-lambda-with-an-api-gateway-trigger-9e1599bf1983?source=rss-c4aaed5de31------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e1599bf1983</guid>
            <category><![CDATA[aws-api-gateway]]></category>
            <category><![CDATA[boto3]]></category>
            <category><![CDATA[aws-lamdba]]></category>
            <dc:creator><![CDATA[Ilham Ismail]]></dc:creator>
            <pubDate>Mon, 02 Jan 2023 21:41:56 GMT</pubDate>
            <atom:updated>2023-02-03T16:31:43.749Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fNex0nBdkgCu6u98PW1t_Q.png" /></figure><h4><strong><em>Objective:</em></strong></h4><ol><li>Create a Standard SQS Queue using Python.</li><li>Create a Lambda function in the console with a Python 3.7 or higher runtime</li><li>Modify the Lambda to send a message to the SQS queue. Your message should contain either the current time or a random number. You can use the built-in test function for testing.</li><li>Create an API gateway HTTP API type trigger.</li><li>Test the trigger to verify the message was sent.</li></ol><p><strong><em>Let’s get started!</em></strong></p><p>Step 1: Make sure the IDE you are using has Boto3 installed so run this command on your terminal:</p><pre>pip install boto3</pre><p><strong>Step 2: Create your Queue</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qF74-H7uTdQS4eOc48ljHA.png" /></figure><p>We can verify that the SQS Queue was created by navigating to AWS console to ‘Amazon SQS’ and you’ll see the newly created queue:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gn7YaVRT3vFLVbo1y0XDAQ.png" /></figure><p><strong>Step 3: Create Lambda Function:</strong></p><p>Head to your Lambda dashboard then select <strong>Create Function. </strong>Make sure you<strong> </strong>select<strong> Author From Scratch and </strong>give it a name.</p><p>Select<strong> Python 3.8 </strong>and click<strong> Create Function.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KaVUSHDLq0VI5F-Pcj6Bug.png" /></figure><p>Now we want to update our permissions. Click on the <strong>role name</strong> and select <strong>Add Permissions</strong></p><p>Search <strong>SQS</strong> and attach <strong>full access</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K1hT_8xx0ByLMr-I9GFmJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FBeehGODLkBqMRtuCIwjPQ.png" /></figure><p><strong>Step 4: Modify the Lambda to send a message to the SQS queue</strong></p><p>In your Lambda dashboard, select <strong>Code </strong>and add the following code to your function(your own URL)</p><p>Select<strong> Deploy</strong> then<strong> </strong>select<strong> Test.</strong></p><p>Your execution results should show something similar to what I have below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rLJgnZiQrpIBMMuG9IzCyA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PVCWem9wHBZQvqNfSLa15g.png" /><figcaption>perfect!</figcaption></figure><p><strong>Step 5: Configure API Gateway Trigger:</strong></p><p>In your Lambda dashboard select <strong>Add Trigger</strong> then select <strong>API Gateway Trigger</strong> from the menu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fVZNlEAaifH-50dqxVH71Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cGbktVX967IHjdfSSWOHWA.png" /></figure><h4>Step 6: Test trigger to verify message was successfully sent</h4><p>In this step, we will add permission for our API Gateway to communicate with our Lambda function.</p><p>We need to give our API Gateway permission to communicate with our Lambda so click <strong>configuration</strong> then click <strong>permission.</strong></p><p>Click on the<strong> Role name </strong>and select <strong>Add permissions</strong></p><p>Choose <strong>Attach Policies </strong>and<strong> </strong>search for<strong> <em>AmazonAPIGatewayAdministrator </em></strong>and<em> </em>attach that policy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*layGb-bMtxSzz14XPLSmFQ.png" /></figure><p>Head back to Lambda and select <strong>configuration</strong> then select <strong>Triggers</strong>. You will see your API Gateway Endpoint. Click the URL and you will get a new tab that says “Processed.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MFjD0NubBJcfqi0ao1c7_g.png" /></figure><h4>Step 7: Check date and time in your Queue</h4><p>When you create the API endpoint, you will also see the date &amp; time will appear in the SQS queue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v9yI_U-RrKB592hAjvLg3g.png" /></figure><p>Click <strong>Send and Receive messages </strong>then <strong>Poll for Messages</strong>.</p><p>We can verify the date and time that the message was sent!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jKIK8A13dvPZMa8D.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jm0ePiYKCn7AO7oFUTM79A.png" /></figure><p>Well Done! You’ve just configured an API Gateway to trigger a Lambda function and send messages via SQS using Python!</p><p><em>More content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><em>.</em></p><p><em>Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a>, <a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><strong><em>, </em></strong><a href="https://www.youtube.com/channel/UCtipWUghju290NWcn8jhyAw"><strong><em>YouTube</em></strong></a><strong><em>, and</em></strong><em> </em><a href="https://discord.com/invite/GtDtUAvyhW"><strong><em>Discord</em></strong></a><strong><em>.</em></strong></p><p><strong><em>Build awareness and adoption for your tech startup with </em></strong><a href="https://circuit.ooo/?utm=publication-post-cta"><strong><em>Circuit</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e1599bf1983" width="1" height="1" alt=""><hr><p><a href="https://python.plainenglish.io/how-to-use-python-to-create-and-send-messages-to-sqs-using-lambda-with-an-api-gateway-trigger-9e1599bf1983">How to use Python to create and send messages to SQS using Lambda with an API Gateway trigger</a> was originally published in <a href="https://python.plainenglish.io/">Python in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create a highly available 3 tier AWS architecture]]></title>
            <link>https://towardsaws.com/how-to-create-a-highly-available-3-tier-aws-architecture-eecf11bed1d6?source=rss-c4aaed5de31------2</link>
            <guid isPermaLink="false">https://medium.com/p/eecf11bed1d6</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[3-tier-architecture]]></category>
            <category><![CDATA[auto-scaling-groups]]></category>
            <category><![CDATA[application-load-balancer]]></category>
            <category><![CDATA[ec2-instance]]></category>
            <dc:creator><![CDATA[Ilham Ismail]]></dc:creator>
            <pubDate>Sun, 13 Nov 2022 20:23:10 GMT</pubDate>
            <atom:updated>2023-04-10T14:09:27.843Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*WWCoWOqqoJgVdkR-1Rmc9Q.png" /></figure><h3>What is a three-tier architecture?</h3><p>A three-tier architecture is a software application architecture that organizes applications into three logical tiers. Historically, many applications used monolithic architectures, such that if a part failed the whole application would be affected.</p><p>The Web Tier, this the frontend tier which hold the user interface.</p><p>The Application Tier, this is where the data is processed and any computing logic typically occurs</p><p>The Database/DB Tier, this is where the data for the application is stored and managed.</p><h3>Prerequisites</h3><ol><li>An AWS account</li><li>An IAM user with admin level privileges</li></ol><h3>Objectives — Create the following:</h3><h4>Web Tier</h4><ol><li>2 public subnets</li><li>Minimum of 2 EC2 instances with an OS of your choice (free tier) in an Auto Scaling Group.</li><li>EC2 Web Server Security Group allowing inbound permission from the internet.</li><li>Bootstrap a static web page or create a custom AMI that already includes the static web page.</li><li>Create a public route table and associate the 2 public subnets.</li></ol><h4>Application Tier</h4><ol><li>2 private subnets</li><li>Minimum of 2 EC2 instances with an OS of your choice (free tier) in an Auto Scaling Group.</li><li>EC2 Application Server Security Group allowing inbound permission from the Web Server Security Group.</li><li>Associate with private route table.</li></ol><p><em>Note: This is not a true application tier as we don’t have any provided code to run on the EC2 instances.</em></p><h4>Database Tier</h4><ol><li>Use a free Tier MySQL RDS Database.</li><li>The Database Security Group should allow inbound traffic for MySQL from the Application Server Security Group.</li><li>2 private subnets.</li><li>Associate with private route table.</li></ol><h3>Let’s Begin!</h3><h4>Step 1: Create a custom VPC with 2 AZs, 1 public subnet and 2 private subnets per AZ</h4><ol><li>Create a VPC → Name: week-9-vpc CIDR range: 10.10.0.0/16</li><li>Click “Create VPC”</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R6RIHuroZ56S93yDVFB3vg.png" /></figure><p>2. Create an Internet Gateway → Attach it to the VPC</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xW9dB8-7Kz_JZAWTLLfulg.png" /></figure><p>3. Create 2 public subnets for the web tier, 2 private subnets for the app tier and 2 private subnets for the DB tier across two AZs (AZ-A: us-east-1a and AZ-B: us-east-1b)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2MR1uUEWDKdJYmmcA1zdIQ.png" /></figure><p>4. Create a Route Table for the public subnets</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FDWOe7b9LurNsK3EhBFeSQ.png" /></figure><p>5. Under Routes <strong>→</strong> Edit routes → Add route → configure a route to the Destination: 0.0.0.0/0 and Target : Internet Gateway and select the internet gateway you have created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1eNXE5OrXAZY5Pzy9j-hTA.png" /></figure><p>6. Under “Subnet Associations” select the public subnets web-a and web-b then click save associations</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q5MhPwsJHtKspSy-O8zf1Q.png" /></figure><p>7. Create private route tables with our VPC</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n08XxMzilI7FAQLScwxixA.png" /></figure><p>8. Associate the app tier subnets to the private route table</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*06PlWskaj5EoDCUzdj43Eg.png" /></figure><p>Lastly before you move on from the VPC part of this tutorial, we need to automatically assign any resources launched into the public subnets with IPv4 addresses</p><ul><li>Under VPC → Subnets select each public subnet (one by one), click on “edit subnet settings”. Under ”Auto-assign IP settings”, check the box for “ Enable auto-assign public IPv4 address” then click save.</li></ul><h3>Web Tier</h3><h4>Step 2: Create a Launch Template for the web tier EC2 instances</h4><ol><li>Navigate to EC2 → Launch template → create launch template</li><li>Name the Launch template <strong>web-week-9</strong></li><li>Under quick start → select the Amazon Linux 2 AMI</li><li>Instance type : t2.micro</li><li>Create a security group → Under Inbound security group rules allow SSH and HTTP traffic from anywhere</li><li>Under Advanced details → <strong>User data</strong> add bash script to bootstrap each instance</li></ol><pre>#!/bin/bash<br>sudo yum update -y<br>sudo yum install -y httpd<br>sudo systemctl start httpd<br>sudo systemctl enable httpd</pre><h3>Step 3: Create an Auto Scaling Group</h3><ol><li>Under Actions click on<strong> Create Auto Scaling group</strong></li><li>Give the ASG a name and click Next</li><li>Under Network → Select the <strong>week-9-vpc</strong></li><li>Under <strong>Availability Zones and subnets</strong> → Select the two public subnets (public-web-a &amp; public-web-b) in AZs <strong>us-east-1a</strong> and <strong>us-east-1b </strong>then click Next</li><li>Under Load balancing select <strong>Attach to a new load balancer</strong></li><li>Load balancer type: Application Load Balancer → Load balancer name: <strong>web-tier-ALB</strong> → Load balancer scheme: Internet-facing → Our VPC and Availability Zones and subnets have been already selected. They should be the public web tier subnets in the week-9-vpc</li><li>Under Default routing select <strong>Create a target group</strong> → the target group name is the name of the Load balancer</li><li>Under Group size set desired capacity to 2, minimum capacity to 2 and maximum capacity to 5</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w1hPr6yQoRw3U5Rf55FMVA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RIPZMDBZ2MEFa0TmUIbC3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*934WhAtt9ED2Oqi2qr9cQw.png" /></figure><p>Configure group size and scaling policies:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VALNaQFBLDes4KiO8iTnTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7l9RkJ7v7JUXNleI3b3q1w.png" /></figure><p>Go to your EC2 Instances and grab the Public IPv4 address and test your Apache Webpage:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XKVKR1fiJ2b6OUSq2gWiCg.png" /><figcaption>Perfect!</figcaption></figure><h3>App tier</h3><h4>Step 4: Create a NAT Gateway and Private Route</h4><ol><li>Navigate to VPC → NAT gateways → Create NAT gateway</li><li>Create a name for your NAT</li><li>Select a publiv Web tier subnet</li><li>Click on “Allocate Elastic IP”- it will generate automatically</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PpRuAZ8k07n8j14J0QhOtA.png" /></figure><p>5. Navigate to VPC → Route Tables → Select the <strong>private-week-9-rt</strong> that we created earlier</p><p>6. Click on Routes → Add route Destination: 0.0.0.0/0 and Target : NAT GATEWAY — select the Nat you created</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FkkL3yDcG-NuWlh8vVLniQ.png" /></figure><h4>Step 5: Create a Launch Template for the app tier EC2 instances</h4><ol><li>Name the Launch template <strong>app-week-9</strong></li><li>Select the Amazon Linux 2 AMI, Instance type: t2.micro</li><li>Create a Security Group to allow inbound SSH and ICMP traffic from the web tier Security Group</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ALWX_JpuduTWH_pEPCedBQ.png" /></figure><h4>Step 6: Create an Auto Scaling Group for the app tier</h4><ol><li>Create an Auto Scaling group → Name: app-ASG</li><li>Launch template: <strong>app-week-9</strong> then click next</li><li>Under Network → Select our VPC, select the private app tier subnets from the list (private-app-A and private-app-B)</li><li>Load balancer type: Application Load Balancer, Name: app-tier-ALB, Load balancer scheme: Internal</li><li>Create a target group then click next</li><li>Group size → Desired capacity: 2, Minimum capacity: 2, Maximum capacity 5 then click next</li><li>Review then click Create Auto Scaling Group</li></ol><h3>Database Tier</h3><h4>Step 7: Create a security group for the database tier</h4><ol><li>Configure the inbound rules to allow MySQL/Aurora traffic on port 3306 from the <strong>app tier’s security group </strong>this will allow traffic between the database tier and the application tier.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kn5u5VfZgzRkZ2NXPVnWxg.png" /></figure><h4>Step 8: Create DB subnet</h4><ol><li>Create a Subnet group for the Database tier</li></ol><ul><li>In the AWS Console, search “RDS” and click <strong>Subnet groups</strong> and <strong>Create DB subnet group</strong></li><li>Name your subnet group</li><li>Select your VPC</li><li>Select your Availability Zones &amp; subnets for your Database Tier</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pWlHsIeWufQf_VanVv2XYw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WDn0eaRw4XmW8CWPZySbyA.png" /></figure><h4>Step 9: Create an RDS MySQL database</h4><ol><li>Navigate to the RDS service</li><li>Click on Create a database, (we will choose the free tier)</li><li>For options and settings, select the following:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8D-NjVr8OCgJ4sHwolafsw.png" /></figure><ul><li>Under connectivity, use your VPC, select the subnet group we just created, and create a new VPC security group.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lgplH2qfB9uQc1lnBYVSmg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xuX7LQ_QWI7RjOAyJQGK5g.png" /></figure><p>Click “Create Database”</p><h4>Verify that you can ping the app tier from a web tier EC2 instance</h4><ol><li>SSH into a web tier instance → ping the app tier EC2 intances by running this command:</li></ol><pre>ping &lt;private IP address of private app instance&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3LFqjNSLl9oMDj2Iw0Jw-Q.png" /></figure><p>Congratulations! You’ve just built a three-tier architecture inside AWS!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eecf11bed1d6" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/how-to-create-a-highly-available-3-tier-aws-architecture-eecf11bed1d6">How to create a highly available 3 tier AWS architecture</a> was originally published in <a href="https://towardsaws.com/">Towards AWS</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>