<?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 Kristian Hughes on Medium]]></title>
        <description><![CDATA[Stories by Kristian Hughes on Medium]]></description>
        <link>https://medium.com/@kristian.hughes21?source=rss-c768dfcf8b46------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*TnooX37ysCjNNKt56xxobw@2x.jpeg</url>
            <title>Stories by Kristian Hughes on Medium</title>
            <link>https://medium.com/@kristian.hughes21?source=rss-c768dfcf8b46------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 13:18:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kristian.hughes21/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[Custom EC2 module using Terraform]]></title>
            <link>https://medium.com/@kristian.hughes21/custom-ec2-module-using-terraform-f9ce5f102734?source=rss-c768dfcf8b46------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9ce5f102734</guid>
            <dc:creator><![CDATA[Kristian Hughes]]></dc:creator>
            <pubDate>Mon, 06 Feb 2023 02:47:49 GMT</pubDate>
            <atom:updated>2023-02-06T02:47:49.082Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*587kzpHweLPUYt2YUQ2GFg.jpeg" /></figure><h3>Description:</h3><p><strong>Your team needs you to create a custom module for ec2 instance with a amazon linux 2 ami ID.</strong></p><h3>Instructions:</h3><ol><li><strong>Fork and clone this repo locally with the </strong><a href="http://ec2.tf/"><strong>ec2.tf</strong></a><strong> template as a starting point to create the ec2 : </strong><a href="https://github.com/LevelUpInTech/terraformec2.git"><strong>https://github.com/LevelUpInTech/terraformec2.git</strong></a></li><li><strong>Create a custom module for ec2 out of the resource block that you can use as repeatable infrastructure. DO NOT USE THE TERRAFORM REGISTRY. YOU SHOULD BE CREATING YOUR OWN MODULES.</strong></li><li><strong>Be sure to create a </strong><a href="http://variables.tf/"><strong>variables.tf</strong></a><strong> file for your ec2 module.</strong></li><li><strong>Push the new created module and the </strong><a href="http://ec2.tf/"><strong>ec2.tf</strong></a><strong> file to your repo!</strong></li></ol><p>To get started we have to select the given link above once the link opens we will select the fork icon in the top right corner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WCYItfMXTFV7UN7LqEdgOA.png" /></figure><p>After we select fork “Create a new fork” page will come up with your owner name &amp; repository. By default forks are named the same as their upstream repository, but you can customize the name if you like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4SKmbJl09h0RQ4i4ZBsJNg.png" /></figure><p>Extra Info: A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project*</p><p>Now we “Create fork”</p><p>Next we have to clone our repo by selecting the green code button. Once we select code we copy the website to our Cloud9 account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*4ySSQTUij0fgzzRsmc20Fg.png" /></figure><p>Next step ask us to create a custom module for <strong>ec2.tf </strong>but also we need to create other files to keep everything seperate. The next few pics will break down the files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A-xYTxjvZ6XBuUx81uL9VQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*LOGTbYMljvT7l5Ezi-R1Bg.png" /></figure><p>Now we have to copy the EC2 resource block to the <strong>ec2.tf file</strong> and from there to the <strong>main.tf file</strong> in my ec2-int directory. So I went back and started doing my coding and for some reason I kept getting a error message I will show below. So the next pictures im going to show are my files I created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*foo_VZAf0C8k6THig7O5CQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*QDqE3E7b3m8_k3F3-gFi9g.png" /></figure><p>After those files are done you should create your <strong>variables.tf file </strong>which will tell the variables that are needed for your EC2 resources. So after that we have to change up some of the code in the <strong>main.tf file </strong>this is where our access key and secret access key should go.</p><p>So now I start running my code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cChtSQ1Dn92mqhyP6AGzvA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QpGgp84kMyM_ui6b5nO6yQ.png" /></figure><p>Uh-Oh!! Roadblock!! I kept getting this error if anyone has any pointers and could help me Im open to all pointers and suggestions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ra2G3iHAC0vRLxM2vbN82g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9ce5f102734" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s Use Github]]></title>
            <link>https://medium.com/@kristian.hughes21/lets-use-github-37722d5eeeb?source=rss-c768dfcf8b46------2</link>
            <guid isPermaLink="false">https://medium.com/p/37722d5eeeb</guid>
            <dc:creator><![CDATA[Kristian Hughes]]></dc:creator>
            <pubDate>Mon, 06 Feb 2023 00:37:11 GMT</pubDate>
            <atom:updated>2023-02-06T00:37:11.328Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*J5AZbVYj1VNxULs09pG_gA.jpeg" /></figure><h3>Rundown:</h3><p>You are tasked with editing and changing code from your Level Up In tech team repo. After making changes, the team would like to manually check the code before putting into production.</p><h3>Objective:</h3><ol><li>Fork the Level Up In Tech Repo Here: <a href="https://github.com/LevelUpInTech/LevelUpTeam">https://github.com/LevelUpInTech/LevelUpTeam</a></li><li>Clone the forked repo to your ACG cloud server environment.</li><li>Using Vim, create a change to the <a href="http://linux.sh/">linux.sh</a> file that is in the repo directory.</li><li>Save the file and add to your local repo, then commit the file.</li><li>Push the file back to your own github repo.</li><li>Send a pull request to merge with Level Up In Tech production repo.</li></ol><p>So, to begin our project they asked us to fork our repo and then clone it to our ACG cloud server environment (Everyone doesn’t have access to ACG (A Cloud Guru) so you can just use powershell instead. Below I will show you the first two steps:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*0aAnvzKPCrdnX_1oM7W50A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x0KC0RmQ32w23g5o4uH8Bw.png" /></figure><p>After I have cloned my repo I will go back to my environment install “Git.” So to do that I will use a few commands:<em> sudo yum install git</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dxfOG8UC0qMlepySeHWpxA.png" /><figcaption>sudo yum is the initial part of a command which gives yum administrator privileges</figcaption></figure><p>Ok now we have to configure git to do that lets try commands:</p><p><em>git config — — global user.name</em></p><p><em>git config — — global user.email</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mY3h0eSFtoGjeYWIZrXtfQ.png" /></figure><p>Let’s access our fork by running: <em>git clone &lt;github URL&gt; </em>if everything is right we will get the following message</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fp_VTPzKM09jisXbROy-kw.png" /></figure><p>Now let’s make changes to the linux.sh file we will do that using our vim editor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eRBhaP8XBMJqnTqxSvf_yQ.png" /></figure><p>We’re almost there now we can add to our local repo then commit the file. We can’t forget to add the updated file to our repo so lets run: <em>git add &amp; git status</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qzx-HxlrFRXlYIofPcb49w.png" /></figure><p>Ok let’s do one more thing, lets add comments to the changes we made. Let’s try commands: <em>git commit -a -m “added comments”</em> this will show changes we made.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TSkcYCy4O0-yMe10UG2irA.png" /></figure><p>Final Step: Push the file to our Github</p><p>First we need to create a token this allows only me access without it no one can push changes to the repo.</p><ol><li><strong><em>Go to Github profile then settings</em></strong></li><li><strong><em>Developer Settings</em></strong></li><li><strong><em>Personal Access Token</em></strong></li><li><strong><em>Tokens(Classic)</em></strong></li><li><strong><em>Generate new token</em></strong></li><li><strong><em>Generate new token(classic)</em></strong></li><li><strong><em>Repo(Top box)</em></strong></li><li><strong><em>Scroll to the bottom and select Generate Token</em></strong></li><li><strong><em>Copy &amp; Paste(Keep somewhere safe)</em></strong></li></ol><p>Lastly use command: <em>git push </em><a href="https://GITHUB_ACCESS_TOKEN@github.com/kaihughes93/LevelUpTeam.git"><em>https://GITHUB_ACCESS_TOKEN@github.com/kaihughes93/LevelUpTeam.git</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j33NBQbUloEdNZSaBV3sCQ.png" /></figure><p>Go back to Github select refresh the we should see 1 commit if you do select the message then select the Pull Request tab on Github dashboard enter comments about changes then wait for approval of merge.</p><p>This is how you fork a repo from Github hope you enjoyed my walkthrough.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37722d5eeeb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EC2 Instance & Web Surfing With NGINX.]]></title>
            <link>https://medium.com/@kristian.hughes21/ec2-instance-web-surfing-with-nginx-3ec4d71f48e0?source=rss-c768dfcf8b46------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ec4d71f48e0</guid>
            <dc:creator><![CDATA[Kristian Hughes]]></dc:creator>
            <pubDate>Sun, 18 Dec 2022 22:06:12 GMT</pubDate>
            <atom:updated>2022-12-18T22:06:12.090Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oJwt6zUGgg0ImJA-dqCDrg.jpeg" /></figure><p>Instructions: Create an EC2 instance with a webserver!</p><ol><li>Create a t2.micro EC2 instance with the OS of your choice(Just make sure it is free tier)</li><li>In the user-data field, use a script that updates all packages, installs NGINX, and start the service.</li><li>Verify that the instance has the NGINX webserver downloaded and installed through the Public IP.</li></ol><p>Step 1:</p><p>Login to your AWS account(IAM User), in the search bar type EC2 select then launch instance. Once your instance page opens create a name and select and select an AMI. I chose Amazon Linux(Free Is Our Best Friend) and t2.micro was already selected for instance type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pl0zucDFYGm7ZI6TvALtmA.png" /></figure><p>For the key pair I used an existing one, we need to edit the network settings. Auto- assign public IP to “Enable” now for the inbound security set to “My IP” and Security group 2 choose HTTP and source type “Anywhere”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z1IR6LvNaiUbO500OrTOhg.png" /></figure><p>Now to get to our user-data field we have to scroll down to Advanced details and add a script that will update, install and start the NGINX service. The following script will do so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*conyvEaAM5Zg9xUaCRGkng.png" /></figure><p>Once we have the script applied you can now launch your instance. If you receive a green box at the top of the screen after you launch your instance we know it works so now we select the instance. The status check passed both checks also.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uMshmUBPQw0ee71lWMQD8g.png" /></figure><p>Now I know everything is running properly and the user data script is working lets get our public IP address from our instance page and copy into our URL to see if it works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yOmwxRZrGCcZZt7pSWgSTQ.png" /></figure><p>Tahdah!! We have our NGINX welcome page.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ec4d71f48e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ⓚⓤⓑⓔⓡⓝⓔⓣⓔⓢ and Ⓝⓖⓘⓝⓧ]]></title>
            <link>https://medium.com/@kristian.hughes21/and-2a8535957cb2?source=rss-c768dfcf8b46------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a8535957cb2</guid>
            <dc:creator><![CDATA[Kristian Hughes]]></dc:creator>
            <pubDate>Mon, 05 Dec 2022 01:04:47 GMT</pubDate>
            <atom:updated>2022-12-05T01:04:47.294Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*efegVXhadwnJkvQwu__QTQ.jpeg" /></figure><p><strong>Overview:</strong></p><ul><li>Using the command line, create a deployment that runs the Nginx image.</li><li>Display the details of this deployment</li><li>Check the events logs from the deployment</li><li>DELETE the deployment</li></ul><p><strong>For those wondering what Kubernetes is:</strong></p><ul><li>Kubernetes is an open-source container orchestration platform that automates many of the manual processes involved in deploying, managing, and scaling containerized applications.</li></ul><p><strong>Kubernetes Duties:</strong></p><ul><li>Automates operational tasks of container management and includes built-in commands for deploying applications.</li><li>Roll out changes to your applications</li><li>Scaling your applications up and down to fit changing needs.</li><li>Monitor your applications</li></ul><p><strong>What you need for project:</strong></p><ul><li>Powershell</li><li>Kubernetes Installed</li></ul><p><strong>Step 1: Using CLI create a deployment that runs the Nginx image</strong></p><p>To get started we need to open powershell and for the first step we run command: <em>kubectl create deployment &lt;name&gt; — image=nginx</em></p><p>This will help with our deployment process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6aNy-HN5YQynkzoFyvrxrQ.png" /></figure><p><strong>Step 2: Display the details of this Deployment</strong></p><p>Now we have to run command: <em>kubectl get deployments </em>this will let us know if the deployment is there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E7_VvHjQgHOuOkJVNIXMGQ.png" /></figure><p>Next, we have to give details on the current deployment to do so use command: <em>kubectl describe deployment &lt;deployment name&gt;</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r7WGDNL1VVeO1HZFmXtLxA.png" /></figure><p><strong>Step 3: Check the event logs from the deployment</strong></p><p>So, to check the event log we use command: <em>kubectl logs deployment/&lt;deployment name&gt;</em> this will give us a rundown of our event log.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fly_mipqaFjwt_2-xRlcXw.png" /></figure><p><strong>Final Step: DELETE Deployment!!!</strong></p><p>Our final step is the deleting of our deployment so the following command to do so is: <em>kubectl delete deployment &lt;deployment name&gt;</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HTLwdfW966QQo05JbLRjzQ.png" /></figure><p>This will conclude my deployment of Kubernetes hope you enjoyed my short and sweet breakdown.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a8535957cb2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker Basics With Me!]]></title>
            <link>https://medium.com/@kristian.hughes21/docker-basics-with-me-67768259805a?source=rss-c768dfcf8b46------2</link>
            <guid isPermaLink="false">https://medium.com/p/67768259805a</guid>
            <dc:creator><![CDATA[Kristian Hughes]]></dc:creator>
            <pubDate>Wed, 30 Nov 2022 01:20:16 GMT</pubDate>
            <atom:updated>2022-11-30T01:20:16.144Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jFEUrbW5VbWlLfeKwu3jFw.jpeg" /></figure><p>What we’re doing:</p><p>Your team needs you to deploy a custom image quickly and write a quick script in a file to accomplish a task. You will do a task that you may not have done before so make sure you research if you do not know how.</p><p>Instructions:</p><ul><li>Create your own image using Nginx and add a file that will tell you the date the container has been deployed.</li><li>Deploy your container with port 8080 open.</li><li>Save your container data to the AWS Elastic Container Registry(ECR).</li></ul><p>Tools for Project:</p><ul><li>Dockerhub Account</li><li>AWS Account</li><li>Cloud9 IDE</li></ul><p>To get started we need to create a new environment in Cloud9 once we create our new environment, we have to change to our new directory using the following commands: <em>mkdir wk16docker</em> &amp; <em>cd wk16docker</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*laK47BmOpL2m-aHYvt1T8A.png" /></figure><p>Ok now we have to pull our image from Dockerhub to do that use command: <em>docker pull nginx:latest</em></p><p>If image is pulled correctly, you will get the following outcome.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Szt3RpnOCt1_00-QGOcHdQ.png" /></figure><p>We now have the image now we can get our size, image ID, and when it was last created using command: <em>docker images</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*_rQwgLZxG50i29BnghQqVQ.png" /></figure><p>Next, we will create our Dockerfile using vim which will build our image. To pull up vim editor use command <em>vim Dockerfile</em>(Remember to capitalize the D in Dockerfile) then insert the following code:</p><p><em>FROM nginx</em></p><p><em>COPY index.html /usr/share/nginx/html</em></p><p><em>EXPOSE 8080</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*dnUtvQMobfIzK6u0MfVR0A.png" /><figcaption>To save and exit select esc then :wq enter</figcaption></figure><p>In the directory we will create our index.html so use command <em>vim index.html </em>to bring vim editor back up and we will insert the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*19NbMeDyqAytrLvr39JKkQ.png" /></figure><p>We have created our files now to building docker container the following command will help do so: docker build -t &lt;name of container&gt;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zV7xWo2iwd5NAiZLsYQgSA.png" /><figcaption>If you don&#39;t put the . you will get an error</figcaption></figure><p>Then run command: <em>docker images </em>to view image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gxG4IyIdjBYa687giSDTFA.png" /></figure><p>Step 2 ask us to Deploy our container with port 8080 open. So from our images we will use command: <em>docker run -d -name&lt;Your Container&gt; -p 8080:80 docker image</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VCeXq5XkSBqmyF8roA83fQ.png" /></figure><p>To see our new container and also what&#39;s running and not running use command: <em>docker ps</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Y9_Ug6eCUzYFfumK3qbpA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NqdeTGbsFhllsWjyhxP9wA.png" /><figcaption><strong>curl localhost:8080</strong> allows me to see my dockerfile</figcaption></figure><p>Now lets check that the website is running and to do so type <em>http://&lt;your URL&gt;:8080</em> in the browser. If done correct you will get your test page like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H__kdsB6HrBU6kKl-HsUYQ.png" /></figure><p>Last and Final Step:))</p><p>Save your container data to the AWS Elastic Container Registry(ECR). To save our container registry we have to create a repository with the following command: <em>aws ecr create-repository — -name &lt;repository&gt; — — region us-east-1</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vYISkosiTU5ILzhQLNO_Eg.png" /></figure><p>Now go back to AWS to your ECR page to confirm the repository was created and is there and it is.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eQapaex1DMfC3uOalsaozQ.png" /></figure><p>The next image are the commands we need to use to push our image back to our repo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ihouZgh8bjf-X3ZUack48Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*prKxkNOmlr2pUwDO6_fU5A.png" /><figcaption>Disregard step 2 above!!</figcaption></figure><p>Ok we have pushed our image to our repository we need to double check by going back to our ECR page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ozmBFqi_yhMz0XI01FAqTA.png" /></figure><p>It&#39;s there so now we have to run a few commands to remove the container and images the following commands will do so.</p><p><strong>Images:</strong> <em>docker rm -f $(docker images -q)</em></p><p><strong>Containers:</strong> <em>docker rm -f $(docker ps -a-q)</em></p><p>After running those last commands that will sum up our project for week 16 hope it was informative and fun for you as it was for me.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67768259805a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQS Queue & Python]]></title>
            <link>https://medium.com/@kristian.hughes21/sqs-queue-python-f2a0b269c268?source=rss-c768dfcf8b46------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2a0b269c268</guid>
            <dc:creator><![CDATA[Kristian Hughes]]></dc:creator>
            <pubDate>Sun, 20 Nov 2022 22:31:39 GMT</pubDate>
            <atom:updated>2022-11-20T22:31:39.400Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*kmHteDCjIPTSSEDWo5ITDQ.png" /></figure><p><strong>Description:</strong></p><p><em>All code should be inline commented</em></p><ul><li><em>Create a standard SQS Queue using Python.</em></li><li><em>Create a Lambda function in the console with a Python 3.7 or higher runtime.</em></li><li><em>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.</em></li><li><em>Create an API gateway HTTP API type trigger.</em></li><li><em>Test the trigger to verify the message was sent.</em></li></ul><p><strong>Step 1:</strong></p><p>To start this week project we have to create a standard SQS Queue using Cloud9. So to do so I will run the following script. After you run the script it will give you a URL if ran properly like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AeTY1sMjZN1lUbUmQpkW9w.png" /><figcaption>I wrote the URL above down because I have bad memory LOL:}</figcaption></figure><p>I now have my URL so I will go back to AWS to see if it is listed. For those that maybe new to AWS we can search SQS then once it open we should see the SQS we created and also the URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CNQG997YbfKQ8OfaVuj3hA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q1R92Lvjo9BeWzYV3baTZA.png" /></figure><p>Next, we are asked to create a Lambda function in the console to send a message to the SQS Queue. Still in our console we go to Lambda then “<strong>Create Function</strong>” then follow step by step.</p><ul><li><em>Author From Scratch</em></li><li><em>Give the function a name &gt; sqs_lambdame</em></li><li><em>Runtime &gt; Python 3.8</em></li><li><em>Architecture &gt; Leave as is</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qcJ9wvyRaGqU5JpCA0cgAg.png" /></figure><p>Ok now that my function is created I then select <strong>Configuration</strong> then <strong>Permissions </strong>on the left<strong> </strong>side of the screen. Once we select <strong>Permissions </strong>we select Our role name. The following page should come next when it does select your recent policy name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6XuPXMfN5ziMeWLOA_cfHw.png" /></figure><p>We can forget our message we have to create so we have to edit our {JSON} script in order to send messages to the SQS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2cU9BaOvHSZYmI7QKN6tUg.png" /></figure><p>Lets head over to Lambda select our function, then afterwards code source should come up now we input our code we want as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zFsO8MXyaREJLO4ijZiYNg.png" /><figcaption>Make sure you select Deploy so changes will be saved</figcaption></figure><p>After our changes are saved select <strong>Test </strong>create new event, Template should be <strong>apigateway-aws-proxy,</strong> next we save then run test if you get the following message it was successful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wbWoxwIEk9xetXwIgqd-Ag.png" /></figure><p>Still in our AWS console we have to create an API Gateway HTTP API type trigger. So we go to Lambda select <strong>Configuration </strong>add trigger for Trigger configuration select<strong> API Gateway</strong> and Security should be <strong>Open </strong>then click<strong> Add </strong>at the bottom right of screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JOKmYE2EDj5oGyVCQurgCQ.png" /></figure><p>FINALLY TEST THE TRIGGER!!!</p><p>Choose the URL by your API endpoint once you select the link the current time should show up and if it does that means you have successfully completed your project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2sg11eWnwQ8TxlZv1CPx5A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2a0b269c268" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DynamoDB, Boto3 & Me]]></title>
            <link>https://medium.com/@kristian.hughes21/dynamodb-boto3-me-a99c55edd815?source=rss-c768dfcf8b46------2</link>
            <guid isPermaLink="false">https://medium.com/p/a99c55edd815</guid>
            <dc:creator><![CDATA[Kristian Hughes]]></dc:creator>
            <pubDate>Sun, 13 Nov 2022 21:59:05 GMT</pubDate>
            <atom:updated>2022-11-13T21:59:05.445Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bYk86b8w8Klk8DpvmyHQ3A.png" /><figcaption>DynamoDB + Python</figcaption></figure><p><strong>Rundown:</strong></p><ol><li><em>Create a DynamoDB table for something of your choosing (e.g. movies, food, games).</em></li><li><em>Using the Gist as a starting point, use Boto3 and Python to add 10 or more items to the table.</em></li><li><em>Use Boto3 and Python to scan the DynamoDB table.</em></li></ol><p><strong>Necessities to be successful:</strong></p><ul><li><em>AWS Account</em></li><li><em>Boto3 Installed</em></li><li><em>GitHub</em></li><li><em>DynamoDB services</em></li></ul><p><strong>Step 1- Create an environment</strong></p><p>We login to our AWS account we will type Cloud9 in the search bar. Next, we select the orange Create Environment button, once the next screen open we will then give our environment a name. Your description box is optional after that select Next Step. When the next screen open, we leave all default settings as is then Create Environment. Creating your environment takes a few so don&#39;t panic if it takes a while to load.</p><p><strong>Step 2- Boto3</strong></p><p>So this entire project is based off of Python so before we start creating our table we have to make sure Boto3 is installed so we will simply run command: <strong><em>pip install boto3</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ntf8mUPwdDYUsdfwDlth2g.png" /></figure><p>After that is completed, we can start having some fun. We will upload our import code for the table to Cloud9. My table will consist of WNBA Teams and when the teams were founded. Select the following link <a href="https://boto3.amazonaws.com/v1/documentation/api/latest/index.html">https://boto3.amazonaws.com/v1/documentation/api/latest/index.html</a> once we select this link we scroll to <strong>Code Examples </strong>then select<strong> Amazon DynamoDB. </strong>We will then fill in the table with<strong> Names, Attribute Type, and Attribute Name.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ggLZkN1O2mAIr7aMFXCFUA.png" /></figure><p>Now we have to check that our table is created, we will go back to our AWS account search for <strong>DynamoDB</strong> in the search bar when it opens up you should see your table is running and <strong>Active</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*Mh326PKettlZkZSU_gFJgA.png" /></figure><p>Next thing we have to do is add our items to the table but we first have to create a new file. In our IDE select the green (+) and select new file be sure to save and name it so you wont be confused. My new file will be WNBAInfo.py(always always have .py when you save)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F1x2T40AZaxfAZzxc2_4JA.png" /></figure><p>For our final step of the project we will use Boto3 and Python to scan the DynamoDB table. I referenced the following link to get my table to scan <a href="https://hands-on.cloud/working-with-dynamodb-in-python-using-boto3/">Working with DynamoDB in Python using Boto3 (hands-on.cloud)</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*JWAHo3OHyTUAXWu0Pbh-VQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*nuIplprNG7afBc8Rq6d2aQ.png" /></figure><p>This will sum up my Week 14 project of Level Up In Tech using DynamoDB and Boto3 to create table. Hope this will be helpful for future learners.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a99c55edd815" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Highly Available 3-Tier Architecture]]></title>
            <link>https://medium.com/@kristian.hughes21/highly-available-3-tier-architecture-3bd005896a53?source=rss-c768dfcf8b46------2</link>
            <guid isPermaLink="false">https://medium.com/p/3bd005896a53</guid>
            <dc:creator><![CDATA[Kristian Hughes]]></dc:creator>
            <pubDate>Sat, 15 Oct 2022 19:46:31 GMT</pubDate>
            <atom:updated>2022-10-15T19:46:31.397Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*Wd-_wO8HgRUx5ROWpdY9gg.png" /></figure><p>Directions: You have been asked to design and create a highly available 3-tier architecture for your company’s new web application.</p><p><strong>Web Tier</strong></p><ol><li>2 public subnets</li><li>Minimum of 2 EC2 instances with an OS of your choice(free tier) in an Auto Scaling Group.</li><li>EC2 Web Server Security Group allowing inbound permission from the internet.</li><li>Boot strap static web page or create a custom AMI that already includes the static web page.</li><li>Create a public route table and associate the 2 public subnets.</li></ol><p><strong>Application Tier</strong></p><ol><li>2 private subnets</li><li>Minimum of 2 EC2 instances with an OS of your choice(free tier) in an Auto Scaling Group.</li><li>EC2 Application Server Security Group allowing inbound permission from the Web Server Security Group.</li><li>Associate with private route table.</li></ol><p><strong>Database Tier</strong></p><ol><li>Use a free tier MySql RDS Database.</li><li>The Database Security Group should allow inbound traffic for MySql from the Application Server Security Group.</li><li>2 private subnets.</li><li>Associate with private route table.</li></ol><p><strong>First Step: Create a custom VPC, sign into your AWS account type VPC in the search bar select create VPC then select VPC only. Next, we leave our IPv4 CIDR block at manual input then input our IPv4 CIDR and leave everything as is that is manually set.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eazFcV9rrx0xn35gDAx9hQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LDN7Xlqvj49mMmKinlhaeA.png" /></figure><p>We have to create an internet gateway to attach our VPC to. After we have created our VPC on the left side of our screen we will select Internet gateways.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*39WCRai_UJEfqebJ9P9m7g.png" /></figure><p>Each tier has a different number of subnets:</p><p>Web Tier- 2-public subnets</p><p>Application Tier- 2-private subnets</p><p>Database Tier- 2-privater subnets</p><p>In order to get the subnets to function properly they have to be deployed with two different availability zones.</p><p>Lets go to our subnet option and create new. Our VPC ID is our VPC we created earlier. From here we create our subnets based off how many we need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uAzqlHdHqgsnLet4X1-6kw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RWpZjSMBL8mNQAMnALj-IA.png" /><figcaption>DO NOT forget to fill in your availability zone &amp; IPv4 CIDR block.</figcaption></figure><p>This next screen lets us know we set up our subnets properly</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*clHL3yukxdgs7mjBc-0aNg.png" /></figure><p>Next is our NAT Gateway(which is used to allow private subnets to connect outside the VPC). So to create the NAT Gateway for our private subnets we select NAT Gateways on the leftside of our screen then click Create NAT gateway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2mqJYSlybBweOeK_yf1ElA.png" /></figure><p>Route Table:</p><p>A route table is used to determine where data packets traveling over an IP network will be directed. Each subnet must be connected with a route table. You will need to different route tables one public and one private. Select create route table then follow along. After we create our table we will associate our table with it we select subnet associations then select our two public subnets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v-4MvexlipbTjMVjh8XP3Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yZc6huWjlfu_-4Wh3gnu4Q.png" /></figure><p>Make sure to edit routes, add new destination and target(Internet Gateway)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q3y_WA3KGVkfLr55Xqzl9Q.png" /></figure><p>Web Tier</p><p>Type EC2 in your search bar then once the screen opens select launch template then create launch template.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yrjO3rhtZU6pDYEkOPY0LA.png" /></figure><p>Select AMI of your choice</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eIOztQttf4Yx9JAr0E7zIg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Iic7tyOyCbpTrYK4zwALA.png" /></figure><p>Under network settings we create a security group to allow HTTP and SSH traffic. Give your security group a name and select your VPC from earlier. After we input all our info we scroll down to Advanced details select user data and enter our start up for BASH script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r3nfsfnn6BYvwC85M0zPtg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zt5KqwbR5LaqvrKJzsnhAg.png" /></figure><p>Creating our Auto Scaling group is next:</p><p>You can select create auto-scaling group from the page that comes up after you launch your template. Give the auto-scaling group a name, after you select next your network screen will open we select our VPC and two public subnets. For load balancing we will attach to a new load balancer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D9qqBuIxLqRJOA9H1BW4ig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ubc7R4VzEyYLTuqZRRTGoA.png" /></figure><p>Internet facing options allow the availability zones and subnets to be selected already. Set your group size to a desired capacity of 2, min to 2 and max to 5.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zjDsTn7kcSsLwqSJ_EswjQ.png" /></figure><p>Application Tier</p><p>Create a new launch template for EC2 instance give template a new name and select AMI(Amazon Linux) and instance type t.2 micro. Network settings for security group is to allow SSH &amp; ICMP traffic.</p><p>Now for ASG create a new name select the application tier of your choice and select your two private subnets from earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*75HWYCLe_ttH-lITfKon3w.png" /></figure><p>For our final tier which is Database we have to create a MySql RDS Database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EPg4N0e4V-xsHfE8XUFTBQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M0KY66i8K8GBBJr0oK1rRA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*34WgwG7ZOEE_H_-s2bkegg.png" /></figure><p>Lastly we have to edit our inbound rules by selecting our database we created select actions then edit inbound rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9iciRqzHjQQmCFI4ghsn8A.png" /></figure><p>Lets test our work:</p><p>To test Web Tier we have to go to our EC2 dashboard select either public subnet then copy the Public IP address into your web browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k_Rof9h-XVQgGJX6oj5ifA.png" /><figcaption>Web Tier functions work!!!</figcaption></figure><p>Application Tier you have to connect to your SSH instance, I used powershell then input the ping command to the Application tier of the IP address.</p><p>I ran into a few roadblocks getting the number of packets transmitted and received to load for the application tier.</p><p>Thank you for reading hope you enjoyed:]</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bd005896a53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating DynamoDB & EC2 Instance!]]></title>
            <link>https://medium.com/@kristian.hughes21/creating-dynamodb-ec2-instance-9cf4817f8ced?source=rss-c768dfcf8b46------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cf4817f8ced</guid>
            <dc:creator><![CDATA[Kristian Hughes]]></dc:creator>
            <pubDate>Sat, 01 Oct 2022 13:25:14 GMT</pubDate>
            <atom:updated>2022-10-01T13:25:14.197Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*Xze_Xz2roNj82VzejItFdg.png" /></figure><p>Quick project rundown:</p><ol><li>Create a DynamoDB table for something of your choosing (e.g. movies, food, games)</li><li>Add 10 or more items to the table</li><li>Create a t.2 micro EC2 instance</li><li>Using an IAM role and the principle of least privilege, grant the EC2 instance read access to DynamoDB.</li><li>Use the AWS CLI in the EC2 Instance to scan the DynamoDB table.</li><li>Use the AWS CLI in the EC2 Instance to validate you cannot write an item to the DynamoDB table.</li></ol><p>First we login to AWS then we go to the DynamDB tab and create a table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*qOBVCjrOsep1I7T5BX-riw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*qOp_sJwF9Vd1lK1ExHGnvg.png" /></figure><p>Now to the fun stuff of creating our table we will fill in the table name, partition key and sort key. After that is done, we will scroll down to the table settings but leave everything else at default settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jvLVuy3IaZ2RU6g4c9mo_Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OyASjXxQs9vvlfMO_urNHg.png" /></figure><p>We have created our table now and it should read active. Next, we have to select the actions tab and select explore items the next screen that opens up will be the screen for us to input the topics for our table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rEroHqN3Y838suPot-3FVQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tLeXgLHdgdkLA-07z7wXog.png" /></figure><p>From here we have to create a t.2 micro EC2 instance, type EC2 into your search bar and when the screen opens select launch instance. Keep your instance type at t.2 micro and give your key pair a new name. The network settings will be the one of the previous settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TysV-JWJwTlFK9OsvEmfrw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DbC3hxoZPef-d-lSWO5y8A.png" /></figure><p>When we do our security group this is how we set up our SSH to allow traffic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mzIOHFtd863qByIwGo10AA.png" /></figure><p>Step 4 of our project ask us to grant access to the EC2 instance to read the DynamoDB table. So, in the advanced settings of the EC2 instance select create new IAM profile. Then we select Create Role keep Trusted entity type as is but the Use Case should be EC2 then select Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*14xs8wMwY7b3Tg9oLlfApQ.png" /></figure><p>Add permissions screen will come up to narrow down your selections type DynamoDB then select DynamoDB read only access. After our role is created go back to our instance screen and input our role we created. Now we can launch our instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G_VEKRTKi6tgCVL9TRv7Tg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zSgws0ky6sfIxel4yloRQQ.png" /></figure><p>Our instance is now created so we have to connect to it to use our CLI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XWiFnztcTV3HblxVor85FA.png" /><figcaption>Selecting connect here will open our Management Console</figcaption></figure><p>Once our management console open below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KbpZHRFo3YZ4WUNghKOMsg.png" /></figure><p>we will use the following command: <strong>aws dynamodb scan -table-name SneakerNews — region us-east-1</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x3tCnZCIV4zmiZ3DYcCPJw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*NXfjZXPAsASEhIwP6vUmHw.png" /></figure><p>The last step of our project ask us to use the AWS CLI in the EC2 instance to validate you cannot write an item to the DynamoDB table. So for us to do that we have to use command: <strong>aws dynamodb put-item — table-name SneakerNews — region us-east-1 — item ‘{“Jordan Style”: {“S”: “Jordan 3”}, “Release Year”: {“S”: “1988”}}’</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uvL1ZrmT5xj9PBfHIUbpBw.png" /><figcaption>The error message lets us know you CANNOT write an item to the DynamoDB table.</figcaption></figure><p>This concludes my week 8 project of LUIT!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cf4817f8ced" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Auto-Scaling group of an EC2 Instances]]></title>
            <link>https://medium.com/@kristian.hughes21/auto-scaling-group-of-an-ec2-instances-d86eb07c5a2d?source=rss-c768dfcf8b46------2</link>
            <guid isPermaLink="false">https://medium.com/p/d86eb07c5a2d</guid>
            <dc:creator><![CDATA[Kristian Hughes]]></dc:creator>
            <pubDate>Mon, 26 Sep 2022 00:30:44 GMT</pubDate>
            <atom:updated>2022-09-26T00:30:44.832Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*2UNv6F9XNO7R8uW2f2aSGA.png" /></figure><p>Quick Summary:</p><ul><li>Create a VPC with CIDR 10.10.0.0/16.</li><li>Create three public subnets with 10.10.1.0/24 &amp; 10.10.2.0/24 &amp; 10.10.3.0/24.</li><li>Create an autoscaling group using t2.micro instances. All instances should have apache installed on each instances with the ability to check any random IP address and be able to produce a test page. Ensure autoscaling group is using the public subnets from #2.</li><li>The autoscaling min and max should be 2 and 5.</li><li>Create an Application Load Balancer to distribute traffic to the autoscaling group.</li><li>Create web server security group that allows inbound traffic from HTTP from your Application Load Balancer.</li><li>Create a Load Balancer security group that allows inbound traffic from HTTP from 0.0.0.0/0.</li></ul><p>To get started we have to navigate to the VPC pane select create VPC(it can be done two different ways) but we will go the quicker route. First we choose VPC and more then start inputting our information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xosDEy_D3JSjWCsY1byocQ.png" /></figure><p>All your availability times should be different so it will not be any issues during configuration. Next, we have to set up our subnets make sure you select customize subnets CIDR blocks to put in subnet information. Now that we have done our subnets we select create VPC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L7hkybTcyx3u9C4KsmrOZQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*iQlUXVt8_jZNUK-vh5n8BA.png" /></figure><p>If everything is filled out correctly we should see this screen reading success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z4so2lHZ9TibQSr58c-OcA.png" /></figure><p>Now we have to create our EC2 launch template to get there just type EC2 in your search bar to pull up dashboard then on the left side you will see launch template. Once the screen opens, we select create launch template.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*-B43WQvcuD505685RzDnRw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*NZrbL8iHsRrU14SHFj1hhA.png" /></figure><p>When setting up launch template we have to do AMI, Instance type, key pair and network settings. Make sure when you select your VPC use the name you created earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qr2VJfuD6eLGGZ6DK3PN8w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SK3ehlp4yPw4Y2OSLccUnA.png" /></figure><p>For the security group we have to set up SSH &amp; HTTP and network configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OYJB5F3sQiOb6ryeGKMQBQ.png" /><figcaption>In advanced network configuration make sure Auto-assign public IP is enabled.</figcaption></figure><p>Now I have to update my user data to enable Apache for this we will use Bash script to input our commands for Apache.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eHJMOv2rlHlunE_ezNsuGg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fS1Ju93aAppDCOT1_o4ncg.png" /><figcaption>This message informs us that the launch template was set up correct.</figcaption></figure><p>Let&#39;s create an Auto-Scaling group</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jg7vG355atjEsxSF6Z6Fuw.png" /></figure><p>In the network section we select our VPC from earlier and our subnets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O8mb7NiUstFFrAbeNL8AmQ.png" /></figure><p>Load balancing says optional, but we will select attach to a new load balancer this will give us open internet access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AQoK3foLYM9mSH6zcs6gaQ.png" /></figure><p>From the instructions in step 4 of the project the auto scaling min and max should be 2 as minimum and 5 being the maximum. The purpose of these numbers is what is allowed for each instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ngeLLq_4EDO--HI2BOzfjg.png" /></figure><p>Now we get to the fun part we get to check and see if our instances are running and if Apache was installed properly. Copy your public IP address from your instance screen into the web browser and if it&#39;s working properly the Apache test page should come up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pyF5lyDO_r97ljYU12gpfQ.png" /><figcaption>SUCCESS!!!!</figcaption></figure><p>I hope this was a good read for you and helpful for future AWS users.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d86eb07c5a2d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>