<?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 Erika Anderson on Medium]]></title>
        <description><![CDATA[Stories by Erika Anderson on Medium]]></description>
        <link>https://medium.com/@Tech_E?source=rss-527abae8c848------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UfJA-CYw23JRc8IxL-yFBA@2x.jpeg</url>
            <title>Stories by Erika Anderson on Medium</title>
            <link>https://medium.com/@Tech_E?source=rss-527abae8c848------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 08:56:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Tech_E/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[Bridging RMF, DevOps, and Cloud Security: What It Really Takes to Secure Government Systems]]></title>
            <link>https://medium.com/@Tech_E/bridging-rmf-devops-and-cloud-security-what-it-really-takes-to-secure-government-systems-1657630f9f67?source=rss-527abae8c848------2</link>
            <guid isPermaLink="false">https://medium.com/p/1657630f9f67</guid>
            <category><![CDATA[nist]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[grc]]></category>
            <category><![CDATA[rmf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Erika Anderson]]></dc:creator>
            <pubDate>Tue, 15 Apr 2025 22:23:15 GMT</pubDate>
            <atom:updated>2025-04-15T22:23:15.219Z</atom:updated>
            <content:encoded><![CDATA[<p>When people hear “government cybersecurity,” they often picture outdated systems and paperwork-heavy processes. But the reality is that things are changing <em>quickly</em>. As agencies migrate to the cloud and adopt DevOps principles, there’s a growing need to blend traditional frameworks like RMF with agile, automated practices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*OGJCEoKMdLirCEuP.gif" /><figcaption>Is this the government’s pace?</figcaption></figure><p>In this article:</p><p>✅ I’ll explain how RMF, DevOps, and cloud security can come together in the federal space.</p><p>✅ How security professionals can stay ahead of the game.</p><h3>1. RMF: The Foundation of Federal Cybersecurity</h3><p>The <em>Risk Management Framework (RMF)</em>, defined by <em>NIST SP 800–37</em>, is the backbone of federal information security. It outlines a seven-step process that guides agencies in identifying, assessing, authorizing, and monitoring risks to their systems.<br> <br> These steps include: <em>Prepare, Categorize, Select, Implement, Assess, Authorize, and Monitor</em>.<br> <br>Each system that processes federal data <strong>must complete</strong> the RMF process to receive an <em>Authorization to Operate (ATO)</em>. Though it can feel heavy with documentation, RMF plays a crucial role in making security decisions and communicating risk.</p><h3>2. DevOps: Speed Meets Complexity</h3><p>DevOps encourages rapid, iterative software deployment through collaboration, automation, and shared responsibility. It’s essential to federal digital modernization — especially in agile projects and cloud-first mandates.<br> <br>But DevOps creates challenges for compliance. Security teams often struggle to keep up with the pace of change, and traditional RMF documentation can’t keep up with CI/CD pipelines. The key? The key is to embed security early and often.</p><p><em>…And from my experience, this is easier said than done (another article, another day).</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/0*Budmu2U5wfz9wSNl.gif" /><figcaption>Real footage of me at work. 🤭</figcaption></figure><h3>3. Cloud Security: The Shared Responsibility Model</h3><p>Agencies moving to AWS GovCloud or Azure Gov must navigate the cloud’s shared responsibility model. The cloud provider <strong>secures</strong> the <em>physical infrastructure</em>, but the agency is <strong>responsible for</strong> securing its <em>applications, configurations, data, and user access.</em><br> <br>Security tools like AWS Config, CloudTrail, and GuardDuty help teams meet compliance goals. What matters is mapping these cloud-native capabilities to RMF and NIST 800–53 controls. For example, enabling CloudTrail logs supports AU-12 (Audit Logs).</p><h3>4. Where It All Comes Together: DevSecOps in Government</h3><p>The future is DevSecOps — integrating security into every stage of development and operations while maintaining compliance.<br> <br> Examples of DevSecOps in action:<br> — Enforcing NIST 800–53 controls using Terraform Sentinel <br> — Running Checkov to scan infrastructure-as-code for compliance violations<br> — Automatically generating SSP documentation from IaC outputs<br> <br> This approach helps teams shift from a reactive, audit-driven model to a proactive, security-by-design mindset.</p><h3>5. Final Thoughts: Securing the Government of the Future</h3><p>If you’re working in federal cybersecurity, it’s no longer enough to know just RMF. The future of government security lies at the intersection of understanding frameworks, building automation, and securing cloud-native environments from the start.<br> <br> Whether you’re a security analyst, GRC lead, or cloud engineer — this is your chance to bridge the gap and lead the change!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1657630f9f67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Utilize Terraform Cloud as a CI/CD Tool]]></title>
            <link>https://medium.com/@Tech_E/utilize-terraform-cloud-as-a-ci-cd-tool-584f7422ccf3?source=rss-527abae8c848------2</link>
            <guid isPermaLink="false">https://medium.com/p/584f7422ccf3</guid>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[terraform]]></category>
            <dc:creator><![CDATA[Erika Anderson]]></dc:creator>
            <pubDate>Sat, 12 Nov 2022 12:53:51 GMT</pubDate>
            <atom:updated>2022-11-12T12:53:51.655Z</atom:updated>
            <content:encoded><![CDATA[<p>We will create a highly available two-tier AWS architecture using Terraform Cloud as a CI/CD Tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FL2xsDzxRyGDVf8-eskAZw.png" /></figure><p><strong>Objective:</strong></p><ol><li>Create a highly available two-tier AWS architecture.</li></ol><ul><li>3 Public Subnets</li><li>3 Private Subnets</li><li>Auto Scaling Group for Bastion Host (private subnets)</li><li>Auto Scaling Group for Web Server (in private subnets)</li><li>Internet-facing Application Load Balancer targeting Web Server Auto Scaling Group</li></ul><p>2. Deploy this using Terraform Cloud as a CI/CD tool to check your build.</p><p>3. Use module blocks for ease of use and re-usability.</p><p><strong>Prerequisites: </strong>Understanding of<strong> </strong>AWS Cloud9, AWS CLI, AWS key pairs, Github, and Terraform.</p><p><strong>Optional:</strong> Fork my Github <a href="https://github.com/Tech-E22/Two-tier.git">repo</a>.</p><p><em>Let’s get started..</em></p><p>We are going to set up our Terraform Organization and workspace in the Terraform Cloud Platform. We will select the version control workflow option and then connect to our GitHub account and select the repo we created for our project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*TayorOMUZchdcTTqbUo1MA.png" /><figcaption>Organization and workspace created</figcaption></figure><p>We will use our AWS key pair and set up variables. The variables are marked as env for environment variable. The variable name part of the format is the same as the variables declared in the variables.tf file in our code. There will be a Key column and then Value column, where our Value column will be marked as sensitive, except the AWS default region.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OZif6n-Nh-Bxxn4hf5Kz0Q.png" /><figcaption>Example screenshot for variable configuration location</figcaption></figure><p>Then we will<strong> </strong>Terraform run, plan, and apply. Several times my plan would not trigger Terraform cloud, so I had to step back, check, and verify my code. Were there any spacing, syntax, provider, and/or core error issues? Once our plan is successful we will be prompted to click Confirm &amp; Apply.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*U3WlUyd4LK7FYK5aVnKe3w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*vqpFyqWNEUJGnXoD6vyGXQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*SUAiOiwuxLAGV_it517FIA.png" /></figure><p>We navigate to our AWS CLI to verify that we have three public and three private subnets with auto scaling group for the private and the public subnet. Then we verify that we have an internet facing application load balancer targeting web server auto scaling group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*RDmDmEJZ7MZVCD5aWLDPgQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*pqj6DGgaNUEK9FZib9RuLw.png" /><figcaption>web servers and bastion</figcaption></figure><p>After verifying all works well. You can then play around and edit resources like your autoscaling group capacity or number of subnets. Either way, it should trigger terraform cloud once you commit the code to your Github repo. We then destroy the infrastructure by heading to Workspace Settings, click Destruction and Deletion, make sure the allow destroy plans is ticked, and then verify by writing the workspace name in box to begin destruction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/267/1*Ow2ZGmAQ1jx87YR6BtkUIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*-19Wki7-Oen4rBBz0KQz6g.png" /></figure><p>Congratulations we are finished!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*mc_zS9y2dZdbKwzGYfLkzg.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=584f7422ccf3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a not so Terra-fying Terror-form Module]]></title>
            <link>https://code.likeagirl.io/create-a-not-so-terra-fying-terrorform-module-ddb2e067fd62?source=rss-527abae8c848------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddb2e067fd62</guid>
            <category><![CDATA[infrastructure-as-code]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Erika Anderson]]></dc:creator>
            <pubDate>Sat, 22 Oct 2022 22:29:04 GMT</pubDate>
            <atom:updated>2022-10-26T22:55:33.009Z</atom:updated>
            <content:encoded><![CDATA[<p>This will be a short and not so t<em>erra</em>-fying tale on how I created a custom Terraform module for an EC2 instance with an Amazon Linux 2 AMI ID in the not so spookiest conditions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mJf0uxgh7ejETF86Q3vk0Q.png" /></figure><p><strong>Objective:</strong></p><p>🦇 Fork and clone this <a href="https://github.com/LevelUpInTech/terraformec2">repository</a>.<br>🦇 Create a custom module for EC2 out of the resource block that you can use as repeatable infrastructure.<br>🦇 Push the new created module and the ec2.tf to your repository.</p><p><strong>Prerequisite</strong>:</p><p>👻 Github, Terraform <a href="https://developer.hashicorp.com/terraform/docs">documentation</a> and <a href="https://registry.terraform.io/">registry</a>, AWS account, and AWS Cloud9.</p><p><strong>Let’s begin creating this not so<em> terra</em>-fying <em>terror</em>form module…</strong></p><p>First, I forked and cloned the ec2.tf to my repository as requested.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*XgjYAhkkofRQINlPsctSfw.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e0055d7a6d0202105f34194125975ab/href">https://medium.com/media/0e0055d7a6d0202105f34194125975ab/href</a></iframe><p>I then created files using $touch in my cloned directory: providers.tf, main.tf, variables.tf, outputs.tf. An example of some of the .tf files below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*UmP0_Cn9QMMkZdjSwgVYUA.png" /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6cc0aeddb536776196b4f87315c53483/href">https://medium.com/media/6cc0aeddb536776196b4f87315c53483/href</a></iframe><p>In previous articles, I have shared a little bit about the files created. For this not so t<em>erra-fying tale,</em> I will give you a short synopsis of the outputs.tf. On the command line, output values make information about your infrastructure accessible and can expose data that other Terraform setups can utilize. In computer languages, return values and output values are comparable.</p><p>Next, I created the module.tf after creating a directory in my root directory. Once all files were created, I initialized Terraform by using terraform init. Then I ran terraform plan, which allows you to preview the actions Terraform would make to modify your infrastructure. I then ran terraform validate, which validates the configuration files in a directory. Lastly, terraform apply<strong> </strong>carries out the planned changes to each resource using the relevant infrastructure provider’s API. I had to verify by typing yes to confirm.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b04f4c7efbfab1e55492b4f9f8e8d654/href">https://medium.com/media/b04f4c7efbfab1e55492b4f9f8e8d654/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tNkm2lj1xViTHCldZmx7UQ.png" /></figure><p>My resource was created and I verified on AWS console, just to make sure. Once verified, I used terraform destroy , to destroy the resources. Lastly, I created a .gitignore file to make sure that Git only pushes the files that were first produced, preserving the reusability of my code, and ignore any files that were created automatically when I applied the infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*aftZVsIaneYMIvsaQSCFsg.png" /></figure><p>Then the most <em>terra</em>-fying error took place:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C4AAyy-3ff8CYxvrD0j2ig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*5C0lKn7uERwwFJTTdg7Pdg.gif" /></figure><p>After a few hours of checking <a href="https://stackoverflow.com/">Stack Overflow</a>, googling, running various commands, checking my code, etc — I decided to message my team to help point me in the right direction. One of my team members mentioned the .gitignore file and the file that was too large. I took the information and went back to business. As more hours passed by, the Terra Gods and Git Gods, decided they would work in my favor! I pushed the new created module and the ec2.tf to my repository!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*BsDMOi1eIYTHJsF29mSL-Q.gif" /></figure><p>The struggle is real. Thank you for reading!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddb2e067fd62" width="1" height="1" alt=""><hr><p><a href="https://code.likeagirl.io/create-a-not-so-terra-fying-terrorform-module-ddb2e067fd62">Create a not so Terra-fying Terror-form Module</a> was originally published in <a href="https://code.likeagirl.io/">Code Like A Girl</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 Generate an Amazon ECS Cluster using Docker Image with Terraform]]></title>
            <link>https://medium.com/@Tech_E/how-to-generate-an-amazon-ecs-cluster-using-docker-image-with-terraform-23396b7fc4f7?source=rss-527abae8c848------2</link>
            <guid isPermaLink="false">https://medium.com/p/23396b7fc4f7</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[centos]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Erika Anderson]]></dc:creator>
            <pubDate>Sat, 15 Oct 2022 17:18:30 GMT</pubDate>
            <atom:updated>2022-10-23T04:51:36.482Z</atom:updated>
            <content:encoded><![CDATA[<p>A short walk through on how to pull a CentOS image from the Docker registry and create an ECS cluster using the Docker image with Terraform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BBYPY_ZjoDtuBiYQcETB6A.png" /></figure><p><strong>Objective: </strong>Deploy a Docker container with a CentOS image.</p><p><strong>Prerequisites: </strong>Terraform &amp; Docker installed, AWS account, AWS CLI, and Cloud9.</p><p><strong>Resources</strong>: Everything you need for the walk through can be found <a href="https://www.terraform.io/docs">here</a>. Occasionally, when I come across an error, I end up on <a href="https://stackoverflow.com/">Stack Overflow</a>. Be sure to bookmark Stack Overflow, as it will be one of your besties outside of Google.</p><p><em>Now on to the good stuff…</em></p><p><strong>First, create directory and .tf files. </strong>I created a new directory and in this directory you will have all of your terraform files for this project. To make the directory use mkdir and to navigate to the directory use cd. Then I created all my files main.tf, variables.tf, vpc.tf, subnets.tf, keys.tvars. I then used the touch command and added Docker and AWS as the providers and the AWS ECS cluster resource and Fargate module to the main.tf file.</p><p>The variables.tf file consists of the VPC, access key and secret access key. The vpc.tf consists of the VPC tag name. The same applies for subnet.tf except it is the tag name for the subnets, VPC name, with the addition of availability zones, etc. Lastly the keys.tvars holds the <em>secret sauce, </em>you won’t ever share this information and that is the access keys and secret keys.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d84c114d7f50fdfe83c5a808a9413828/href">https://medium.com/media/d84c114d7f50fdfe83c5a808a9413828/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d7dfd4e72c2517b0159ebfd4ce23441/href">https://medium.com/media/9d7dfd4e72c2517b0159ebfd4ce23441/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5804f263d08fabd36648ddbcf69fdd93/href">https://medium.com/media/5804f263d08fabd36648ddbcf69fdd93/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c6b8754eab98d379eb79f5a70c8ec8f/href">https://medium.com/media/8c6b8754eab98d379eb79f5a70c8ec8f/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5840f15057461d3345b9ea50c245a4bf/href">https://medium.com/media/5840f15057461d3345b9ea50c245a4bf/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8HhX5UMV9vj6T2_8xF6GLw.png" /></figure><p>Next, I used terraform init to initialize Terraform. I then used terraform plan to check out a preview of the actions Terraform would use to modify the infrastructure and lastly I used terraform fmt and terraform validate, which is used to rewrite Terraform configuration files and validate the configuration files in a directory.</p><p>On my first attempt, I had an error and immediately transitioned into investigative mode, using the resources stated at the beginning of this article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*MuX53ktIg0p_I22DgHs27w.png" /></figure><p>According to my research, something went wrong in the authorization process, but once that was corrected, I re-performed terraform plan, fmt, and validate again. Once I verified the configuration was correct, I then used Terraform apply<strong>. </strong>This<strong> </strong>carries out the planned changes to each resource using the relevant infrastructure provider’s API and will verify by having you type yes to confirm. To terraform applychanges without having to type ‘yes’, you can try terraform apply -auto-approve. I haven’t tried it yet, but it would be useful in automation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*pipesnZiF0gUMyxu77C8og.png" /></figure><p>I then checked to make sure all the resources were working properly on my AWS console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*MaUyntUf4hErriko8VGgeA.png" /></figure><p>There’s nothing like the sweet smell of SUCCESS!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*fAMlwyM9tqFYzB-St8dK8w.gif" /></figure><p>Lastly, I used terraform destroy to end all resources. For other ways to use the command, destroy click <a href="https://www.terraform.io/cli/commands/destroy">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*rIQyw7vStDA-oWWOrZDHkA.png" /></figure><p>Thank you for reading!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23396b7fc4f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy a Two-Tier Architecture with Terraform]]></title>
            <link>https://blog.devops.dev/deploy-a-two-tier-architecture-with-terraform-4e28582146?source=rss-527abae8c848------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e28582146</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <dc:creator><![CDATA[Erika Anderson]]></dc:creator>
            <pubDate>Sat, 08 Oct 2022 20:41:42 GMT</pubDate>
            <atom:updated>2022-10-11T14:07:30.093Z</atom:updated>
            <content:encoded><![CDATA[<p>I will create a diagram and deploy a two-tier architecture. All of my code will be in a single main.tf file (known as a monolith) with hardcoded data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fct5qEYkOHaAHfEe0084fw.png" /></figure><p><strong>Objectives:</strong></p><ol><li>Deploy a VPC with two public and private subnets. Each public and private subnet should be in a different AZ for high availability.</li><li>Create an RDS MySQL instance (micro) in one of the subnets.</li><li>A load balancer that will direct traffic to the public subnets and an EC2 instance in each public subnet.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*ptbw6427dNteolcbEPo6gQ.png" /></figure><p><strong>Prerequisites:</strong></p><ol><li>Terraform <a href="https://registry.terraform.io/">documentation</a></li><li>Integrated development environment (IDE) of choice</li></ol><p><strong>Let’s begin:</strong></p><p>The IDE I used was AWS Cloud9. I created a new directory and cd into the directory. I then touch main.tf, which creates the main.tf file in the directory, so I could begin creating the two-tier architecture. First, I initialized Terraform by using terraform init, I then began to identify the provider, create the VPC with the two public and private subnets, create the internet gateway and route table, security groups, EC2 Instances, application load balancer (ALB), and RDS MySQL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*HYLSSeaKbc4KuOlvFyfhjQ.png" /></figure><p>With this being my first time really working in Terraform to this extent, I made a lot of beginner mistakes and did not utilize or know “best practices”. As I was writing the code it would have been best to use terraform validate every so often, so I can know of my mistakes earlier rather than later. As you can imagine I had many errors, to the point where I quickly became discouraged as I sat looking through the Terraform documentation, Stackoverflow, and my Terraform coursework and exercises.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/403680c5488972bd6ec9221efcc41f26/href">https://medium.com/media/403680c5488972bd6ec9221efcc41f26/href</a></iframe><p>After completion of main.tf, I ran terraform plan, which allows you to preview the actions Terraform would make to modify your infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/549/1*ahwGFmOZI95TfdNBSo09Pg.png" /></figure><p>I then ran terraform validate, which validates the configuration files in a directory. Terraform apply<strong> </strong>then carries out the planned changes to each resource using the relevant infrastructure provider’s API and will verify by having you type yes to confirm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*qRN7FKH3FMaWFDQW1E9GIA.png" /></figure><p>After confirming the infrastructure on AWS Console:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*XFKhQtLaIi_7m9yStImxDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MaeYL_Pk0Aph6yep9R2EgA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*IclYqCteMLMe1NWSJ8-t_A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*jBdlMRrXWBvp1wfv17ulXA.png" /></figure><p>I use terraform destroy, which terminates all the resources specified in your Terraform state.</p><p>I pat myself on the back and celebrate!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*r16oqlAUjil-ABBiyXThCg.gif" /></figure><p>Thank you for reading!</p><p>For an additional resource that explains for terraform destroy well. Please see <a href="https://spacelift.io/blog/how-to-destroy-terraform-resources">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e28582146" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/deploy-a-two-tier-architecture-with-terraform-4e28582146">Deploy a Two-Tier Architecture with Terraform</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Use a YAML File for Multiple Kubernetes Deployments]]></title>
            <link>https://medium.com/@Tech_E/use-a-yaml-file-for-multiple-kubernetes-deployments-37d754f8ec27?source=rss-527abae8c848------2</link>
            <guid isPermaLink="false">https://medium.com/p/37d754f8ec27</guid>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[yaml]]></category>
            <dc:creator><![CDATA[Erika Anderson]]></dc:creator>
            <pubDate>Sun, 02 Oct 2022 16:57:18 GMT</pubDate>
            <atom:updated>2022-10-02T16:57:18.576Z</atom:updated>
            <content:encoded><![CDATA[<p>In this short tutorial we will walk through deploying multiple Kubernetes NGINX using a YAML file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7EbUe_XI0M0fNuJFesRazQ.png" /></figure><p><strong>Objectives:</strong> Create the same deployment using a yaml file (see previous article <a href="https://medium.com/@Tech_E/how-to-deploy-kubernetes-nginx-using-the-command-line-4216bd379a6a">here</a>). Display the details of the deployment via the command line<br>and update the yaml file to scale the deployment to four NGINX containers<br>and verify the change via the command line.</p><p><strong>Prerequisites: </strong>Docker Desktop and Kubernetes installed via settings of the Docker Desktop.</p><p>First, we will create the same deployment as my previous article, but this time we will create a new folder and cd into the directory. Then we will create the YAML file. I called mine nginx.yml and used kubectl apply -f nginx.yml to run it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/763e12e36a153a6dc34ebc816b578ee1/href">https://medium.com/media/763e12e36a153a6dc34ebc816b578ee1/href</a></iframe><p>To make sure we are running four NGINX containers as stated in the objectives, I typed kubectl describe deployment nginxe. Below, we can see there are four.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v_ZH7MJ0Zd8mW4ryNzZBkA.png" /></figure><p>I run the following commands to make sure everything is running as it should kubectl get pods, kubctl get deployments, and kubctl get services . Lastly, we must check to make sure we get a response from localhost with curl localhost:80.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u_aHhxz0wWG-tZEplgD1jg.png" /></figure><p>Success!!</p><p>I deleted my deployment with kubectl delete deployment &lt;deployment name&gt;</p><p>Thank you for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37d754f8ec27" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Deploy Kubernetes NGINX using the Command Line Interface]]></title>
            <link>https://blog.devops.dev/how-to-deploy-kubernetes-nginx-using-the-command-line-4216bd379a6a?source=rss-527abae8c848------2</link>
            <guid isPermaLink="false">https://medium.com/p/4216bd379a6a</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Erika Anderson]]></dc:creator>
            <pubDate>Wed, 28 Sep 2022 04:09:46 GMT</pubDate>
            <atom:updated>2022-10-03T18:06:16.876Z</atom:updated>
            <content:encoded><![CDATA[<p>In this short tutorial we will walk through deploying Kubernetes NGINX from the command line interface (CLI).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gefrEyJmM3-IMiuwZzQQrg.png" /></figure><p><strong>Objectives:</strong> Using the command line create a deployment that runs the NGINX image. Display the details of the deployment, check the event logs from the deployment, and then delete the deployment.</p><p><strong>Prerequisites: </strong>Docker Desktop and Kubernetes installed via settings of the Docker Desktop.</p><p><strong>What is Kubernetes?</strong></p><p>Kubernetes is an open source platform for managing containerized workloads and services.</p><p><strong>Step 1</strong>: Open your CLI and type kubectl create deployment — image nginx &lt;deployment name&gt;. This will create the deployment of NGINX. Then type kubectl describe deployment &lt;deployment name&gt;, so you can see the description details in the CLI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FtobhgAR1yAo-0hJ9anFcg.png" /></figure><p><strong>Step 2:</strong> We want to see how many pods are running and replicasets, which ensures there is always a stable set of running pods for a specific workload. Type the following command kubectl get podsand kubectl get replicasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*SKM28IPaH25DWSoc3nesaw.png" /></figure><p><strong>Step 3:</strong> We want to view the logs of the deployment so we type kubectl logs /&lt;deployment name&gt;command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cEDnk9TQwLeFd5N4wdNrFQ.png" /></figure><p>Step 4: Lastly, we will delete the deployment with kubectl delete deployment &lt;deployment name&gt;.</p><p>Congratulations! We have successfully created a deployment that runs the NGINX image and the rest of the objectives in this tutorial.</p><p>Thank you for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4216bd379a6a" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/how-to-deploy-kubernetes-nginx-using-the-command-line-4216bd379a6a">How to Deploy Kubernetes NGINX using the Command Line Interface</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</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 Deploy a Custom Docker Image via AWS Cloud9]]></title>
            <link>https://code.likeagirl.io/how-to-deploy-a-custom-docker-image-via-aws-cloud9-df2d3c4b4265?source=rss-527abae8c848------2</link>
            <guid isPermaLink="false">https://medium.com/p/df2d3c4b4265</guid>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[cloud-services]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[nginx]]></category>
            <dc:creator><![CDATA[Erika Anderson]]></dc:creator>
            <pubDate>Sat, 24 Sep 2022 18:09:52 GMT</pubDate>
            <atom:updated>2022-09-28T01:53:11.264Z</atom:updated>
            <content:encoded><![CDATA[<p>In this tutorial I will deploy a custom image in AWS Cloud9 and then save the container data to AWS Elastic Container Registry (ECR).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dUR8HClxUp3fnm5MoWSaHA.png" /></figure><p><strong>My objective: </strong>create an image using NGINX and add a file that will tell the date the container has been deployed. I will deploy my container with port 8080 open and then save my container data to the AWS Elastic Container Registry (ECR).</p><p><strong>The prerequisites: </strong><a href="https://aws.amazon.com/console/">AWS Management Console</a>, Cloud9 (my preference), and the <a href="https://docs.docker.com/engine/reference/builder/">Docker reference</a> information.</p><p><strong>Preface:</strong> I started and ended this tutorial many times in a 24 hour span due to errors on my end, having to research, go over docker references and guidance a couple times. Below I will go over a few examples on the various ways you can complete some of the steps and a few explanations along the way.</p><p><strong>What is Docker, AWS ECR, and NGINX: </strong>Docker is an open source container technology that simplifies building, running, managing, and distributing applications. AWS ECR is a container image registry that can store or manage your Docker images. NGINX is open source software web server.</p><p><strong>Step 1:</strong> I created the directory for the files in this tutorial by making a folder and file in cloud9. I named my directory nginx, created Dockerfile file and index.html file. Docker needs to be able to find your file, so it’s imperative to capitalize the D for Dockerfile<em>. </em>Alternate ways you can make your directory and files in Cloud9 or your terminal is mkdir &lt;directory&gt;. I updated the inbound for my security group used for Cloud9 to allow my IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*WKoplJc9ji7ujK5SDHpnwA.png" /></figure><p><strong>Step 2:</strong> I cd &lt;directory name&gt;from Cloud9 and then pulled the NGINX image using docker pull nginx or docker pull nginx:latest</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*F_fOhUmdI2zjE0yENWJVuQ.png" /></figure><p><strong>Step 3:</strong> I create custom image from Dockerfile and then I continue to build docker container. Use docker build -t &lt;custom image name&gt; .The -t is used to tag my new image. The . is imperative in this command because it tells Docker to build the image from the directory I made. Then I use docker run -d --name &lt;container name&gt; -p 8080:80 &lt;custom image&gt; and docker ps to confirm the custom image was made. The -d will run the container in a detached state in the background and -p will allow me specify the port I want open.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*Yp8I6iuyRpKtZoEV_rx4yg.png" /></figure><pre>index.html file you can use (make sure to format and change colors unless you want pink.)</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8159880d60875fac753f08031f1d2220/href">https://medium.com/media/8159880d60875fac753f08031f1d2220/href</a></iframe><p><strong>Step 4: </strong>I verified the new image and creation date by going to the EC2 dashboard and copying the pubic url and pasting it another tab by using :8080 after the url. Alternative ways to check the creation date would be to utilize the index.html above or grep. I can look for the custom docker image through the command line or terminal using docker inspect nginx | grep -i created &gt; created.txt and then cat created.txt and I will see the date the custom image is made.</p><p>Step 5: I saved my date to AWS ECR using aws ecr create-repository — repository-name &lt;container name — region &lt;your region&gt; where I get an output with the repository information, name, and creation date. Next, I navigate to the ECR dashboard to view push commands because my repository was inactive. I then followed the steps AWS provides to authenticate my image, skipping step 2 because my image has been built already. When I go back to the ECR dashboard I see my latest version and can access it anytime I need too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*o6bgAtCED5F3wJ-sdvB_Yw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*GDfwx5I9orZp76XtLNjqOw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*4UWOM-IfNRopHveIQs97Aw.png" /></figure><p>After I successfully built my Docker container and custom image in Cloud9, I run commands to stop and remove containers and images.</p><p>Thank you for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df2d3c4b4265" width="1" height="1" alt=""><hr><p><a href="https://code.likeagirl.io/how-to-deploy-a-custom-docker-image-via-aws-cloud9-df2d3c4b4265">How to Deploy a Custom Docker Image via AWS Cloud9</a> was originally published in <a href="https://code.likeagirl.io/">Code Like A Girl</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting started with Lambda and SQS]]></title>
            <link>https://towardsaws.com/working-with-lambda-and-sqs-e22774cd9dfc?source=rss-527abae8c848------2</link>
            <guid isPermaLink="false">https://medium.com/p/e22774cd9dfc</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <dc:creator><![CDATA[Erika Anderson]]></dc:creator>
            <pubDate>Wed, 14 Sep 2022 06:50:53 GMT</pubDate>
            <atom:updated>2022-09-14T14:19:40.717Z</atom:updated>
            <content:encoded><![CDATA[<h4>API Gateway to trigger a Lambda function to send messages via SQS.</h4><p>Hello everyone!</p><p>I am back with a new tutorial!</p><p>In this article we are going to create an AWS Simple Queue Service (SQS) utilizing Python and AWS Cloud9, which is my current preferred choice Integrated Development Environment (IDE). Y<em>ou can use whichever IDE you prefer.</em></p><p>We will then create a Lambda Function that is going to send a message to our SQS Queue, that will display the current date and time for when the API Gateway we set up was triggered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*Up5gV3BDiZVHq0ybL2JZ3g.png" /></figure><h4><strong>Objectives:</strong></h4><p>1) Create a Standard SQS Queue using Python.<br>2) Create a Lambda function in the console with a Python 3.7 or higher runtime <br>3) 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.<br>4) Create an API gateway HTTP API type trigger.<br>5) Test the trigger to verify the message was sent.</p><p><strong>Prerequisites: </strong>An AWS account that already has permissions, and if you are using another IDE, make sure to use code below:</p><pre>pip3 install awscli<br>pip3 install boto3</pre><p><strong>Step 1: </strong>We will make an SQS Queue in Cloud9 using the Python script below. SQS acts a temporary repository for messages. After we run the script, we check to make sure the SQS was created in the AWS console.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ec8b01c74e7ae03446d70c7e09cf416c/href">https://medium.com/media/ec8b01c74e7ae03446d70c7e09cf416c/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*L8UFD-q4mZwGh5vVlZ-mrg.png" /><figcaption>Script in Cloud9</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*rhx0TG_rvApPT41rCX2CUA.png" /><figcaption>Ran Results</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*FNsZrZlDdWbly5SjFxoNzw.png" /><figcaption>SQS in AWS Console</figcaption></figure><p><strong>Step 2: </strong>Create the Lambda Function that will send the message to SQS. Lambda will allow us to send a message to our SQS. We choose <em>author from scratch </em>and name our function, we then select <em>Python 3.8 </em>and leave the rest on <em>default</em>. We then create a new <em>IAM role </em>to have basic lambda permissions, add<em> Amazon SQS full access </em>(only for the purpose of this article).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*o48k4knJtYB6VeLkLEZ9ow.png" /><figcaption>Creating Lambda Function</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*HX6DFxfDMxCDsoUcKlNZmg.png" /><figcaption>Configure IAM</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*-_FFwt4-aNDpXlawS_7-JQ.png" /><figcaption>Add Policy</figcaption></figure><p><strong>Step 3: </strong>We will navigate back to Lambda so we can send a message to SQS queue. The message we want to send will contain the current date and time. You will need your url that you made for the SQS for the code below. We then click <em>deploy</em> and then<em> test</em> to configure a test event. We create a new event and name it. We keep the event sharing settings <em>private </em>and use the <em>apigateway-aws-proxy. </em>We then <em>save</em> and <em>test</em> to see the output.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/221191d33a0615fc31b7cd1f09d36762/href">https://medium.com/media/221191d33a0615fc31b7cd1f09d36762/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*Evb3ZpazJ4FUX9nYNu-JcA.png" /><figcaption>Code source in Lambda AWS Console</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*ZBjOm0_EWH8lL2rgHKHN-g.png" /><figcaption>Create new event</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QMG74xeizZrh5ijkq5XTMA.png" /><figcaption>Test</figcaption></figure><p><strong>Step 4:</strong> Configure API Gateway and test trigger to verify message has successfully sent. API Gateway sits between the client and backend services to deliver requests and responses like a messenger. We will navigate to the Lambda console and add <em>API Gateway Trigger,</em> click <em>HTTP API</em>, open, click additional settings and choose your <em>API name</em>, keep as default and add trigger. We will then add permission for the API Gateway to be able to speak to the lambda function we created using the same process as step 2, except we will choose <em>Amazon API Gateway Administrator</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*eVRNeteh7EcmSAicdAbrHQ.png" /><figcaption>API Gateway Trigger</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*gVThnA8fMSdDuZSwUT5Vew.png" /><figcaption>API Gateway permissions</figcaption></figure><p>Once that is complete, we will head back to Lambda and click on <em>configure</em>, <em>triggers</em>, and then click the <em>API url</em>. Once the window pops up it should say <em>“Processed”</em>. We then go to SQS and see the date and time in our SQS queue. We click on the <em>send and receive messages</em> and then <em>poll for messages button</em>. Once you click the message, a verification of date and time will pop up!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*PBrdyBKcshXi-PHs32YiUA.png" /><figcaption>API url</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*rXL2YVKqIYu-UwKprzKi9g.png" /><figcaption>SQS date and time creation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*gmp8DKbjclsnohWWpu-q9g.png" /><figcaption>Confirmation</figcaption></figure><p>We have just used API Gateway to trigger a Lambda function to send messages via SQS.</p><p>Congratulations! Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e22774cd9dfc" width="1" height="1" alt=""><hr><p><a href="https://towardsaws.com/working-with-lambda-and-sqs-e22774cd9dfc">Getting started with Lambda and SQS</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[Use AWS Boto3 Python to Create and Stop Specific EC2 Instances]]></title>
            <link>https://awstip.com/use-aws-boto3-python-to-create-and-stop-specific-ec2-instances-a150dec41ab?source=rss-527abae8c848------2</link>
            <guid isPermaLink="false">https://medium.com/p/a150dec41ab</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[boto3]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Erika Anderson]]></dc:creator>
            <pubDate>Sun, 11 Sep 2022 15:20:39 GMT</pubDate>
            <atom:updated>2022-09-12T15:15:28.791Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xNk0uCMPhBUOGUqv6CjYqA.png" /></figure><p><em>Hey ya’ll!!</em></p><p>Today we have a quick tutorial on how you can use Python’s Boto3 Library to automatically stop specific EC2 instance(s).</p><p><strong>What is Boto3?</strong></p><p>Boto3 allows you to create, update, and delete AWS resources from your Python scripts.</p><p><strong>Fun fact:</strong> Per py.pi.org, <em>Boto</em> was named after the fresh water dolphin native to the Amazon river.</p><p><strong>Scenario</strong>: Our DevOps engineering team often uses a development lab to test releases of our application. The managers are complaining about the rising cost of our development lab. To save money we will be stopping our Development instances, while making sure nothing in Production is accidentally stopped. We will add logic to our script that only stops running instances that have the environment: “Dev” tag.</p><p>All scripts used in this tutorial are located at <a href="https://github.com/Tech-E22/Python/tree/main/Project14">Tech_E Github</a>.</p><p>First, we create the development instances and the production instances in the AWS Cloud9 environment. We then run the script and check the AWS Console to verify the instances are running and the appropriate “Key” and “Value” tags are applied to the instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*UY_zunoHb3cls8_8TDc7xQ.png" /><figcaption>Dev script</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*uQGWtWG1CsLLxlhJTGnwYQ.png" /><figcaption>Ran dev instances script</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*LkDzZpdSTZLjMKp5weJ1sA.png" /><figcaption>Production instances script</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*XANUD-ojDbru_Hclm6wAwQ.png" /><figcaption>Ran script</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*MORO5aglxeXoJns7nv-4Jg.png" /><figcaption>Verification of instances created</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*5HHLlmWh3LQjteg1hE9hyA.png" /><figcaption>Verification of dev tag</figcaption></figure><p>Next, we will create a script to stop our development instances, while keeping our production instances running. We will run the script and verify the task is completed in the AWS Console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*4Xafrq5xMpIDIt1wgfMzwA.png" /><figcaption>Specified stopping ‘dev’ environment</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*5x-m_P6kQCaYo9HdwBIbaw.png" /><figcaption>Ran script for results</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*m1KeOteIe7js3SQn2rVNZA.png" /><figcaption>Verified dev environments stopped and Pro is still running</figcaption></figure><p>That’s it, easy peasy! You can see how much easier and quicker it is to stop specific instances by using Python’s Boto3 Library.</p><p>Thanks for reading!- E</p><blockquote><strong>Tip:</strong> Make sure to stop all remaining instances, so you don’t incur any charges.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a150dec41ab" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/use-aws-boto3-python-to-create-and-stop-specific-ec2-instances-a150dec41ab">Use AWS Boto3 Python to Create and Stop Specific EC2 Instances</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>