<?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 Nathan Hanson on Medium]]></title>
        <description><![CDATA[Stories by Nathan Hanson on Medium]]></description>
        <link>https://medium.com/@NathanTHanson?source=rss-c80f7bba6c3d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*smoHWzuT-9jnLIZNyolVMw.png</url>
            <title>Stories by Nathan Hanson on Medium</title>
            <link>https://medium.com/@NathanTHanson?source=rss-c80f7bba6c3d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 06:13:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@NathanTHanson/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[Build an AI Chatbot in Telegram with OpenAI and Make.com]]></title>
            <link>https://medium.com/@NathanTHanson/build-an-ai-chatbot-in-telegram-with-openai-and-make-com-4633f9159d37?source=rss-c80f7bba6c3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4633f9159d37</guid>
            <dc:creator><![CDATA[Nathan Hanson]]></dc:creator>
            <pubDate>Tue, 19 Nov 2024 04:18:10 GMT</pubDate>
            <atom:updated>2024-11-19T04:22:00.061Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever wanted to create a custom AI chatbot in Telegram that can automate tasks, answer questions, and boost productivity? In this tutorial, I’ll guide you step-by-step through the process of building your own AI chatbot using <strong>OpenAI</strong>, <strong>Make.com</strong>, and <strong>Telegram</strong>.</p><p>By the end of this guide, you’ll have a functional chatbot that lives inside a Telegram channel and can respond to user input. Let’s dive in!</p><h3>What You’ll Need</h3><p>Before we start, make sure you have accounts for the following platforms:</p><ol><li><a href="https://www.make.com/en">Make.com</a></li><li><a href="https://platform.openai.com/">OpenAI</a></li><li><a href="https://telegram.org/">Telegram</a></li></ol><h3>Step 1: Set Up Your Accounts</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UuDUdQrH-hIaOhEv" /></figure><p>Make.com</p><h4>1.1 Create a Make.com Account</h4><ul><li>Visit<a href="https://www.make.com/en"> Make.com</a> and sign up for an account.</li><li>You can sign up using an email/password combination or link your Google or Facebook account for faster access.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0kn7qcM3HNz_56Ly" /></figure><p>Platform OpenAI</p><h4>1.2 Sign Up for OpenAI</h4><ul><li>Head over to<a href="https://platform.openai.com/"> OpenAI’s platform page</a>.</li><li>Click <strong>Sign Up</strong> and create an account.</li><li>After signing up, navigate to <strong>API Keys</strong> (via the settings cog in the top right).</li><li>Generate a new API key, copy it, and save it in a secure location (like a Notepad file). You’ll need it later.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0pceVzWYKowbwRR2" /></figure><p>Telegram Desktop</p><h4>1.3 Install and Configure Telegram</h4><ul><li>Download and install Telegram on your phone.</li><li>Set up your Telegram account and then install the desktop version for your PC, Mac, or Linux.</li><li>Link your desktop Telegram app to your phone account by following the on-screen instructions.</li></ul><h3>Step 2: Configure Telegram and Create a Bot</h3><h4>2.1 Create a Bot with BotFather</h4><ol><li>Open Telegram and search for <strong>BotFather</strong> (look for the verified account with a blue checkmark).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9B014LvvHBVij80T" /></figure><p>2. Use the /newbot command to create a new bot.</p><p>3. Give your bot a name (e.g., “TellBot”) and a unique username that ends with “bot” (e.g., “TellMakeBot”).</p><p>4. BotFather will generate an <strong>API Token</strong> for your bot. Copy this token and save it in your Notepad file.</p><h4>2.2 Create a Telegram Channel</h4><ul><li>Go to the Telegram app and click the hamburger menu.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*q-F9JsAQy6_e06Is" /></figure><ul><li>Select <strong>Create Channel</strong> and give it a name (e.g., “TellMake Assistant”).</li><li>Set it to <strong>Private</strong> and save your settings.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9gr0JJK5Dn5NOui8" /></figure><h4>2.3 Add Your Bot as an Admin</h4><ul><li>Open your new Telegram channel.</li><li>Go to <strong>Manage Channel &gt; Administrators</strong> and add your bot as an administrator.</li></ul><h3>Step 3: Set Up Make.com</h3><h4>3.1 Create a Webhook</h4><ol><li>Log in to your Make.com account and click <strong>Create a New Scenario</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IJtUSescQb7H1BDZ" /></figure><p>2. click on the purple icon and select the custom Webhook module</p><p>3. Search for <strong>Webhook</strong> and select <strong>Custom Webhook</strong>.</p><p>4. Click <strong>Add</strong>, give your webhook a name (e.g., “TelegramBot”), and save it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*eqdyBjUDzdjAvEPj" /></figure><p>5. Copy the webhook URL and save it in your Notepad file.</p><h4>3.2 Connect Telegram to Your Webhook</h4><ul><li>Replace placeholders in this URL with your Bot Token and Webhook URL:</li></ul><p>https://api.telegram.org/bot&lt;YourBotToken&gt;/setWebhook?url=&lt;YourWebhookURL&gt;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*3qPpPM41nqUpcrPV" /></figure><ul><li>Paste this modified URL into your browser and hit Enter.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*R-tKb_zMnBIfQihn" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/0*L4qr3E3T8zcKQnAM" /></figure><p>message shows success</p><h3>Step 4: Build the AI Chatbot Workflow</h3><h4>4.1 Set Up Webhook Triggers</h4><ul><li>In Make.com, click the <strong>Run</strong> button on your webhook module.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/0*zs6hH1WKc7aEpbiI" /></figure><p>click on the run button</p><ul><li>Send a message in your Telegram channel to test the webhook.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/0*7kQqY-im0Lm5Xkco" /></figure><ul><li>The webhook should capture the message and display the data in Make.com.</li></ul><h4>4.2 Add OpenAI for AI Responses</h4><ol><li>Click the plus icon in your scenario and select <strong>OpenAI</strong>.</li><li>Choose the <strong>Chat Completion</strong> action.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*-ZZNeD7_er_qPRng" /></figure><p>3. enter your Open AI API key</p><p>4. Enter your OpenAI API key (saved earlier) and select a GPT model (e.g., GPT-4).</p><p>5. Map the <strong>Text Content</strong> field from the webhook trigger to the OpenAI prompt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*N7NZtlh1LGAT_Sur" /></figure><h4>4.3 Send Responses Back to Telegram</h4><ol><li>Add another module to your scenario and select <strong>Telegram Bot &gt; Send Text Message</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*_Iy8XV4em0JwPchf" /></figure><p>2. Enter your Bot API token.</p><p>3. Map the chat ID from the webhook trigger and the response from OpenAI to the respective fields.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*YXPjw9Ni9erIzAzT" /></figure><h3>Step 5: Test Your Chatbot</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*Zp-i-vvaneC2hg9D" /></figure><p>select run and enter text in Telegram to start the conversation</p><ol><li>Click <strong>Run Once</strong> in Make.com and send a message in your Telegram channel.</li><li>Your chatbot should process the input, generate a response using OpenAI, and send it back to the Telegram channel.</li><li>To make your bot run automatically, set the scenario to <strong>Active</strong> in Make.com.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*E1xu39ayz13W4DX2" /></figure><p>4. set your senario to run automatically</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*UqlkzDlCqSOuAuqu" /></figure><h3>Next Steps</h3><p>Congratulations! You’ve successfully built an AI-powered chatbot in Telegram. In the next tutorial, we’ll enhance the bot with advanced features like memory and integration with other tools (e.g., calendars).</p><p>If you found this guide helpful, be sure to like, comment, and share. Subscribe to stay updated on more AI tutorials!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4633f9159d37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Preparation, Docker Image Push and Deployment for Containerized Voting Application in Kubernetes…]]></title>
            <link>https://medium.com/@NathanTHanson/preparation-docker-image-push-and-deployment-for-containerized-voting-application-in-kubernetes-28998c5bbe15?source=rss-c80f7bba6c3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/28998c5bbe15</guid>
            <dc:creator><![CDATA[Nathan Hanson]]></dc:creator>
            <pubDate>Thu, 17 Aug 2023 22:53:56 GMT</pubDate>
            <atom:updated>2023-08-17T23:01:21.635Z</atom:updated>
            <content:encoded><![CDATA[<h3>Preparation, Docker Image Push and Deployment for Containerized Voting Application in Kubernetes Cluster using Docker, Azure Container Registry (ACR) and Azure Kubernetes Service (AKS)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NwiM-kb1dCFwKUqdR0-XDQ.png" /><figcaption>cloud project</figcaption></figure><p>In another project based on a real world scenario, I had to act as a DevOps Engineer, and show a new team member how to deploy an application on a Kubernetes cluster.</p><p>This cluster is part of The Cloud Bootcamp project, and I prepared this new team member to deploy the voting application that was developed for the MultiCloud Experience, an online event where participants had the opportunity to learn about Cloud technologies.</p><p>I deployed it to Microsoft Azure cloud, where I first pushed the application’s Docker image to Azure Container Registry (ACR) and then used the Azure Kubernetes Service (AKS) service to deploy a cluster managed by Microsoft Azure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CPDXtIhx7Pfti7VJkf05Ug.png" /><figcaption>solution architecture</figcaption></figure><p><strong>Prerequisites</strong></p><p>· Azure account</p><p>· Container knowledge</p><p>· Kubernetes knowledge</p><p><strong>Objectives</strong></p><p>· Create a Kubernetes cluster (AKS).</p><p>· Deploy the voting app into the cluster</p><p>Step 1, to keep things organized we will need to place our infrastructure for this project in a resource group. On the Bash command line the following command will create a resource group.</p><pre>az group create - name &lt;resource_group_name&gt; - location eastus</pre><p>Once the group is created, we will see the details on the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*Sd5ZBV0TKG3DV0JEZA3LoQ.png" /></figure><p>Now we can create a Azure Container Registry to store our container images. Use the following command in the terminal.</p><pre>az acr create --resource-group &lt;group_name&gt;  --name &lt;acrName&gt; --sku Basic</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*GSTQUqNCXrvVkyED2sZoSw.png" /></figure><p>Next we can run the following command to expose the login token of our Azure Container</p><pre>az acr login --n &lt;acrName&gt; --expose-token</pre><p>The token will be displayed in the terminal. Copy it so you can use it for later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8TPfRBe7t8ltFeXHF7cxYg.png" /></figure><p>Now we can use the az acr build command to push the images to ACR.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*bFIpWU9RnWL6VKLYlyEUaA.png" /></figure><p>After running the command the image has been placed in ACR</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*qDAk4ASdMLq7GBJ00Vjbcg.png" /></figure><p>The following command will create our Kubernetes cluster.</p><pre>az aks create \<br>--resource-group tcb-vote \<br>--name &lt;NameAKSCluster&gt; \<br>--node-count 1 \<br>--&lt;name-ssh-keys&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*XJiVtnhEtRuSkrlbK6BuDA.png" /></figure><p>Now if we check the consul, we can see our Kubernetes cluster is provisioning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*isougjgN5ahiYSxGRiL7ng.png" /></figure><p>Next we can attach the ACR to the cluster with this command</p><pre>az aks get-credentials --resource-group tcb-vote --name AKSClusterTCB</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*c-4JZT8WhUMf8SaBm0lyTw.png" /></figure><p>Now to deploy our images to the cluster we can use a yaml file and place the image names we have in the ACR. The kubectl command is used to deploy the yaml file.</p><pre>kubectl apply -f tcb-vote-plus-redis.yaml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*U31d_DrM0vgXDEy_zr3g2g.png" /></figure><p>Now we can access the application in the cluster. Use this command to get the public IP of the cluster</p><pre>kubectl get service --watch</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*ptQcOmE9ebYdlXnoeNUCpA.png" /></figure><p>Now paste or type the IP address in your browser to see the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y8NlI0oe8QPzRXeLPDrSvA.png" /></figure><p>That’s a wrap on our Kubernetes cluster voting application using Azure.</p><p>Thank you for reading and keep watching for more Cloud and DevOps walk throughs!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28998c5bbe15" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementation of an E-Commerce System on AWS in an automated way using Terraform and Ansible]]></title>
            <link>https://medium.com/@NathanTHanson/implementation-of-an-e-commerce-system-on-aws-in-an-automated-way-using-terraform-and-ansible-82b65c1b567a?source=rss-c80f7bba6c3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/82b65c1b567a</guid>
            <dc:creator><![CDATA[Nathan Hanson]]></dc:creator>
            <pubDate>Thu, 06 Jul 2023 01:22:39 GMT</pubDate>
            <atom:updated>2023-07-06T12:43:54.273Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*CYpVhp0S7nzT5rsEhK50rw.png" /></figure><p>In another project based in a real-world scenario, I worked as Cloud Engineer using DevOps, where I created and implemented an e-Commerce MVP (Minimum Viable Product) on AWS in less than 2 hours and in an automated way using Terraform and Ansible (Infrastructure as Code — IaC).</p><p>I provisioned the infrastructure in an automated way using Terraform and Ansible to automate the configuration management process, software installation and package management of the EC2 instance. I also used Magento, PHP, MySQL, and Redis to complete this project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*xO1Hb8rhvRD0TIfEJxS1XQ.png" /></figure><h3>Prerequisites</h3><ul><li>AWS account</li><li>Magento (free account)</li><li>Some Ansible knowledge</li><li>Some Terraform knowledge</li></ul><h3>Objectives</h3><ul><li>Use Terraform and Ansible to create an ecommerce Magento website.</li><li>Create Infrastructure on AWS</li></ul><ol><li>If you would like to create a similar project you could follow these steps. To start this project, create a free account with Adobe Magento</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*KtdawsOekTahvjz3CIW6Rg.png" /></figure><p>2. Once you have created your account sign in and navigate to the Market place to create an access key</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*VLleMa3A_j8nNiNXwXA_3Q.png" /></figure><p>3. Select the Magento 2 and then create an access key and give it a name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*thllIz01a1uzc2V5fCv0xQ.png" /></figure><p>4. Open up notepad and copy the Public and Private keys information to use later</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*kcKQZPCUgSdqtQDelRjXCQ.png" /></figure><p>5. Next let’s open up Cloudshell on AWS and install Terraform to start our project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*vA9Ad2309XubyI25Ed_CLA.png" /></figure><p>6. Now let’s make a folder to hold our project inside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*xzbYNo7rVeWxUC14zVacaw.png" /></figure><p>7. For Terraform to create the ssh key to the new EC2 make sure to create it or use an existing key and include it in your Terraform file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*aIABL01_8R70MUFDJUcmhw.png" /></figure><p>8. Now let’s start to create our infrastructure using Terraform. First type “terraform init”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*E3CE4tVUJPWaiu-HRtaKng.png" /></figure><p>9. Next type “terraform plan”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*_UVUjKs-j5-nwLOgC92zyw.png" /></figure><p>10. Now type “terraform apply” at the next prompt type ‘yes’ to allow Terraform to create the infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*2nEg_Ty2_Ku0vPjqCR5MVg.png" /></figure><p>11. Now that we have created our EC2 instance we can now use Ansible to configure it. To learn more about Ansible go to <a href="https://docs.ansible.com/">docs.ansible.com</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*Ksvl303MrQNFCM-ixDtoLg.png" /></figure><p>12. Now we can run our Ansible playbook to configure our EC2 and install Apache, PHP and Magento</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*NWk66UqJUqPEZHHXfktxzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*SzKSR9FmI8gMxOkQnOBBfw.png" /></figure><p>13. Now that Magento is installed and the EC2 is configured let’s see if the website is running. Use the public IP of your EC2 instance. Port 80 will need to be open to allow web traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*Tqnr_xxZJraBWTbabcU5vg.png" /></figure><p>14. Now to improve our ecommerce site type “/securelocation” after the URL to access the admin panel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*U6YKpATCbKQN8WHHC79pZQ.png" /></figure><p>15. Once inside the Dashboard there are quite a few tools we can use to make the ecommerce site function and look good. If you haven’t used Magento before take a look at this <a href="https://www.youtube.com/watch?v=gQ1-dPL2Ipg&amp;t=1s">video </a>to start learning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*9nQYdnCP_BiM81EeO0ruug.png" /></figure><p>16. With just a few images uploaded and entering inventory with price the shopping cart looks good and very easy to configure for your ecommerce site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*IATl40uds_FRN6kDzqgzIg.png" /></figure><p>Key take aways on this project is all the heavy lifting was taken care of by Terraform and Ansible. To create the infrastructure and configure the EC2 would have taken hours if done manually and is prone to errors.</p><p>Thank you for reading and keep watching for more DevOps tutorials!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*6bO_cF8TqZKWQl6JHNFE3w.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82b65c1b567a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Elaboration of Executive Presentation of Infrastructure costs for an SAP Migration project from…]]></title>
            <link>https://medium.com/@NathanTHanson/elaboration-of-executive-presentation-of-infrastructure-costs-for-an-sap-migration-project-from-99da5d19412e?source=rss-c80f7bba6c3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/99da5d19412e</guid>
            <dc:creator><![CDATA[Nathan Hanson]]></dc:creator>
            <pubDate>Thu, 08 Jun 2023 21:50:13 GMT</pubDate>
            <atom:updated>2023-06-08T22:14:47.527Z</atom:updated>
            <content:encoded><![CDATA[<h3>Elaboration of Executive Presentation of Infrastructure costs for an SAP Migration project from On-Premises to AWS</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*E9jGSesVrEeNyA7WCA5ROQ.jpeg" /><figcaption>Required tools for the estimate</figcaption></figure><p>In this project based on a real-world scenario, I acted as a Cloud Architect and created an executive presentation of infrastructure costs for a SAP migration project from On-Premises to AWS.</p><p>SAP workloads were running in a corporate DataCenter with the environment divided into Production, Quality Assurance — QA and Development/Test layers.</p><p>My mission was to estimate the costs of migration to AWS, considering that this infrastructure will be running on AWS for at least the next 3 years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*282ZjIYwf55xxD-MjdK-8g.jpeg" /><figcaption>SAP Migration to AWS</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*Enju29ijKSx0A61b2_Hq0w.jpeg" /><figcaption>On Prem resources</figcaption></figure><h4><strong>Prerequisites</strong></h4><ul><li>AWS Pricing Calculator</li><li>Presentation template</li><li>Power Point, Excel or Word</li></ul><h4>Objectives</h4><ul><li>Gather facts of on prem resources from client</li><li>Source AWS equivalent resources.</li><li>Present solution to client</li></ul><p>Our first step is to go to AWS pricing calculator and create an estimate <a href="https://calculator.aws/#/addService">Add service — AWS Pricing Calculator</a></p><p>To find a service just type the name in the search box. Type EC2 and then select configure</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*KwQ1WA7dG7fa__T6BleQTA.jpeg" /></figure><p>Enter a description like application servers and select the region for the resource. In this case we will select 5 EC2 instances with 8 vPCUs and 16GiB. AWS will show the instances that are appropriate for the specification</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*UNPXxgJ0k9O-XDDj2rij2A.jpeg" /></figure><p>For payment options the CEO said they would need the resources more than 3 years, so the compute savings plan would be the best option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*C4dCcmhwpCo5K9Qd9xKSJw.jpeg" /></figure><p>Our next step is to add the block storage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*7MmlEH76fO8CEu8UrttXnA.jpeg" /></figure><p>Then click save and add EC2 instances for the production environment to add to your estimate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*7NwchoHSdCMhfLnh6upTWA.jpeg" /></figure><p>Now let’s add the Stage and Development EC2 instances to this estimate. Follow the same steps as before but use the following settings as per the client specification. Use the same savings plan and for the block storage use 300 GB for each instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*IrWl4tJkXTdlYli-VlhPdg.jpeg" /></figure><p>Now let’s add load balancers. Type it in the search and select Elastic Load Balancing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*tvPm0y_mVmxAoZC2XjdqmA.jpeg" /></figure><p>For this project we will go with the Application Load Balancer for a quantity of 3 then add to the estimate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*n-R0t7Nr91xO-C2dCEzlYw.jpeg" /></figure><p>Now let’s add the Elastic File System. Type it in the search and then select configure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*OB7MAYc-8NkwreSeYAcefQ.jpeg" /></figure><p>Use standard storage and enter 1750 for the capacity as per the specifications and then save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*CdonV_0VrVcH36IOFerOkQ.jpeg" /></figure><p>Now it is time to add the RDS Oracle for Production. Follow the same steps as above to add it to the estimate. We will use the following specs to match the client specification and then add to the estimate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*QdANDO2MwXsDnz6onV9WKg.jpeg" /></figure><p>Next step is to add the 2 other RDS Oracle databases for the Stage and Development as per the spec.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*FmNS1GoAn1cHip9xHz8rkA.jpeg" /></figure><p>We have added all the items for this project, but support. This client requirement is for the Enterprise support plan. Select Add support.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*BMn6Tl-udQh91e6yHlDwPA.jpeg" /></figure><p>Now that the estimate is complete AWS allows us to download it to a CSV file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*YZ3n6vTN_fHZiO7sQQZkdg.jpeg" /></figure><p>To present this solution to the client we can use the data from the CSV file and put into the Power Point Presentation or Word or Excel document.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*iDTIbIxlfe7J7NU7LLdIcg.jpeg" /></figure><p>Congratulations, we have now completed our estimate. The final presentation is ready to show the client.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*WuzJ7XkaaulRGMlIfkQ-Eg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*6FONwqMw9y7JewjpMiKKvA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*WUbjOuZ_2ZwYwQH9dZLVug.jpeg" /></figure><p>Thank you for reading and keep watching for more Cloud and DevOps tutorials!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SXj2bEKsqp4tiSTH1jr9ww.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99da5d19412e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementation of a set of EC2 instances using Terraform and AWS Systems Manager configuration with…]]></title>
            <link>https://medium.com/@NathanTHanson/implementation-of-a-set-of-ec2-instances-using-terraform-and-aws-systems-manager-configuration-with-bd1295811d5f?source=rss-c80f7bba6c3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd1295811d5f</guid>
            <dc:creator><![CDATA[Nathan Hanson]]></dc:creator>
            <pubDate>Tue, 06 Jun 2023 18:25:26 GMT</pubDate>
            <atom:updated>2023-06-08T22:15:41.374Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*YALjwrMXojFW0DVWt8q5ag.jpeg" /></figure><h3>Implementation of a set of EC2 instances using Terraform and AWS Systems Manager configuration with Amazon Simple Notification Service for automated installation of security officers</h3><p>In this project based on a real-world scenario, I acted as DevSecOps Engineer, and I deployed a set of EC2 instances and infrastructure in an automated way using Terraform (infrastructure as code — IaC). Also, it was necessary to install a specific security agent on all these instances in an automated way.</p><p>Once I provisioned the infrastructure, AWS System Manager and its component Command Run were used to install the security agents in an automated way. I used the Amazon Simple Notification Service — SNS to send an email informing the whole process status.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*ky2zxlOfPmVUBQ6zSs5sLw.jpeg" /></figure><h4>Prerequisites</h4><ul><li>AWS account</li><li>AWS IAM basic knowledge</li><li>Basic knowledge of AWS EC2, VPC</li><li>Basic Terraform knowledge.</li><li>Terminal like AWS cloudshell, or terminal local device</li></ul><h4>Objectives</h4><ul><li>Install Teraform</li><li>Create multiple EC2 instances using Terraform</li><li>Use default VPC</li><li>Create a security group to allow ssh</li><li>Create a ssh key</li><li>Install security agents on EC2 using</li><li>Configure AWS Systems Manager and Run Command</li><li>Configure AWS SNS to send email notifications.</li></ul><p>To start this project open up AWS cloud shell from the console by selecting the cloud shell icon on the top right. Using cloud shell will save us the extra work having to authenticate to AWS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*1DK2SLdphMAr79huLgklTg.jpeg" /></figure><p>Use the following commands to install Terraform</p><ul><li>sudo yum install -y yum-utils</li><li>sudo yum-config-manager — add-repo</li><li><a href="https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo">https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo</a></li><li>sudo yum -y install terraform</li></ul><p>If you paste all 4 commands in the terminal, you can run them in a multiline and Terraform will be installed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*pYtIGkL4djPPdoXL2qTYlA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*2xzh9J9-NfUxaH34xy1DWg.jpeg" /></figure><p>Now that we have Terraform installed it is time to upload the Terraform files main.tf and provider.tf. as well as my saved ssh key file.</p><p>To upload the files use the Actions button on the upper right. Only one file can be uploaded at a time, but since there are only few files plus the ssh key I uploaded them individually. Another option would be to zip the files up beforehand and upload them as one file. Use the zip option if you have a lot of files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*XZHYvu-ByPTQUVXCQW5MxQ.jpeg" /></figure><p>Now that the terraform files are uploaded it is time to create our resources using the 3 Terraform commands</p><ol><li>) Type “terraform init”</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*08tSAjtLwHg0azt3yLv14g.jpeg" /></figure><p>2.) Then type “terraform plan”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*UmLakhikHNHgMJVKPnrCwQ.jpeg" /></figure><p>The terraform plan command will show all the infrastructure to be created. Terraform creates the infrastructure using declarative language and does not need to be in any specific order like a script or programing language.</p><p>Now to create the resources type “terraform apply” it will run then type ”yes” to confirm and Terraform will create your resources</p><p>3.) Now to create the resources type “terraform apply” it will run then type ”yes” to confirm and Terraform will create your resources</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*vNy10ytr7dfOYKIkqdVfVQ.jpeg" /></figure><p>Terraform is pretty quick, so It only took 42 seconds to create all the resources exactly as per the Terraform files. This prevents errors and if any changes are needed just update the Terraform code. Using IAC (Infrastructure as code) gives transparency and consistency when creating infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*vyNbopxwPoofx_NVLgy5dg.jpeg" /></figure><p>The sample Terraform file uploaded only provisioned 2 web servers but we could have easily changed that to a create 100 or more instances. Also, to remove the instances is as easy as one command. More on that later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*LLik0igHKRh2MStl9ItHrA.jpeg" /></figure><p>Okay now that Terraform has done the heavy lifting, we now have our instances and VPC created. Let’ move to the notification portion of this assignment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*0RnkrGhZZUZbqkku1Qsunw.jpeg" /></figure><p>First thing we need to do is create an IAM role to authorize AWS System Manager to use AWS SNS. Let’s call the role SystemMangerToSNS and assassin the AWS policy AmazonSNSFullAccess</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*DT9YyrpuQ4chXXSGK53sCg.jpeg" /></figure><p>Now select the topic you created and copy the ARN code and paste it into your note app and then proceed to Create subscription</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*WP_NVtb-8X20Hb6s0SOAXw.jpeg" /></figure><p>Select email as the protocol for this subscription and then put in the email you would like to use for the notifications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*Sinp3SnJ3tdqcf0wkIcG0A.jpeg" /></figure><p>Once the subscription is completed copy the ARN as well and paste it in your note app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*Bgt1i0GEEhT8gL6UPQ09VA.jpeg" /></figure><p>Once this is completed you will receive an email to confirm your subscription. Make sure to confirm.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*0h-cUpbtdXb4hR_eCiLlsA.jpeg" /></figure><p>Once you have confirmed you should see that on your subscription.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*WlsJk5AfrgfT92TmzGaTmw.jpeg" /></figure><p>Now that that is complete, we can move on to AWS System Manager consul. When there select the quick setup and then select create new configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*Gx9I9jXv0MeywE1xKzCfuA.jpeg" /></figure><p>Then choose Host Management and then next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*6IxkTZeaLS0xWPJRvKqwQA.jpeg" /></figure><p>On the next page for your Targets select your Region, then Manual and then the instances you created with Terraform. Then select create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*L2WViCH5T583_UoQqf7ybA.jpeg" /></figure><p>Let this run for a minute or so until your configuration turns green to show success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*fqYpsQlMPTcj_RDjcEUNdA.jpeg" /></figure><p>To view the details just select the account and then go to View details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*N5XOzfumNL5PXEav9FwfrA.jpeg" /></figure><p>To make sure the agent is running correctly let’s restart our instances. Go to your EC2 panel and all your servers for this project and then select reboot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*--zy3FIJuuGrS0KmobkkvQ.jpeg" /></figure><p>Now we can go back to AWS System Manager and add the run command for this project. Find Nod Management on the side menu and the go down and select Run Command. Do a search for shell and then select AWS-RunShellScript</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*_IrbJwWhuHqlU3rnAhHUoQ.jpeg" /></figure><p>Then enter these shell commands in the command parameters below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*ch1h2md8gJk8rWARPnepRQ.jpeg" /></figure><p>Then select the follow to run this script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*sHkkMk9mvilvxyO9kjbaag.jpeg" /></figure><p>Then scroll down and select the SNS notification and select the IAM role we earlier created and the click on run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*MpJ_nBdVo2ykCxNbg5wZyA.jpeg" /></figure><p>Now give it a minute to start running. After a minute or so we can check the status and see if the test agent is running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*wjdpiDFi1d6acr7ZGlAWPg.jpeg" /></figure><p>We can also see if the agent is there by opening the instance command line and using the ls -ltr command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*G3v2LPd05K-wGPgNknDhUw.jpeg" /></figure><p><strong>And that’s a wrap</strong>. You now will get alerts to your email from the security agent installed on the EC2 instances. To clean up this project we should remove the resources we created. I hinted that Terraform had one command to remove all the created resources. Now is time to go back to the AWS Cloud shell and run the command “terraform destroy”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*AK0ie2T5hGI66kHz7HZEKA.jpeg" /></figure><p>Thank you for reading and keep watching for more DevOps tutorials!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SXj2bEKsqp4tiSTH1jr9ww.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd1295811d5f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementation of a Scalable Web Application using the services of AWS Elastic Beanstalk, DynamoDB…]]></title>
            <link>https://medium.com/@NathanTHanson/implementation-of-a-scalable-web-application-using-the-services-of-aws-elastic-beanstalk-dynamodb-2f217e9a73d4?source=rss-c80f7bba6c3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f217e9a73d4</guid>
            <dc:creator><![CDATA[Nathan Hanson]]></dc:creator>
            <pubDate>Sun, 30 Apr 2023 18:05:21 GMT</pubDate>
            <atom:updated>2023-06-08T22:17:37.508Z</atom:updated>
            <content:encoded><![CDATA[<h3>Implementation of a Scalable Web Application using the services of AWS Elastic Beanstalk, DynamoDB, CloudFront and Edge Location</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*k4NwD46EgHnAbGc7k_8d0g.png" /><figcaption>10,000 Audience members</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*OSHussOGNZ9peAs1QyNENA.png" /><figcaption>Infrastructure for the webapp using AWS Elastic Beanstalk</figcaption></figure><p>In this project based on a real-world scenario, my task was to develop an application capable of handling a large number of concurrent users. This application was used during a major conference, attended by over 10,000 participants from around the world, both in person and online.</p><p>During the conference, which was broadcasted live, 10 vouchers for 3 Cloud certifications were awarded through a raffle. Over 10,000 attendees registered their email addresses at that time to ensure their eligibility for the drawing.</p><p>I used AWS, Elastic Beanstalk services to deploy the web application, DynamoDB to store emails, CloudFront to cache static and dynamic files in an Edge Location close to the user to improve user experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*XVN3ImC8ym401VnDch_AiA.png" /></figure><p>To start this project, I began with the AWS portal to create a DynamoDB database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*jAPV4KxtQhOY3nMJOGl0Kw.png" /></figure><p>Then I created the table to store the user information</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*V7EvnO0seFctfI5lhIAnpg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*MXMxb3Uyd3i6hmfF5HD3jA.png" /></figure><p>After creating the table, the next tool in this project I used was Elastic Beanstalk to provision a EC2 instance, load balancer, and auto scale group as needed for this project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*PmPBanq6W26PKM67wtRWcA.png" /></figure><p>Creating the application using Python Platform</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*FueEl2NJRYM518vQprBKkA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*76qcm0KySLPMc14rpM6LYw.png" /></figure><p>Then I uploaded the code for the project from my device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*2BF8UAWtX0YUB-72KuLMJg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*lcW9kGDW2RUvPbafkwJm_w.png" /></figure><p>Then I need to configure a few more options as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*jnodBlx8yPGg2lgN5SfMVQ.png" /></figure><p>In the Software table I added one variable AWS_REGION</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*El-T34n--5aCqmoIYXiw9A.png" /></figure><p>Then I needed to change the Instance type to General Purpose (SSD)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*Ez34rgyw_Z5GqMeSluAU9Q.png" /></figure><p>Following that I needed to setup autoscaling under Modify Capacity</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*6IcATUTFyRmsag7BNW-QnA.png" /></figure><p>For autoscaling to be activated I setup the following triggers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*SToLt4yisJutSNw7T4jOyQ.png" /></figure><p>To allow me to access the EC2 instance I then setup the key 🗝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*AoZ07gBVgw21yaGwlMGX5Q.png" /></figure><p>Then I set the Load balancer to the public to allow internet access to the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*MZegwPQhjUMfajg6u3cznA.png" /></figure><p>And finally, to complete this process I selected the create button and Elastic Beanstalk stared to create all the infrastructure needed to run this app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*PV_LBmMIFitOPG0Jf-X3AQ.png" /></figure><p>In a short amount of time the application has been provisioned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*8SE3LMChvHjZPqZTMj3iLA.png" /></figure><p>To test the application and see if it is running, I selected the link to preview in a browser to see if the registration page will display. 👍</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*02iN76gHLXjx_8IRDSOnSw.png" /></figure><p>I then entered an email to run a test registration and received the following error. 🤔</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*a-ji9nWBiA_I6M3aY-pkLg.png" /></figure><p>Looking at the error logs I can see I had forgotten to set up a role so that my EC2 instance can write to the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*DraM9TKvumrgpWUcTqmfzQ.png" /></figure><p>Heading back to Elastic Beanstalk and looking under security I copy the role profile name created and then go to IAM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*9wD-X2jYje204dLY01TUNw.png" /></figure><p>Now in the IAM consul and I search for that role I copied and then attach a new policy to allow my EC2 DynamoDB full access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*w6T_El5tCXVDbQSUv9ldHg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*UGr98mIqQWb_k4KCxbOyEg.png" /></figure><p>Now that I have set up the role permission I go back to my browser and enter a test email.</p><p>Wonder bar 👏 It worked!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*oXnIAwjouWrf47KP8liyIg.png" /></figure><p>With this infrastructure put in place in AWS the application will have no issues surviving the load of potentially 10,000 users accessing the app at the same time to register for 10 vouchers for a chance to win a Cloud certification.</p><p>And that brings this project to a wrap. I really hope this will save someone time if they need to create a simple application and have it up and running in a very short time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*I4zvrG0CCYok_kU4kHn3YQ.png" /></figure><p>Thank you for reading and keep watching for more DevOps tutorials!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SXj2bEKsqp4tiSTH1jr9ww.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f217e9a73d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Moving a Workload from a Corporate Data Center to AWS: An Amazon EC2 and RDS Approach]]></title>
            <link>https://medium.com/@NathanTHanson/moving-a-workload-from-a-corporate-data-center-to-aws-an-amazon-ec2-and-rds-approach-8dcaccda6eeb?source=rss-c80f7bba6c3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8dcaccda6eeb</guid>
            <dc:creator><![CDATA[Nathan Hanson]]></dc:creator>
            <pubDate>Tue, 25 Apr 2023 09:19:13 GMT</pubDate>
            <atom:updated>2023-06-08T22:18:08.920Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KQmAMRkUvecSeWr2HNlRhQ.png" /><figcaption>Lift &amp; Shift to AWS</figcaption></figure><p>I served as the Cloud Specialist in a project where the goal was to migrate a workload from a Corporate Data Center to AWS in a real-world scenario using Amazon EC2 and RDS services. The migration strategy chosen was the Lift &amp; Shift (rehost) model, which involved moving both the application and database data to AWS</p><p>Throughout the migration process, I followed a set of essential steps which included Planning (such as sizing, resource naming, and prerequisites), Execution (provisioning resources, following best practices), Go-live (performing validation tests such as Dry-run and final migration — Cutover), and Post Go-live (ensuring the smooth operation of the application and user access).</p><p>In this project I used the following technologies, EC2, VCP, AWS RDS, Internet Gateway and MySQL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*9RcNkQj3aCZaQqvA7OkErA.png" /><figcaption>Technologies used in project.</figcaption></figure><p>To begin the migration process, I started by matching the on-premise application server and database server to equivalent or better resources in the AWS infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*i-CmT5p601P5EPAQ38dn8g.png" /><figcaption>Migration Document</figcaption></figure><p>Before creating the EC2 and RDS resources, I set up a Virtual Private Cloud (VPC) with a public and private subnet, making sure that the CIDR blocks for the VPC and subnets did not overlap with on-premise networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*M8Ktmm4Q5XMyZKSOijbU0g.png" /></figure><p>To connect to the VPC and its resources, I implemented an Internet Gateway and Route Table</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*i8rGCm867fJV7byfNFKbdQ.png" /></figure><p>Once the network was provisioned, I created an EC2 instance running Ubuntu 18.04 and sized it according to the migration plan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*H7HckANrUSBzFuLxt10bLg.png" /></figure><p>I then prepared the EC2 instance by running updates and installing Python, libraries, and Flask to ensure that it could run the on-premise application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*6lzpQhwIcLJeEDIn6yo4FA.png" /></figure><p>With the EC2 instance ready, I installed the MySQL RDS and set up a VPC security group to limit access to the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*XrNofyXd_rgNZenr7Bs5ng.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*fuytDdGQc1ICqMyU0PuqIQ.png" /></figure><p>To copy all the application and database data from on-premise, I created an S3 bucket. I performed a dry run by pulling the test application data from the S3 bucket and installing it onto the EC2 instance, and then did the same for the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*bLF2lTV-410WaGCQDh9wAA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*n6uHS1zVO3WIveWCXV4KCA.png" /></figure><p>After verifying that the application was running and the database was connected, the dry run step was complete.</p><p>The final step was to schedule downtime with the business and complete the migration, switching the business over to the application running on AWS.</p><p>Thank you for reading and keep watching for more DevOps tutorials!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SXj2bEKsqp4tiSTH1jr9ww.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8dcaccda6eeb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automated user migration and management of AWS Identity and Access Management (IAM) resources]]></title>
            <link>https://medium.com/@NathanTHanson/automated-user-migration-and-management-of-aws-identity-and-access-management-iam-resources-18bbd2ec5c7?source=rss-c80f7bba6c3d------2</link>
            <guid isPermaLink="false">https://medium.com/p/18bbd2ec5c7</guid>
            <category><![CDATA[iam-roles]]></category>
            <dc:creator><![CDATA[Nathan Hanson]]></dc:creator>
            <pubDate>Fri, 21 Apr 2023 10:08:03 GMT</pubDate>
            <atom:updated>2023-06-08T22:18:37.322Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jSi0d6klhUytn7nHCUk-7w.png" /></figure><p>In this project based on a real-world scenario, I acted as Cloud Specialist with the mission to migrate users in an automated way and manage AWS IAM (Identity and Access Management) resources.</p><p>There were 100 users that needed to be migrated and have MFA (Multi-factor authentication) enabled on their accounts, as this is a security best practice.</p><p>To avoid repetitive and manual tasks in the AWS console, I needed to think about automating the processes. I used the following tools to help me accomplish this task.</p><p>GitBash with AWS CLI and Shell Script</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*-X37ptfjI91mC8CxO67HoA.png" /></figure><p>Since HR provided me with an excel file I had the users first and last names from their company email as well as the team they were placed on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*PRwl6wFaQq5sbapkcB1OjQ.png" /></figure><p>To create the IAM user I needed three items, username, group name and password. I globally edited the excel file changing the email to a username and the team to a group and then added a generic password for each user. I then saved the file as a csv file to use for the shell script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*3EDQf5DiYDAXkx6Eh3gbng.png" /></figure><p>Next step was to upload the csv file to AWS CloudShell. Once I uploaded the file, I needed to install Dos2unix to run my script. I then made a change to my script to read my IAM user file I uploaded to create the 100 users.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*J2QALNREsA_h3aa6LpxYLg.png" /></figure><p>I ran the script and within a minute all the users were uploaded to IAM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*z1APmLXokdxyFfJYgZjoxw.png" /></figure><p>The final step was to add the proper permission to each user group and create a custom policy enforcing MFA and change their password when the user first logs in. There were 5 user groups to add policies, so this only took 5 minutes or so in the consul to implement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*oiHzXWddABXPr77SSCkmFg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*9ndeiRuQyWKKWGWWYiQcRg.png" /></figure><p>And that completed the task for adding 100 users to IAM. Thankfully using the excel sheet from HR and the shell script saved me a few hours and potential errors adding in each of the user manually.</p><p>Thank you for reading and keep watching for more DevOps tutorials!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SXj2bEKsqp4tiSTH1jr9ww.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18bbd2ec5c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>