<?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 Aynda Parker on Medium]]></title>
        <description><![CDATA[Stories by Aynda Parker on Medium]]></description>
        <link>https://medium.com/@aparker735?source=rss-47f7d62462b0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4E2uIuLUPbQKt74o0m7fMw.gif</url>
            <title>Stories by Aynda Parker on Medium</title>
            <link>https://medium.com/@aparker735?source=rss-47f7d62462b0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 09:56:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aparker735/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Terraform: Jenkins Server Deployment]]></title>
            <link>https://medium.com/@aparker735/terraform-jenkins-server-deployment-75da1b0fc04f?source=rss-47f7d62462b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/75da1b0fc04f</guid>
            <dc:creator><![CDATA[Aynda Parker]]></dc:creator>
            <pubDate>Wed, 20 Nov 2024 03:21:40 GMT</pubDate>
            <atom:updated>2024-11-25T01:47:17.046Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello I am back, your favorite cloud engineer with deploying a Jenkins Server using Terraform. My team would like to start using Jenkins as their CI/CD tool to create pipelines for DevOps projects. They need to create the Jenkins server using Terraform so that it can be used in other environments and so that changes to the environment are better tracked.</p><p><strong>Why use Terraform?</strong></p><p>Terraform is a popular infrastructure-as-code (IaC) tool, developed by HashiCorp, that allows users to define, provision, and manage infrastructure resources across multiple cloud providers and other services. Terraform provides efficiency, automation, consistency, and version control.</p><p>I need to do the following:</p><ol><li>Deploy 1 EC2 Instances in your Default VPC.</li></ol><p>2. Bootstrap the EC2 instance with a script that will install and start Jenkins. Review the official Jenkins Documentation for more information:<a href="https://www.jenkins.io/doc/book/installing/linux/"> https://www.jenkins.io/doc/book/installing/linux/</a></p><p>3. Create and assign a Security Group to the Jenkins Security Group that allows traffic on port 22 from your ip and allows traffic from port 8080.</p><p>4. Create a S3 bucket for your Jenkins Artifacts that is not open to the public.</p><p>5. Verify that you can reach your Jenkins install via port 8080 in your browser. Be sure to include a screenshot of the Jenkins login screen in your documentation.</p><p>6. Push your code to GitHub and include the link in your write up. This step is crucial because all members of the team will have access, especially if changes need to be made.</p><p>I must confess that this is the first time I have used Cloud9. I am a VScode lady and had my biases, however Cloud9 worked out just fine. Team grateful! Ok, enough of my yapping, let’s do this.</p><p><strong>Note:</strong> Best practices create infrastructure one step at a time. No one wants to run into the issue of a section of your code not working properly.</p><p>I created a <strong><em>main.tf file</em></strong> that Terraform will recognize and utilize. In this file I had to input my code. I referenced <strong><em>Terraform Registry and Terraform, </em></strong>to get the job done.</p><p>In order to get the code started I needed to get the AMI-id to place in the AWS resource. I went through the process of launching an instance in order to retrieve and copied the AMI-id. I did not launch the instance.</p><p>While building my infrastructure I used the following commands each time to make sure that everything is good. If the syntax is correct, you can move forward in the process using Terraform.</p><p>I ran into several Syntax errors that after much analyzing I figured it out!</p><pre># This command rearranged the format of Terraform config files, it helps with correcting structure<br>terraform fmt<br># This command will setup the backend of your infrastructure and download provider plugins<br>terraform init<br>#The command that checks your configuration files for syntax errors and basic issues<br>terraform validate<br>#The command that a command that creates an execution plan, showing what actions Terraform will take to change the infrastructure to match the desired state defined in your configuration files<br>terraform plan<br>#The command that executes the changes required to reach the desired state of your infrastructure, as defined in your Terraform configuration files<br>terraform apply</pre><p>Terraform will always asked if you are sure about the new changes and you must type “yes”. You can also bypass this question by using the “auto-approve” command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*yl_bnQmvo-CVXXG38VcBlQ.png" /><figcaption>Terraform apply completed</figcaption></figure><p>The image above displays the successful creation of infrastructure.</p><p><strong>Here is the Main.tf file</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*qKGOxnZZ8htHIgKnl-L09g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*OGdELQjoPd-5iAV9aSluXA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*dg3SXvBNohAojXHcEVRTMQ.png" /></figure><p><strong>Step1: I created the EC2 instance in my default VPC:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*lrSobaFduqjVv0soPKjDSA.png" /><figcaption>Instance creation</figcaption></figure><p><strong>Step2: Security Group Creation and the rules:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*Ski3ybrPPOo8otS-9M1evA.png" /><figcaption>Security group and 3 rules created</figcaption></figure><p><strong>Step3: S3 Bucket created with “No Public Access”:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/778/1*Pmx_JI_4KUsnuEO0eqzb6g.png" /><figcaption>S3 Bucket creation</figcaption></figure><p><strong>Step 4:</strong> The user-data.sh file was created to storage the script for installing Jenkins on the instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*dDUUAi_z6XsrQj9trMBM-w.png" /><figcaption>user data file</figcaption></figure><p><strong>Step 5:</strong> Verifying that I can access the Jenkins start up page. I pasted the EC2 instance public IP address along with :8080 in the browser. Let’s see if I can reach the webpage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*LpyoABL2T6gKb0o2lQBfWw.png" /><figcaption>User data success and Jenkins welcome page</figcaption></figure><p><strong>The final step</strong> push the code to my Git hub from the Cloud9 terminal.</p><p><strong><em>Side note: I logged into my Github account and created a repository “Terraform” that was set to public.</em></strong></p><h3>Trouble shooting:</h3><p>I ran into an issue in the last step, I could not push my file to Github. I kept getting the error stating that my file was too large. I researched myself and try some things but it didn’t work.I reached out to a few team mates and my coach to work the problem. So, after many commands attempted and tweaks. We concluded that I may need to create another environment in Cloud9 and try to push my code to Github.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*FE_c20xyjSAhhLd8Klklug.png" /><figcaption>Repeated error code</figcaption></figure><p>I created the environment and then pushed the “main.tf file” to GitHub. I discovered that I pushed an empty file, I forgot to save the contents in the file before pushing it to Github.</p><p>Here are the commands I ran to get the contents in the file within Github.</p><pre>git add &lt;filename&gt;<br>git commit -m &quot;Add content to &lt;filename&gt;&quot;<br>git push origin main</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*WZ6rtYNrrGgApKEtf2FBWA.png" /><figcaption>The file has been added</figcaption></figure><p>Make sure you have the right branch and file name before running the code because that is important for these steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*Jnbj5oe40VrCkX8My3vtjA.png" /><figcaption>The file in Github</figcaption></figure><p>Now the file is in the Github. It is public for anyone’s future use.</p><p>Here is the link to <a href="https://github.com/AyndaP/Terraform">Github</a>.</p><p>I hope you enjoyed this article and please follow me on Linkedin!! Come back to read more from me</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75da1b0fc04f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reaching higher heights: Building an AWS Environment with VPCs, Subnets, and Auto-Scaling Apache…]]></title>
            <link>https://medium.com/@aparker735/reaching-higher-heights-building-an-aws-environment-with-vpcs-subnets-and-auto-scaling-apache-8d0d9646c0f5?source=rss-47f7d62462b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d0d9646c0f5</guid>
            <dc:creator><![CDATA[Aynda Parker]]></dc:creator>
            <pubDate>Tue, 29 Oct 2024 01:12:44 GMT</pubDate>
            <atom:updated>2024-10-29T01:12:44.876Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*f31r4AJ44Wivdqkveua_hw.png" /><figcaption>Network Image</figcaption></figure><h3>Reaching higher heights: Building an AWS Environment with VPCs, Subnets, and Auto-Scaling Apache Servers</h3><p>Here I am again, your favorite Cloud Engineer! I have been assigned with task to move Level Up Bank on premise network to the cloud. Now after testing and moving a server over to Ec2, the <strong>Level-Up Bank</strong> is looking to move its network to the cloud to improve scalability, reliability, and security. The bank decides to use AWS for its cloud services. This will start by creating a VPC with a CIDR of <strong>10.10.0.0/16</strong>.Click on <strong>Create route table</strong>.</p><ul><li>Fill in the details:</li><li><strong>Name tag</strong>: (e.g., PublicRouteTable)</li><li><strong>VPC</strong>: Select your VPC.</li><li>Click <strong>Create</strong>.</li><li>Select the route table and click on the <strong>Routes</strong> tab.</li><li>Click on <strong>Edit routes</strong> &gt; <strong>Add route</strong>.</li><li><strong>Destination</strong>: 0.0.0.0/0</li><li><strong>Target</strong>: Select the Internet Gateway (e.g., MyIGW).</li><li>Click <strong>Save routes</strong>.</li><li>Go to the <strong>Subnet Associations</strong> tab.</li><li>Click on <strong>Edit subnet associations</strong> and select your three public subnets. Click <strong>Save</strong>.</li></ul><h3><strong>1. Creating the VPC</strong></h3><p>A virtual private cloud is a virtual network environment within the cloud.</p><p>Let’s go!</p><p>Step 1: Log in to your AWS Management Console.</p><ul><li>Navigate to the VPC dashboard.</li><li>Click “Create VPC.”</li><li>Specify the CIDR block as <a href="http://10.10.0.0/16">10.10.0.0/16</a>.</li><li>Create the VPC.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*hx4vb8uwgVAJOPrwFv3LGg.png" /><figcaption>Creating the VPC</figcaption></figure><h3>2. Create Public Subnets</h3><p>1.In the VPC dashboard, click “Subnets.”</p><p>2.Filter for the VPC You Created</p><p>3.Create a Subnet</p><p>4. Look for an option to create a new subnet within your VPC.</p><p><strong>Configure the Subnet</strong></p><p>5.Name the subnet (e.g., “PublicSubnet-1).</p><p>6. Choose the availability zone where you want the subnet to reside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*o2LbUoSlci6N9L8rvOLiPg.png" /><figcaption>Subnet Creation</figcaption></figure><p><strong>Set the IPv4 CIDR Blocks</strong></p><p>7. The VPC CIDR block value mentioned is 10.10.0.0/16.</p><p>8. For the subnet, use the IPv4 subnet CIDR value 10.10.1.0/24.</p><p>9. Confirm settings and create the subnet.</p><p><strong>Select “Create Subnet”</strong></p><p><strong><em>Public subnets are subdivision of a larger network, typically within the context of the VPC. They can be thought of blocks in the network or a neighborhood for a more simpler concept.</em></strong></p><p>Follow these steps above to create two more subnets. We will create the two subnets in different availability zones (US-east-2b and US-east-2c).</p><p>We need to make these subnets accessible to the public. The “<em>Auto-Assign public IPv4 address” </em>needs to be switch to “Yes”. At the moment the settings are set to “No” This can be change individually for each subnet.</p><ul><li>Select the box next to the first subnet, click on “<strong><em>Actions</em></strong>” and “<strong><em>edit subnet settings</em></strong>”</li><li>Check the bock next to “<strong><em>Auto-Assign public IPv4 address</em></strong><em>” </em>and click save<em>.</em></li><li><strong>Repeat the process for the next two subnets</strong></li></ul><p>Now we have to create the <strong>Internet Gateway.</strong> This will allow the subnets to receive and send information from the internet. We want the network to have access to the internet.</p><p><strong>3. Internet Gateway Creation</strong></p><ol><li>Navigate to the VPC console by typing VPC in the search bar</li><li>Select <strong>Internet Gateway</strong> on the dashboard on the left</li><li>Select create <strong>Internet Gateway</strong></li><li>Name the gateway <strong>(IGW-Blue)</strong> and then click create gateway</li></ol><p>Now we attach the internet gateway to the VPC to enable the VPC to communicate with the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*A8FtD0eM4jvWLVANf8Ewcg.png" /><figcaption>Internet gateway creation</figcaption></figure><p><strong>4. Route table creation</strong></p><ol><li>Navigate to the dashboard on the left and select “Route Tables” you want to choose the table that is associated with your VPC.</li><li>Then select “<strong>Route</strong>” and press “<strong>edit route</strong>”</li><li>Select “<strong>Add route</strong>”</li><li>In the destination search bar select “0.0.0.0/0. This will allow all internet addresses to travel through the internet gateway.</li></ol><p>Note: Notice that there’s a default route table exists and we will NOT change the settings. Now the route we’ve created needs to “<strong>associate the subnets explicitly</strong>” with the new route table.</p><p>Click <strong>“Subnet Associations”</strong> and you will see that the subnets are not associated with the route table created.</p><p>So we click <strong>“edit Subnets”</strong>, select all three of the subnets, and save changes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*iaHcak3jewUHv_yWi8RStw.png" /><figcaption>Subnets Association</figcaption></figure><h3>Auto Scaling Group and Load Balancer Creation</h3><p>Let’s do it!!</p><p>Level Up Bank made it clear that they would need a setup that could withstand large volumes of traffic. So there is where the auto scaling groups needs to be created.</p><p>I navigate to the ASG and started process. I created the launch template utilizing the Amazon/Linux. I choose the free tier option and made sure to select the VPC I created. Next have to input the Bash Script in the user data field.</p><p><strong>Note:</strong> Creating the launch template is very similar to instance creation process. Configuration of the instances are part of this section as well due to creating the auto scaling group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*5RofMMmm8ZLiW42SjWnaCQ.png" /><figcaption>Bash Script</figcaption></figure><p>Attach the <strong>VPC</strong> and the <strong>public subnets</strong></p><p>5. Create the ALB. I made the target group under Listeners and Routing to target group. (VPC-ASG-1)</p><p>Create launch template and then go back to the Auto Scaling group page to refresh. The new launch template will be present in the options.</p><h3>Configure Group Size and Scaling</h3><ul><li>We will set our desired capacity to 3.</li><li>Our Min capacity will be 2.</li><li>Our Max capacity will be 5.</li><li>Leave the “<strong>No scaling policies</strong>” option selected. You will continue with the process.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/761/1*R82oCbVlBQVoVDXO1DcB7w.png" /><figcaption>ALB creation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*FYgs7X5TkCbQxq72F7pcWQ.png" /><figcaption>ALB creation</figcaption></figure><p>Set up a target group for your ALB and add your web server instances as targets.</p><p>Ensure that your web servers are registered with the ALB target group.</p><p><strong>Now we can navigate to the instances page in the AWS console to see our 3 instances running.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*yhfBbBMilmzDepK9C3BV-g.png" /><figcaption>Instances running in each subnets created in 3 different availability zones</figcaption></figure><p><strong>6. Create a Web Server Security Group Rule:</strong></p><ul><li>First, create a security group specifically for your web servers. Let’s call it “Web-SG.”</li><li>In the inbound rules for “Web-SG,” allow traffic on port 80 (HTTP) and 443 (HTTPS) from any IP address (0.0.0.0/0). This will ensure that your web servers can receive HTTP and HTTPS requests.</li><li><strong>Note that you should not allow any inbound traffic from the public IP of your web server directly. All users should access your website through the Application Load Balancer (ALB).</strong></li></ul><p><strong>7. Create a Load Balancer Security Group</strong> <strong>(ALB-SG)</strong></p><ul><li>Next, create a security group for your ALB. Let’s call it “ALB-SG.”</li><li>In the inbound rules for “ALB-SG,” allow traffic on port 80 (HTTP) from any IP address (0.0.0.0/0). This will allow the ALB to forward HTTP requests to your web servers.</li><li>You don’t need to allow HTTPS traffic directly to the ALB because it will terminate SSL connections and communicate with your web servers over HTTP. This will be for the Application Load Balancer.</li></ul><p>Finally,</p><p>We can verify if the Apache Server can display our custom webpage that was created in the user data field in the launch template.</p><p>We will select and copy the IPV4 address for each instance and paste in a web browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*ltN65Y_i6SxB5ubj3G331Q.png" /><figcaption>Instance 1 configured</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*cBrGMiYRrDXwziHgeXM7TA.png" /><figcaption>Instance 2 configured</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*W8l7b6xBhNu9W3cwreligQ.png" /><figcaption>Instance 3 configured</figcaption></figure><p><strong>8. Use this DNS URL in your browser to verify that you can reach your site. The ALB will distribute incoming requests to your web servers.</strong></p><p>We will <em>Copy the DNS name for our Application Load Balancer and paste it into your web browser to see if we can reach our EC2 instances through our ALB DNS name.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*v7fMZxaXW5JCbl6fFOwbRA.png" /><figcaption>Instance reached through ALB DNS name</figcaption></figure><p>As you can see in the web browser the ALB is in action. I hope Level Up Bank will be happy with the results. Since they migrated their network to the cloud, Level Up Bank can scale the traffic with the usage of load balancer and the auto scaling group. They will have increased reliability and availability via instances in three different availability zones.</p><p>Hopefully you can take away some gems from this article. Follow me on Linkedin. Please come back again to see more from me.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d0d9646c0f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Containers, Containers, and more Containers]]></title>
            <link>https://medium.com/@aparker735/containers-containers-and-more-containers-6fcf930e91e6?source=rss-47f7d62462b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fcf930e91e6</guid>
            <dc:creator><![CDATA[Aynda Parker]]></dc:creator>
            <pubDate>Sun, 29 Sep 2024 03:29:34 GMT</pubDate>
            <atom:updated>2024-09-29T03:29:34.044Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi everyone, I am back! Your favorite cloud engineer. I am here to discuss the wonderful world of Containers using Docker. Level Up Solutions needs my help so here I am!</p><h3>User Case</h3><p>Level Up Solutions is a dynamic technology company that offers innovative web solutions to its clients. As part of their software development process, they have decided to adopt containerization using Docker to streamline their web application deployment. Docker provides Level Up Solutions with a flexible and efficient way to package, distribute, and run their applications in isolated containers, ensuring consistency and portability across different environments.</p><p>Level Up Solutions can harness the benefits of Docker containers, including consistency, portability, isolation, reproducibility, version control, scalability, streamlined deployment, and improved collaboration. These advantages contribute to more efficient and reliable web application deployments, enhancing the overall development and deployment processes for the company.</p><p>The benefits of containers: <strong>Consistency and Portability, Isolation and Resource Management, Reproducibility, Version Control, Scalability, and Streamlined Deploymen</strong>t</p><p>Materials needed</p><ul><li>AWS EC2 Instance (running)</li><li>VS code</li><li>Remote SSH and few extensions such as Gitlens</li></ul><p>Ok, so let’s dive into Containers.</p><h3><strong>EC2 Instance Creation</strong></h3><p>First order of business, I have to create and deploy the EC2 instance. You have to configure the settings for your instance. So I used Ubuntu as my AMI, created a new key pair, instance type-t2. micro, and Network settings (I created a new security group).</p><p>Leave all the other settings at default. Lastly, SSH into your instance.</p><h3><strong>Docker Installation</strong></h3><p>I navigated to the terminal in VS code. I need to install Docker with the following command.</p><pre>curl -fsSL https://get.docker.com -o get-docker.sh</pre><p>Then we need to initialize the installation with this command:</p><pre>sh get-docker.sh</pre><p>Next I will verify that Docker is installed by running this command</p><pre>Docker version</pre><p>You should see this image in your terminal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*AHRXdKh6NY6srU7zMJXNhQ.png" /><figcaption>Verification of Docker on the instance</figcaption></figure><p>I have install some extensions in VS code and connect to the instance using VS code. Here are the few extensions that I installed (Gitlens, SSH remote, and Docker).</p><p>Before going deeper into this project, I must say that there were problems from the start. However, I will show and hopefully explain the issues and probable solutions.</p><p>First, I was suppose to SSH remotely via VS code. I was unable to connect to my server,I kept receiving the message (could not establish connection to Docker, the operation timed out) after multiple attempts. The end result, I connected using the SSH-i command from the AWS console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*Fj_kQn25allZeq-CZ5OptQ.png" /><figcaption>Cannot establish connection</figcaption></figure><p>So I cannot show the steps for that process because of the connection issues. In order to be able to SSH remotely you need a config file with the following components (<strong>Host</strong>-Docker, <strong>HostName</strong>-IPV4 address on my instance, <strong>User</strong>- Ubuntu, and my <strong>IdentityFile</strong>- is the path of my private key pair (BlueDocker.pem). This file was created before attempting to SSH remotely. I thought I would share the file!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*x2owIX1lENErEbiGW58tow.png" /></figure><p>Ok so I have deployed the EC2 and downloaded Docker, we are now ready to move forward.</p><p>Let’s jump into it!!</p><p>1. Run a Docker Ubuntu container running detached and on port 80</p><p>a. Note: keep in mind that there are different Ubuntu images. Depending on the one you use, you may have to install some tools that come standard in other images.</p><p>2. Using BASH shell update all packages within the container .</p><p>3. Using BASH install Apache2 on the Ubuntu container.</p><p>4. Add a custom webpage.</p><p>5. Verify you can reach the webserver from your browser</p><p><strong>Step 1: </strong>Run a Docker Ubuntu container running detached and on port 80</p><p><em>Side Note: Best practices run this command before doing anything in Docker so won’t run into any permissions or errors when running Docker commands. Then Pull the image.</em></p><pre>sudo chmod 666 /var/run/docker.sock</pre><pre>Docker Pull Ubuntu</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*PiMhf-PcTY-VFQf74Lu3fw.png" /><figcaption>Terminal Output</figcaption></figure><p>The following command is needed to run an Ubuntu container on port 80</p><pre>docker container run -itd -p 80:80 ubuntu</pre><p><strong>Inside the terminal</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*NXW1N8_YQoC2P4r3Q0LyrQ.png" /></figure><p>I always like to verify if the thing I created is up and running, so that command would be the following:</p><pre>docker ps -a</pre><p>If the container created is running successfully you will see the Container ID above.</p><p><strong>Step 2: Using BASH shell update all packages within the container</strong></p><p>First I have to get into BASH Shell inside the container, so here is the command</p><pre>docker exec -it &lt;container name&gt; bash</pre><p><strong>Inside the terminal:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*L4B0KGkHw96ei79pwUY1fg.png" /><figcaption>Attempting BASH access</figcaption></figure><p>In the end I was able to access the BASH shell inside the container. So let me give some insight on what is happening inside the terminal. I used the command above to access the BASH shell and didn’t work so I decided to make sure the container existed with the command [<strong><em>docker container ls</em></strong>]. As you can see it is listed with all the information regarding the container. Then I decided to run the command above with using the container id instead of the default name created by Docker. Finally I was able to access the Shell as you can see [<strong><em>root@containerid</em></strong>]. I am not sure why the command would not work with the given default name.</p><p>Next step I need to update the packages in the container with the following command:</p><pre>apt update<br>apt upgrade<br>y (yes)</pre><p>Inside the terminal:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*E_CjFztcRDNUphwXmVDc9A.png" /><figcaption>apt update</figcaption></figure><p>You will also see the packages being upgraded in the terminal as well.</p><p><strong>Step 3- Using BASH install Apache2 on the Ubuntu container</strong></p><p>Installing Apache2 , I used the following command:</p><pre>apt install apache2</pre><p>Once it is installed we can verify it is running or not. Most times it is not running because I did not tell it to run and it will not run automatically. I can verify by running the following command.</p><pre>service apache2 status </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*329BGioBWN_R0ZqlDVPRbw.png" /><figcaption>verifying and starting Apache2</figcaption></figure><p>Once I verified Apache2 was not running, I ran the following command.</p><pre>service apache2 start</pre><p>As you can see Apache2 is running.</p><p><strong>Verify Apache2 in Web Browser</strong></p><p>In order for me to verify Apache2, I will copy the IPV4 address for my instance. I will paste it in my web browser and you should see the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*Xf7UCbwlJyg4lpOAnKwk2A.png" /><figcaption>Apache2 default page</figcaption></figure><p><strong>Step 4- Add a Custom Webpage</strong></p><p>Here is another step when I hit another road block. I wasn’t sure about the process of customizing a html file. I researched but nothing that I read was making sense, so I needed help from some experts. Before receiving the help I exited out of everything in the terminal and AWS. The larger issue was, I couldn’t access my container or anything, once I got everything back up and running. It was as if it disappeared and I had no access to the container I created.</p><p>So I remove any containers and/or images and recreated everything. I repeated the steps above. I was able to complete all steps in my terminal but I wasn’t able to see the custom webpage in my browser.</p><p>Here is the evidence of creating the custom webpage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*XfRnpglGwdwfIVwoSaZmGA.png" /><figcaption>copy the initial html file to edit and customize it</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*qUuUaJbxF1XEa0mm6PCAGw.png" /><figcaption>Custom webpage</figcaption></figure><p><strong>Step 5- Verify you can reach the webserver from your browser</strong></p><p>I could not reach the custom webserver in the browser. It kept timing out! I was having issues with the Ubuntu image. My coach and I tried everything under the docker sun. My coach tried to replicate the process from the local machine and it wouldn’t work. We used several commands to help with the process, pulled another Ubuntu image and it wouldn’t connect due timing out. All the solutions you could think of we tried it. The problem was out of my hands.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*IDBKxllBp_KFxKVmpuYyLg.png" /><figcaption>Failed to connect</figcaption></figure><p>In Conclusion, I couldn’t solve Level Up Solutions problem today. The situation was out of my control but they were understanding. They only want to work with their Favorite Cloud Engineer so stay tuned until next time to read about the next problem I will solve.</p><p>I hope you have enjoyed my article. Thanks for reading. Follow me on Linkedin to see more articles from me.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fcf930e91e6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Amazing World of Linux!!!]]></title>
            <link>https://medium.com/@aparker735/it-is-your-favorite-cloud-engineer-back-at-it-again-solving-problems-one-day-at-a-time-14580a522071?source=rss-47f7d62462b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/14580a522071</guid>
            <dc:creator><![CDATA[Aynda Parker]]></dc:creator>
            <pubDate>Sun, 15 Sep 2024 02:24:25 GMT</pubDate>
            <atom:updated>2024-12-01T23:00:58.251Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*kNosToG2lPaAIG9e7lLFWA.png" /></figure><p>It is your favorite Cloud Engineer back at it again, solving problems one day at a time. Level Up bank wants to figure out a solution to allow their employees from different departments to access data while having proper security and privacy data in place. My team and I will help to automate and make these things simpler for Level Up. Linux will help Level Up Bank managed their departments and users assigned to several groups.</p><p>So let’s jump on this Linux ride!!</p><p><strong>Prerequisites:</strong></p><ul><li>AWS EC2 instance utilizing (Ubuntu ) with proper settings</li><li>SSH into your instance</li></ul><h4><strong>Creating Directories</strong></h4><p><strong>Step 1</strong>: Once in the terminal, we need to move into our root user mode to create the directories. Level Up bank wants the following directories Development, Operations, and Analytics.</p><p>I will run the command <em>“sudo su”</em>. It will change from the Ubuntu user to the Root user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*0fpydfr-aCYLtFRTZtgCOA.png" /></figure><p>Now we can make the directories!</p><p><strong>Step 2</strong>- Now I will create directories, assigned files and groups.</p><p>I will use the command: <strong><em>“mkdir”</em></strong> Development, Operations, and Analytics.</p><p>This command is used to create directories.</p><p>I will use <strong><em>“ls”</em></strong> to check to see if the directories were created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*fxujZIdYTDATe9TvT_S9gA.png" /></figure><p><strong>Adding Files</strong></p><p>I created 2 blank files per directory.</p><p><strong>Step 3</strong>- First, I have to navigate the specific directory where I want to add the files. <strong><em>(cd/ Development)</em></strong></p><p>Once we are in the directory we can now run the command to create the files.</p><p>Command: <strong><em>touch</em></strong> Analytics/ fileA.txt, fileB.txt</p><p>Command: <strong><em>ls</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*k-3kk0olx0Qfq77WBk6-5w.png" /></figure><p>We will repeat the steps above for the Analysts and Operations directories. You will have to use the following command to move into the specific directory <strong><em>(cd . .)</em></strong></p><p><strong>Adding groups</strong></p><p>Reminder: We are working in the root user</p><p>Now move on to making the following groups, Developers, Operations, and Data Analysts</p><p><strong><em>addgroup Developers</em></strong></p><p><strong><em>addgroup Operations</em></strong></p><p><strong><em>addgroup DataAnalytics</em></strong></p><p>Side note: I decided to write“Data Analytics” as one word so it can be recognized by the Linux system. Another method would be “Data Analytics” so it can be identified as one entity once I run the command.</p><p>As you can see I forgot that there wasn’t a space in Data Analysts and I encountered an issue. It wouldn&#39;t allow me to make the group. Once I fixed the wording, the group was created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*0J-9a8HNQEbMClQ0_W0eJg.png" /></figure><p>I added the groups one by one to make it simple and less issues.</p><p>Verification of the groups</p><p>I used the command: <strong><em>cat/etc/groups</em></strong></p><pre>cat/etc/groups</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*jtScnEh5AUzijFWuiC0zdA.png" /></figure><p><strong>Modifying Permissions</strong></p><p><strong>Step 4</strong>- It’s time to change the ownership of the directories. This will ensure that each group can only view data in their directories. I will use the <strong><em>“chown”</em></strong> command.</p><pre>Chown</pre><p><strong><em>“Chown”</em></strong> stands for change ownership. It is a Unix-like operating system primarily used by system administrators to change ownership of directories or files. (one user to another or from one group to another)</p><p><strong>Side note: the Initial owner of the directories is the “root user”</strong></p><p><strong><em>chown :</em></strong> Developers Development, Operations Operations, and Analytics DataAnalysts (Remember run these codes for each directory)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*RpU3jzlOdERUb3KaASCFyA.png" /></figure><p><strong><em>Remember : We have to put the name of the directory and group in order to change the ownership.</em></strong></p><p><strong>Step 5</strong>- Next up let’s modify the permissions so the groups can have (read, write, and execute) capabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*tZmFU4V33VX8LbKIxROzZA.png" /><figcaption>Read, Write, and Execute permissions</figcaption></figure><p>r- read permission</p><p>w- write permission</p><p>x- execute permission</p><p>This is Octal Notation</p><p>In Linux, the read, write, and permissions can be represented by numbers. Numerical values are used to represent each permission. For this particular article the following will are important</p><p>Read permissions (r)= 4, Write permissions (w)= 2, and Execute permissions (x)= 1 <strong>(when you add the numbers together it will be 7 meaning full permissions for the owner of the group)</strong></p><p>We will now change the permissions to the directories so that the owner of the group is able to read, write, and execute</p><p><strong>Step 6-</strong></p><pre>Sudo Chmod 700</pre><p><strong><em>“Sudo Chmod 700”</em></strong> is the command use to change the permissions. It means to set permissions on a file or directory, the owner will be able to execute, read, and write. Other group members will not have permissions unless given access.</p><p><strong><em>Sudo Chmod 700 Developers, Analytics, and Operations</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*HcP5g_Wib6BtbfpRIgJA3w.png" /></figure><p>We have successfully change the permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/1*ut2lpipYW6zBhiwbW8G3NA.png" /><figcaption>The owners of the directories have read, write, and execute permissions</figcaption></figure><p><strong>Adding the users</strong></p><p><strong>Step 7-</strong></p><p>Level Up have some users (employees) that needs to have access to certain data.</p><p>The <strong>adduser</strong> command allows to input information for the specific user.</p><p><strong><em>sudo adduser</em></strong> jwaller, <strong><em>sudo adduser</em></strong> bdorsey, <strong><em>sudo adduser</em></strong> jewart</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*BYlJ46vjKwbQpmCu07Jh2A.png" /><figcaption>This process shall be repeated for the other two users</figcaption></figure><p><strong>Now adding the users to groups</strong></p><p><strong>Step 8-</strong></p><p>The following command: <strong><em>sudo usermod -aG</em></strong> (username) is the command to attach the users to groups.</p><p><strong><em>Sudo usermod -aG</em></strong> Developers jwaller- this will add jwaller to the group (Developers)</p><p><strong>You will repeat this step for the other two users</strong></p><h4>Switching Users</h4><p>I will switch users to verify the user can see the directories in that group. The su — command along with the name of the user you want to switch into.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*EUGQEQK3Vys36eKAZAfh8g.png" /><figcaption>jwaller logged in</figcaption></figure><p>So the next steps would be to cd into “jwaller” home directory and then cd in the development directory to see if there is access to files (open and view).</p><pre>cd /home<br>ls<br>cd Development/<br>ls</pre><p>If everything is correct, the end result is the user “jwaller” can navigate into the development directory and see the files inside. Jwaller will be denied access to the other two groups because she does not have permissions. The other two users will have access to their respective directories and files.</p><p>Conclusion: In this article, you were able to see the power of Linux in regards to directories, users, and permissions. Permissions will always be needed because everyone does not need access to everything. So I hope you learned something and got a preview of what you can do in the world of Linux.</p><p>Thanks for stopping by and come join me again!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14580a522071" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI-Powered Image Recognition and Sentiment Analysis]]></title>
            <link>https://medium.com/@aparker735/ai-powered-image-recognition-and-sentiment-analysis-218e712ccb9a?source=rss-47f7d62462b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/218e712ccb9a</guid>
            <dc:creator><![CDATA[Aynda Parker]]></dc:creator>
            <pubDate>Mon, 09 Sep 2024 03:53:49 GMT</pubDate>
            <atom:updated>2024-09-09T03:53:49.866Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/630/1*2KYMyxQbAQEMJXGbzJPDpA.png" /></figure><p>Hello everyone!! Your favorite cloud engineer is back with an AI assignment from Level Up Llama Tech company. AI is the future and the next wave for generations to come. So let’s get into it!!!</p><h3>Business Problem</h3><p>Level Up Llama Tech, a tech accessories company, faces challenges in managing customer feedback and product reviews efficiently. The company needs a solution to automatically analyze customer reviews, identify product images, and provide actionable insights to improve customer satisfaction and product quality.</p><h3>Proposed Solution</h3><p>Implement an AI-powered system that leverages Azure AI services to analyze customer reviews and identify product images. The system will use image recognition to classify product images and sentiment analysis to gauge customer satisfaction levels. By integrating these insights into the company’s customer relationship management (CRM) system, Level Up Llama Tech can quickly respond to customer needs and enhance product offerings.</p><h3>Benefits of the Solution</h3><ul><li>Improved Customer Satisfaction: Quickly identifying and addressing customer issues enhances the overall customer experience.</li><li>Efficient Review Management: Automating the review analysis process saves time and resources.</li><li>Enhanced Product Quality: Insights from sentiment analysis can guide product improvements and innovations.</li><li>Competitive Advantage: Leveraging AI technologies positions Level Up Llama Tech as a forward-thinking and customer-centric company.</li></ul><p>For this task I will utilize the Azure Cognitive services to get the job done.</p><p>I was given a set of pre-collected customer reviews and images to process for this tasks and make things run seamless.</p><p><strong>Step 1- Setting up the Cognitive Services</strong></p><p>I will create a resource group, Computer Vision resource, and Text Analytics resource.</p><p>Resource group-AI-LUIT- Blue</p><p>Computer Vision Resource-CoVisionBlue-24</p><p>Text Analytics Resource- AI-Text-Blue</p><p><strong>Steps for creation of a Resource Group</strong></p><ul><li><strong>Subscription</strong>: Select the Azure subscription where you want to create the resource group.</li><li><strong>Resource Group</strong>: Enter a name for your resource group.</li><li><strong>Region</strong>: Choose the Azure region where the resource group will be stored.</li><li><strong>Review and Create</strong>: After filling out the details, click on the “Review + create” button, review your choices, and then click “Create” to finalize</li></ul><p>These steps are similar to creating a resource and therefore I will not provide those steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*Zmm_HWVI6K_-8CFjhKl_ow.png" /><figcaption>Creating a Resource</figcaption></figure><ul><li>Once the <strong>Text Analytics/CoVisionBlue</strong> resources are successfully deployed, you can select each resource, and view various details such as the associated keys and the endpoint.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*vcbK_t8iy04uulFqWCG1Wg.png" /><figcaption>Keys and Endpoints</figcaption></figure><p><strong>Step 2: Store a Dataset of Customer Images and Reviews</strong></p><ul><li>Create a storage account, Blob Container, and upload the images/reviews</li></ul><p>A storage account provide a scalable, durable, and highly available cloud storage solution. <strong>(Luitaiblue)</strong></p><ul><li><strong>Subscription</strong>: Select the Azure subscription you want to use.</li><li><strong>Resource Group</strong>: Choose an existing resource group or create a new one.</li><li><strong>Storage Account Name</strong>: Enter a unique name for your storage account. The name must be between 3 and 24 characters long and can only contain lowercase letters and numbers.</li><li><strong>Region</strong>: Select the Azure region where you want to create the storage account.</li><li><strong>Performance</strong>: Choose between “Standard” or “Premium” performance. Standard uses HDDs, while Premium uses SSDs.</li><li><strong>Redundancy</strong>: Choose a redundancy option that suits your needs (e.g., LRS, GRS, RA-GRS, ZRS).</li><li><strong>Configure Options</strong>: Configure additional settings as needed, such as:</li><li><strong>Replication</strong>: Choose from various replication options based on redundancy requirements.</li><li><strong>Access Tier</strong>: Set the default access tier (Hot or Cool) for Blob storage if applicable.</li><li><strong>Networking</strong>: Configure network settings if necessary (e.g., public access, virtual networks).</li><li><strong>Review and Create</strong></li></ul><p>The Blob Container configuration is similar to the creation of the storage account, just not as many details. I will not provide the steps for this section.</p><p>Blob Container- LevelupImages</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*H83om2kvMd3kE7GZkW2HQg.png" /><figcaption>storage containers</figcaption></figure><p><strong>Upload the images/reviews</strong></p><p>Next I uploaded the images and review files into the blob containers. Choose your preference of drag/drop or browse for files. Then select desire file and upload into container.</p><p><strong><em>Side Note: Make sure the files are in the acceptable format and Azure will have them listed.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*bVZmnqbgxUe2L_YzSEdNgQ.png" /><figcaption>Upload successful!</figcaption></figure><p>Error: I did not notice the file format before uploading and realize after they were already in the container. I had to change the format of the files and upload the files again.</p><h4>Step3: Analyze Images with Computer Vision</h4><p>The files are uploaded, so let’s move on to use the Analyze Image API in the Azure Portal.</p><p>Navigate the to CoVisionBlue resource or AI-Text-Blue resource.</p><p>In the CoVision Blue resource we select Visual Studio. Go to try it out under the <strong>Detect common objects in images</strong> section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*jbtIks0ZAUnStD6tcnsmfg.png" /><figcaption>using the API</figcaption></figure><p>Remember to select the correct azure subscription and resource created earlier. Then upload the image that you would like to analyze.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*HVi_g6YmxE8zFuKjenWa9A.png" /></figure><p>I had to analyze 16–18 images and the results were interesting. I say this because some of the objects were not recognized in the image by the API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*Cf9onHzIDArMJthiXOMxaw.png" /><figcaption>Image result analyzed</figcaption></figure><p>In this picture below you will see the cell phone in the same image. The image was 54% on the image of a cell phone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*QsVuH6SW6om7GFlFhJOnHw.png" /><figcaption>Image with JSON document</figcaption></figure><p>The bluetooth speaker image was not identified at all. This isn’t accurate at all.</p><p>The second image of the laptop was analyzed. This was more of an accurate representation of the process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*dOc-juTLiT3jxx4XuEG1og.png" /><figcaption>Increased accuracy for the laptop image</figcaption></figure><h4>Analyze Reviews with Text Analytics</h4><p>Now let’s jump to the <strong>Sentiment Analysis API</strong> in Azure. Navigate to the Sentiment Analysis resource and select <strong>Language Studio </strong>and you will repeat the steps when you signed up with the CoVision resource.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*o0oHV7c4-PsXRaJnlRK47A.png" /></figure><p>I will select the classify text, then Analyze sentiments and mine opinions. The following screen will be where I upload the txt. file with the 20 customer reviews. Then click the “run” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*Jx6qqb1b-b4hNawhjttJ3g.png" /><figcaption>Txt. file uploaded</figcaption></figure><p>Here is an up and close image to see how the text file was analyzed and the JSON document. The analysis was more accurate than the previous analysis with Image API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*G7dxXq2N-0zzkPkTEeG3Mw.png" /><figcaption>Sentiment is analyzed</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*uzrDFhMIQYf8e0AHpwUWZw.png" /><figcaption>JSON format analysis</figcaption></figure><p>All in all, I think Artificial Intelligence is a good tool to use but may have some more tweaking to do. I say this because simple images were not recognized during the analysis. The Image API identified 13 out of 16 images. For instance, the blue tooth speaker was not identified at all,only the image of a cell phone. An image of outdoor security camera’s were analyzed and it was not recognized by the image API. It identified the chairs and tables in the background of the picture and this was the case for more of the images. I don’t think the Analyze Image API is accurate enough and needs some work.</p><p>Now, the analyze <strong>sentiment and mine options</strong> in the <strong>Language Studio </strong>was more accurate. It was able to analyze the customer reviews positive and negative. The customer reviews received good positive confidence scores. I thought was cool.</p><p>AI is the future and it was fun to see the inner workings of artificial intelligence in the Azure portal.</p><p>I hope you enjoyed the article. You can look for me, your favorite cloud engineer on Linkedin.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=218e712ccb9a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secure Remote Administration and Troubleshooting of Azure VMs with Auto Scaling]]></title>
            <link>https://medium.com/@aparker735/secure-remote-administration-and-troubleshooting-of-azure-vms-with-auto-scaling-bf83fb94db03?source=rss-47f7d62462b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf83fb94db03</guid>
            <dc:creator><![CDATA[Aynda Parker]]></dc:creator>
            <pubDate>Sun, 11 Aug 2024 22:18:56 GMT</pubDate>
            <atom:updated>2024-08-11T22:18:56.192Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*7LKY2vwFckMEUOe8.jpg" /></figure><p>Hello again,</p><p>Your favorite Cloud Engineer is back solving problems for the Level Up Corporation.</p><p>So come along with me as I jumped back in the amazing world of Azure!</p><h3>Business Problem</h3><p>Level Up Corporation hosts its Linux and Windows applications on over 100 Azure Virtual Machines (VMs). The globally dispersed IT team needs efficient, secure, and reliable tools for remote administration and troubleshooting to minimize downtime and security risks. Additionally, the company needs to ensure high availability and scalability of its applications.</p><h3>Proposed Solution</h3><p>To address these needs, the solution involves setting up Auto Scaling Groups to automatically adjust the number of VMs based on demand, ensuring scalability and high availability.</p><p>For secure remote administration, SSH will be implemented for Linux VMs, and RDP for Windows VMs, both providing encrypted channels for secure access.</p><h3>Benefits of the Solution</h3><p>Improved Productivity and Efficiency, Enhanced Security, Cost Savings, Scalability, High Availability, Easy Administration, and Troubleshooting. I believe these are awesome benefits for the Level Up Corporation and will help solve their problems.</p><p>So the next steps are creating the VM and its components. I will SSH on the local machine and set up the scaling group for the company.</p><ol><li><strong>Virtual Machine Creation</strong></li></ol><p>Creating a VM is fairly easy, so let’s get into it!!</p><ul><li>Click on <strong>Create a resource</strong>. (I created a new resource group)</li><li>Select <strong>Virtual Machine</strong>.</li></ul><p>Configure the basics for the Machine</p><ul><li><strong>Subscription:</strong> Select your subscription.</li><li><strong>Resource Group:</strong> Create a new one. (Blue-Machine)</li><li><strong>Virtual Machine Name:</strong> Enter a name for your VM. (BlueM)</li><li><strong>Region:</strong> Choose the region closest to you. (Canada Central)</li><li><strong>Image:</strong> Select a Linux distribution. (Ubuntu)</li><li><strong>Size:</strong> Choose a VM size based on your needs.</li><li><strong>Authentication Type:</strong> Choose <strong>SSH public key</strong>.</li><li>Enter the username you want to use. (Azureuser)</li><li>Choose the appropriate network settings. For basic setups, the default values usually work fine.</li><li>Review &amp; Create</li></ul><p>*Make sure to download the <em>Private Key pair and create resource. Remember the location of downloads because you will need the information later.*</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*ea5XEaaF-V1rr1ZrqnTrzg.png" /><figcaption>Virtual Machine settings</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*D1XVX2JqWIXRywnbOk-XPw.png" /><figcaption>Deployment Successful</figcaption></figure><h4>Create a Network Security Group (NSG)</h4><p>I will create security group with SSH allowance.</p><p>Navigate to “Network Security Group”</p><ul><li>Fill out the <strong>“Create network security group”</strong></li><li><strong>Subscription:</strong> Select your subscription.</li><li><strong>Resource Group:</strong> Create a new resource group <strong>(Blue-Machine)</strong></li><li><strong>Name:</strong> Enter a name for your NSG <strong>(BlueM)</strong>.</li><li><strong>Region:</strong> Select the same region where your VM is located <strong>(Canada Central)</strong>.</li><li>Click <strong>“Review + create”</strong>, then <strong>“Create”</strong>.</li></ul><p>A default NSG was created during the time of the VM creation in Azure. In order to SSH I need to allow access on Port 22.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*5plfR4lkXm66rHkq-s_iBw.png" /><figcaption>Default Security Group Successful</figcaption></figure><p>Next Select the default NSG, select inbound security rules and a new rule</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*PPNoJagBVSTAVAYFlSSm3w.png" /><figcaption>Rule configuration</figcaption></figure><p>This is our new rule. This will allow secure access to Linux VM instance remotely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*zuJg9JK3xFkTRhJ2umpu3g.png" /><figcaption>Inbound rules successful</figcaption></figure><h3><strong>Connect to the VM</strong></h3><p>Once the VM is deployed:</p><ol><li><strong>Find Your VM’s Public IP Address:</strong></li></ol><ul><li>Navigate to<strong> Virtual Machines</strong> in the Azure Portal.</li><li>Select your VM and note its <strong>Public IP address</strong>. You will need this to SSH into local machine</li></ul><p><strong>2. Connect via SSH:</strong> Open your terminal (or an SSH client if on Windows) and run: (Native SSH)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*BDbuZ6-wEEJQE2OMXK9roQ.png" /><figcaption>SSH directions</figcaption></figure><p>The Key pair is in the downloads folder on my local machine. I will <strong><em>“cd downloads”</em></strong> in the terminal.</p><p>Once in the terminal I will us the following command to allow read access only to the key pair. <strong><em>Note: If executed successfully you will not see any output</em></strong></p><p>Secondly, in order to SSH into the Linux VM I will run the second command.</p><pre>chmod 400 Blue_Mkey.pem</pre><pre>ssh -i /path/to/your/private-key username@public-ip-address</pre><p>You will need to plug your information into the code above.</p><p><strong>Verification</strong></p><p>We need to verify access to the Linux VM. I will type the “<strong>whoami</strong>” command. We should see the username that was created during the VM deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*lHk9FI8CzB2Jr1HwrKMUUQ.png" /><figcaption>SSH Successful</figcaption></figure><h4>Auto Scaling Group Creation</h4><p>By setting up a VM Scale Set with autoscale rules, you ensure that your application can handle varying loads efficiently, with Azure automatically managing the number of VM instances based on the defined rules. This setup helps maintain performance and cost-efficiency while providing high availability for your application.</p><p>Search for and select <strong>“Virtual machine scale sets”</strong></p><p>This process is very similar to Virtual Machine creation. I will configure Basics, Configure Scaling, Configure Networking for the VM scale set.</p><p><strong>Configure Basics:</strong></p><ul><li><strong>Subscription:</strong> Choose your subscription.</li><li><strong>Resource Group:</strong> Create a new resource group or select an existing one.</li><li><strong>VMSS Name:</strong> Enter a name for your scale set.</li><li><strong>Region:</strong> Select the region where you want to deploy your VMs.</li><li><strong>Availability Zones:</strong> Choose if you want to deploy across availability zones for high availability.</li><li><strong>Image:</strong> Select a Linux or Windows image that you want to use for your VM instances.</li><li><strong>Size:</strong> Choose the size of the VMs in the scale set.</li><li><strong>Authentication Type:</strong> Choose <strong>SSH public key</strong> for Linux or <strong>Password</strong> for Windows, and provide the necessary details (like SSH public key or password).</li></ul><p><strong>Note</strong>: I kept the subscription, region, resource group, and availability zones the same as the VM.</p><ul><li><strong>Instance Count:</strong> Set the initial number of instances. This is the starting point for your scale set. I did set the scaling configuration. Instance limit/count is equal to 1. Scale out is 80 , when the CPU threshold reaches 80% the instance number will increase by one. Scale in 20, if the CPU threshold decrease 20% the instance count will decrease by 1. I saved the changes.</li></ul><p>Lastly, I saved all the settings and deployed the auto scaling set. I navigated to Resource to see the details. The scaling option to <strong>Autoscale</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*lKA0Al_RlJu8mj_7bVT_zg.png" /><figcaption>Scaling Set Successful</figcaption></figure><p>I have helped the Level Up Corporation improved scalability and lower costs for the company. Level Up will be able to withstand the incoming traffic from the internet due to the creation of virtual machine scaling sets.</p><p>My work is complete! Look forward to see more articles from your favorite cloud engineer.</p><p>Thank you!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf83fb94db03" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microsoft Azure and Static websites]]></title>
            <link>https://medium.com/@aparker735/microsoft-azure-and-static-websites-5408d35211bc?source=rss-47f7d62462b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/5408d35211bc</guid>
            <dc:creator><![CDATA[Aynda Parker]]></dc:creator>
            <pubDate>Mon, 29 Jul 2024 00:46:39 GMT</pubDate>
            <atom:updated>2024-07-29T00:46:39.346Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*YtwkqSCDHZcfHbG3rXHnlA.png" /></figure><p>Level Up Bank is a fictitious fintech startup that offers digital banking services to customers. The company’s website is a crucial tool for acquiring new customers and providing information about the services offered. Currently, the website is hosted on an on-premises server, leading to additional costs and complexity. To address these challenges, Level Up Bank has decided to move its website to Azure Blob Storage. Here’s how it can benefit from this decision: <strong>Cost Savings, Improved Scalability, High Availability, and Reduced Management Overhead</strong></p><p>Come with your favorite Cloud Engineer as I explored the world of Azure!!!</p><p><strong>Step 1:</strong> First I will create a <strong>Create a resource</strong>.</p><ul><li>Search for <strong>Storage account</strong> and click <strong>Create</strong>.</li><li>Fill in the required details:</li><li><strong>Subscription</strong>: Select your subscription.</li><li><strong>Resource group</strong>: Create a new one or select an existing one.</li><li><strong>Storage account name</strong>: Provide a unique name.</li><li><strong>Region</strong>: Choose your preferred region.</li><li><strong>Performance</strong>: Standard.</li><li><strong>Replication</strong>: Locally-redundant storage (LRS).</li><li>Click <strong>Review + create</strong> and then <strong>Create</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*hO4H567SFzbcj39Y_9HjZA.png" /><figcaption>Storage Account creation</figcaption></figure><p><strong>Step 2:</strong> <strong>Next up is creating the <em>Blob Container</em>.</strong></p><ul><li>In the storage account menu, under <strong>Data storage</strong>, select <strong>Containers</strong>.</li></ul><p>Container name: Project-1 and I set the <strong>Public access level</strong> to <strong>Blob (anonymous read access for blobs only)</strong>. Then click create.</p><p>Note: This very important! The website needs to be accessible from the public.</p><p><strong>Step 3: Upload the </strong><strong>index.html File</strong></p><ul><li>Navigate to the container and simply upload your file in the container of your choice (Project-1)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*7QV0oon9KgZ05WTwinsyjQ.png" /><figcaption>File Uploaded</figcaption></figure><p><strong>Step 4: Configure the Blob Container for Static Website Hosting</strong></p><p>Once in the storage account menu, under settings select Static Website.</p><ul><li>Click enable, select file name, and click save</li></ul><h4>5. Verify Internet Access</h4><p>If you gotten this far then hopefully you will be able to access the internet.</p><ul><li>After enabling static website hosting, I will navigate to the file and copied the “URL”. This will hopefully take me to the website.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*XZoHLALwHbDaAXTJWZfruw.png" /><figcaption>The URL copied</figcaption></figure><ul><li>Let’s test the website in a private browser. I pasted the URL in the browser.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*1p0sXIJowyEz7t7akmTJyQ.png" /><figcaption>The successful Website</figcaption></figure><p>The task has been completed.</p><p>Please look for more future articles from me, Your favorite Cloud Engineer.</p><p>Thank you and please visit again!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5408d35211bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CI/CD with AWS CodePipeline]]></title>
            <link>https://medium.com/@aparker735/ci-cd-with-aws-codepipeline-a85507a8b76b?source=rss-47f7d62462b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a85507a8b76b</guid>
            <dc:creator><![CDATA[Aynda Parker]]></dc:creator>
            <pubDate>Sun, 28 Jul 2024 03:43:28 GMT</pubDate>
            <atom:updated>2024-07-28T03:43:28.075Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*ytBRu7p4J7Be8pKwDQ2DYQ.png" /></figure><p>It’s your favorite Cloud Engineer at it again. My company is trusting me again with a new task, utilizing CI/CD CodePipeline. The team has asked me to create a way to automate the deployment of a website. Currently your developers have to go through the process manually to test each new update to their code. You’ll need to provide the static site URL to the developers and also make a modification to the code in the Git repo to verify the pipeline is working.</p><p>So let’s get ready and create this pipeline!!</p><p>The steps are provided to make the process a little easier.</p><ol><li>Create a new repository in GitHub or CodeCommit and load the attached HTML.</li></ol><p>2. Create and configure a S3 bucket to host your static website.</p><p>3. Create a CI/CD pipeline using the <strong>AWS CodePipeline service</strong>.</p><p>4. Set your repo as the Source Stage of the CodePipeline that is triggered when an update is made to the repo.</p><p>5. For the deploy stage select your S3 bucket.</p><p>6. Deploy the pipeline and verify that you can reach the static website.</p><p>7. Make an update to the code in your code in the repo to verify that the code pipeline is triggered. This can be as simple as changing the wording in the file because any change to the files should trigger the workflow.</p><p><strong>AWS CodePipeline</strong> is a fully managed continuous delivery service provided by Amazon Web Services (AWS). It helps you automate your software release process, allowing you to build, test, and deploy your code every time there is a change.</p><p>Key Features: Automation, Integration, Monitoring and Customization</p><p><strong>Create New Repository in GitHub</strong></p><p>Log into the GitHub account. Create the repository and assigned yourself as the owner. Give the repository a name, make it public, and add a README file (this will enable any inclusion documentation for the repository).</p><p>Remember to check your settings for the repository. One to keep in mind to select “<strong>Add branch protection rule</strong>” and others to check at your discretion.</p><p>Loading the HTML file</p><p>Upload the file, Add the file, Choose the File, and then you can drag the file into the repository. Lastly, select the file and select <strong>“commit to changes”</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*PK8UeXGzrNnB2vTOxFJfcQ.png" /><figcaption>HTML file Uploaded</figcaption></figure><p>Now we need to verify the file is working correctly. We will open it up in a new browser. Here is the evidence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*gUZvBDoIWMiSmedzqtN-ig.png" /><figcaption>HTML file working on the local machine</figcaption></figure><p><strong>Next set up the S3 bucket to host a static website with public access</strong></p><h3>Create a CI/CD pipeline using AWS CodePipeline</h3><p>We have manually deployed our website now we automated the process using AWS CodePipeline.</p><p><strong>Step1- Create the Pipeline and configure settings for the pipeline</strong></p><ul><li>Create and Name the Pipeline (CICD-LUIT)</li><li>Select “Superseded” and “New Service Role”</li><li>Lastly, leave all the other settings as default</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*KLH1nrSsn5jilImcB4kY2Q.png" /></figure><p><strong>Step 2- Add source stage</strong></p><ul><li>Select GitHub (Version 2)</li><li>Connect to GitHub and select Authorize and Connector for GitHub. You will then need to put in credentials for Github account.</li></ul><p><strong>Step 3<em>- We will skip the Build Stage</em></strong></p><p><strong>Step 4- Add deploy stage</strong></p><p>Deploy the static website with Code pipeline. I have to specify the S3 bucket and the region the bucket resides. Then check the box “<strong>Extract file before Deploy”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*bHGZe34b8jz6SIWa2MOVRA.png" /><figcaption>Settings for Deployment</figcaption></figure><p>Review the pipeline and click <strong>“create pipeline”</strong></p><p>To verify that our website.html file was pushed to the S3 bucket from the GitHub repository when can navigate to the S3 dashboard.</p><p><strong>Verify the Static Website </strong>is working by copying the public URL and paste it in the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*RTJUdVKuj5sOTPBQfb1k2w.png" /></figure><p>Now let’s verify the CodePipeline will trigger when the codes changes in GitHub. I added a new line <strong><em>“Your favorite cloud engineer”</em></strong> in the website.html file to make sure the changes are being updated and then commit the changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*IHzxr-fS9tj8fM3NCh_--Q.png" /><figcaption>Code added to HTML file</figcaption></figure><p>If I check the execution history it will show the updated change to the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*O309U3BC5Ds5rvZJwSWfpg.png" /><figcaption>2nd entry in the execution history</figcaption></figure><p>Once I refreshed the webpage you will be able to see the changes to the code. Code Pipeline is set up to trigger a new deployment upon any new commits in the repository automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*CSYN0ne_59NBsMzRZC67gA.png" /><figcaption>website automatically updated via Code Pipeline</figcaption></figure><p>In conclusion, I have successfully automated the deployment of the website. Therefore, it has become much manageable for the company to make changes. If they ever need static website the code can be updated which will be faster for the company.</p><p>I hope you all enjoyed the article. Please come back again to read future articles from your favorite cloud engineer.</p><p>Thank you!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a85507a8b76b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Brewer’s Codex: Charting the Path of Dynamic Draughts]]></title>
            <link>https://medium.com/@aparker735/brewers-codex-charting-the-path-of-dynamic-draughts-43894d0e551c?source=rss-47f7d62462b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/43894d0e551c</guid>
            <dc:creator><![CDATA[Aynda Parker]]></dc:creator>
            <pubDate>Thu, 25 Jul 2024 02:20:43 GMT</pubDate>
            <atom:updated>2024-07-25T02:20:43.148Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Our quest is to design and implement a digital fortress for the renowned craft brewery, enabling them to showcase their ever-changing selection of artisanal beers. You shall wield the powers of AWS, deploying a web server with Nginx on EC2, storing the weekly beer menu in the enchanted realms of Amazon S3, and erecting vigilant watchtowers with AWS CloudWatch to safeguard against digital threats. Through meticulous testing and deployment, you shall ensure a seamless journey for both aficionados and casual drinkers, crafting a dynamic and user-friendly website worthy of the brewery’s legendary reputation.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Wh0rf_f2lpJmo6LS.png" /></figure><p>Hello everyone and welcome to another adventure on becoming a DevOps Engineer! In today’s journey it’s a little different, I have the privilege to team up with a phenomenal individual who is also becoming a DevOps engineer and her name is Aynda Parker. We were both task with huge task but through hard work and dedication we were able succeed in our venture.</p><p><strong>Let’s start!</strong></p><ol><li>Let’s set up our instance (Nick’s Part)</li><li><strong>Name our Instance:</strong> Pod1Project2</li><li><strong>Choose an AMI(Amazon Machine Image):</strong> Amazon Linux</li><li><strong>Instance type:</strong> t2.micro</li><li><strong>Key pair:</strong> create a key pair so you have the ability to ssh into your terminal and apply changes</li><li><strong>Create a security group: </strong>For the security group we would want to make sure that the inbound rules have HTTPS(port 443), HTTP(80), and SSH (22) availalble so that internet traffic comes in and you have access to the terminal as well</li></ol><p>Once all those are completed you are ready to launch your instance.</p><p>Second: Setting up the Instance with information</p><p>Now since the instance is launched we will want to update it, install nginx, place information into html file, launch website.</p><ol><li>First we will run the update command:</li><li>Next we will run the command to download nginx:</li></ol><pre>sudo dnf update</pre><pre>sudo dnf install -y nginx</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*dDbnhJ_yOM4CxTKi.png" /></figure><p>Nginx installation</p><p>3. The next 3 commands will start the server, check the server status, enables auto start when instance is launched</p><pre>sudo systemctl start nginx.service //Start Nginx Server<br>sudo systemctl status nginx.service // Check Server Status<br>sudo systemctl enable nginx.service // Enable Auto Server Start on Reboot</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*DjiR9HD0qhHlnUqA.png" /></figure><p>Nginx starting</p><p>Now that the instance is started let’s get the S3 up and running!</p><p>Launching the S3 was the responsibility of the great Ayanda!</p><p><em>Amazon S3 is a cloud storage service provided by Amazon Web Services (AWS). An S3 bucket is a fundamental resource in S3 used to store data objects such as files and documents in the cloud.</em></p><p>Let’s launch the S3 bucket</p><ol><li>Go to S3 and press <em>Create Bucket</em></li><li>Give bucket a name, we came up with <strong><em>breweryproject-pod1</em></strong><em>. </em>We also followed the S3 bucket naming rules<em> </em><a href="https://docs.aws.amazon.com/console/s3/bucket-naming">https://docs.aws.amazon.com/console/s3/bucket-naming</a></li><li>In this bucket we had to upload the files. I uploaded the file Pod-1 to the bucket from my computer. Inside the folder consisted of three jpeg files, HTML file, and a png file.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/0*VMi1P39uG_RO52Wn" /></figure><p>These five files will be displayed on Artisanal’s website to view only while providing crucial information to future customers.</p><p>4. Now that the files are uploaded let’s provided the correcet permission to the files so the website can populate them</p><p>5. Bucket Policies controls access to your S3 buckets at the bucket level. Bucket policies are written in JSON and can specify who can access the bucket and what actions to perform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/0*gnjV3E3f-NXkhiIQ" /></figure><p>ACL’s control the access to the individual objects in the bucket or make objects publicly accessible.</p><h3>ISSUES WE FACED!!!</h3><p>The team and I encountered some permission issues. Initially we did not have access to allow the buckets to be accessible to the public. We had to reach out to the company to inform them about the security issue and explain why it was crucial to have access. Permissions were granted and we were able to proceed with security configurations.</p><p>Now that the S3 is set up and the EC2 is is running let’s go back into the terminal and load the html files up</p><p>We will go back into the terminal and go to</p><pre>cd /usr/share/nginx/html</pre><p>We would then nano into index.html</p><p>Within the HTML file we will upload the website that our client created</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;Hop Haven Craft Brewery&#39;s Dynamic Beer Selection&lt;/title&gt;<br>    &lt;style&gt;<br>        body {<br>        font-family: &#39;Arial&#39;, sans-serif;<br>        line-height: 1.6;<br>        margin: 0;<br>        padding-top: 60px; /* Added padding to push content down */<br>        background-color: #f4f4f4;<br>        color: #333;</pre><pre>    }</pre><pre>    .navbar {<br>        background-color: #333;<br>        color: white;<br>        text-align: center;<br>        padding: 10px 0;<br>        position: fixed; /* Fix navbar to the top */<br>        top: 0; /* Position at the top */<br>        width: 100%; /* Full width */<br>        z-index: 1000; /* Ensure it&#39;s above other content */<br>    }</pre><pre>        .navbar a {<br>            color: white;<br>            margin: 0 15px;<br>            text-decoration: none;<br>            font-size: 18px;<br>        }</pre><pre>        .navbar a:hover {<br>            text-decoration: underline;<br>        }</pre><pre>        .splash-image img {<br>            width: 100%;<br>            height: auto;<br>            border-radius: 8px;<br>            display: block;<br>            margin: auto;<br>            margin-top: -60px;<br>        }</pre><pre>        main {<br>            padding: 20px;<br>            text-align: center;<br>        }</pre><pre>        main img {<br>            max-width: 30%;<br>            height: auto;<br>            border-radius: 8px;<br>            margin-top: 20px;<br>        }</pre><pre>        footer {<br>            background-color: #333;<br>            color: #fff;<br>            text-align: center;<br>            padding: 10px 0;<br>        }</pre><pre>        .modal {<br>            display: none;<br>            position: fixed;<br>            z-index: 1;<br>            left: 0;<br>            top: 0;<br>            width: 100%;<br>            height: 100%;<br>            overflow: auto;<br>            background-color: rgba(0,0,0,0.6);<br>        }</pre><pre>        .modal-content {<br>    background-color: #fefefe;<br>    margin: 2% auto; /* Reduced top margin */<br>    padding: 20px;<br>    border: 1px solid #888;<br>    width: 80%; /* Adjust width as needed */<br>    max-width: 1200px; /* Set a max-width for larger screens */<br>    height: 90vh; /* Use vh unit to cover most of the viewport height */<br>    overflow: auto; /* Add scroll if content is larger than the modal */<br>    text-align: center;<br>    position: relative; /* Position relative for absolute child positioning */<br>}</pre><pre>        .close {<br>            color: #aaa;<br>            float: right;<br>            font-size: 28px;<br>            font-weight: bold;<br>        }</pre><pre>        .close:hover,<br>        .close:focus {<br>            color: black;<br>            text-decoration: none;<br>            cursor: pointer;<br>        }</pre><pre>        #beerListImage {<br>    max-width: 100%; /* Ensure it is no wider than the modal */<br>    max-height: 80vh; /* Adjust height to fit within the modal view */<br>    margin: 0 auto; /* Center the image */<br>    display: block; /* Display as block */<br>}</pre><pre>        #about-us {<br>            font-size: 30px; /* Increased font size for the About Us section */<br>        }</pre><pre>        #craft-beer-menu {<br>            font-size: 30px;<br>        }</pre><pre>        #contact-location {<br>            font-size: 30px;<br>        }</pre><pre>        #beerListImage {<br>        width: 100%; /* Increase the size of the image */<br>        height: auto;<br>        border-radius: 8px;<br>        display: block; /* Ensures the image is a block element */<br>        margin: 0 auto; /* Centers the image within the modal */<br>        }</pre><pre>        h2 {<br>            color: #444;<br>        }</pre><pre>        p {<br>            margin: 20px 0;<br>        }</pre><pre>        section {<br>            margin-bottom: 40px;<br>            padding-top: 70px;<br>            margin-top: -70px;<br>        }</pre><pre>        header {<br>            background-color: #444;<br>            color: #fff;<br>            padding: 10px 0;<br>            text-align: center;<br>            <br>        /* Add some responsive design */<br>@media screen and (max-width: 768px) {<br>    .modal-content {<br>        width: 95%;<br>        margin: 5% auto;<br>        height: 80vh; /* Adjust for smaller screens */<br>    }<br>    #beerListImage {<br>        max-height: 70vh; /* Adjust for smaller screens */<br>    }<br>}<br>    &lt;/style&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;header&gt;<br>        &lt;h1&gt;Welcome to Hop Haven Craft Brewery&lt;/h1&gt;<br>    &lt;/header&gt;</pre><pre>    &lt;nav class=&quot;navbar&quot;&gt;<br>        &lt;a href=&quot;#about-us&quot;&gt;About Us&lt;/a&gt;<br>        &lt;a href=&quot;#craft-beer-menu&quot;&gt;Beer List&lt;/a&gt;<br>    &lt;/nav&gt;</pre><pre>    &lt;div class=&quot;splash-image&quot;&gt;<br>        &lt;img src=&quot;https://breweryproject-pod1.s3.amazonaws.com/Hop_Haven_Brewery_Entrance.jpg&quot; alt=&quot;Hop Haven Brewery Entrance&quot;&gt;<br>    &lt;/div&gt;<br>    <br>    &lt;main&gt;<br>        &lt;section id=&quot;about-us&quot;&gt;<br>            &lt;h2&gt;About Us&lt;/h2&gt;<br>            &lt;p&gt;Welcome to Hop Haven Craft Brewery!&lt;/p&gt;<br>            &lt;p&gt;Tucked away in the vibrant heart of the city, Hop Haven Craft Brewery has been a beacon of artisanal brewing excellence since it first opened its doors in 2016. Birthed from the collective vision of a tight-knit group of beer enthusiasts, our brewery has blossomed into a sanctuary for those who cherish the intricate and nuanced flavors of craft beer.&lt;/p&gt;<br>            &lt;p&gt;At Hop Haven, we are driven by the belief that extraordinary beer has the unique ability to unite people. Our goal is to craft not just beers, but memorable experiences that appeal to a broad spectrum of tastes. Every glass we pour is a reflection of our dedication to creativity, impeccable quality, and the revered art of brewing.&lt;/p&gt;<br>            &lt;p&gt;Our brewing philosophy is a blend of time-honored methods and innovative approaches, producing a spectrum of beers that range from classic profiles to daring new ventures. Whether it&#39;s our aromatic IPAs, velvety stouts, crisp lagers, or avant-garde ales, we offer a diverse array that delights both seasoned aficionados and those new to the craft beer journey.&lt;/p&gt;<br>            &lt;p&gt;Community is the cornerstone of Hop Haven&#39;s ethos. We&#39;re more than just a brewery - we&#39;re a place where lasting memories are formed. From hosting community events and collaborating with local artisans, to advocating for sustainability, we&#39;re dedicated to making a meaningful impact in the neighborhood.&lt;/p&gt;<br>            &lt;p&gt;We invite you to step into our world and share a pint with us! Let&#39;s celebrate the craft of brewing, the delight of beer, and the communal spirit that binds us.&lt;/p&gt;<br>            &lt;p&gt;Here&#39;s to the art of craft brewing, the spirit of innovation, and the communal ties that make Hop Haven a special place for everyone!&lt;/p&gt;<br>        &lt;/section&gt;</pre><pre>        &lt;section id=&quot;craft-beer-menu&quot;&gt;<br>            &lt;h2&gt;Our Current Craft Selection&lt;/h2&gt;<br>            &lt;img src=&quot;https://breweryproject-pod1.s3.amazonaws.com/Clickable_Beer_List_Button.jpg&quot; alt=&quot;Weekly craft beer list&quot; onclick=&quot;openModal()&quot;&gt;<br>            &lt;p&gt;Discover our ever-changing selection of craft beers!&lt;/p&gt;</pre><pre>            &lt;!-- The Modal --&gt;<br>            &lt;div id=&quot;beerListModal&quot; class=&quot;modal&quot;&gt;<br>                &lt;div class=&quot;modal-content&quot;&gt;<br>                    &lt;span class=&quot;close&quot; onclick=&quot;closeModal()&quot;&gt;&amp;times;&lt;/span&gt;<br>                    &lt;p&gt;Current Craft Beer Selection:&lt;/p&gt;<br>                    &lt;img id=&quot;beerListImage&quot; src=&quot;&quot; alt=&quot;Craft Beer List&quot;&gt;<br>                &lt;/div&gt;<br>            &lt;/div&gt;<br>        &lt;/section&gt;</pre><pre>        &lt;section id=&quot;contact-location&quot;&gt;<br>            &lt;h2&gt;Contact and Location&lt;/h2&gt;<br>            &lt;img src=&quot;https://breweryproject-pod1.s3.amazonaws.com/location.png&quot; alt=&quot;Map location of Hop Haven Craft Brewery&quot;&gt;<br>            &lt;p&gt;123 Craft Beer Lane, Brewtown, USA&lt;/p&gt;<br>            &lt;p&gt;Phone: (123) 456-7890&lt;/p&gt;<br>        &lt;/section&gt;<br>    &lt;/main&gt;</pre><pre>    &lt;footer&gt;<br>        &lt;p&gt;&amp;copy; 2024 Hop Haven Craft Brewery&lt;/p&gt;<br>    &lt;/footer&gt;</pre><pre>    &lt;script&gt;<br>        function openModal() {<br>            var modal = document.getElementById(&#39;beerListModal&#39;);<br>            var beerListImage = document.getElementById(&#39;beerListImage&#39;);</pre><pre>            // Set the URL of your S3 image<br>            beerListImage.src = &#39;https://breweryproject-pod1.s3.amazonaws.com/Craft_Beer_List_Menu.jpg&#39;;</pre><pre>            modal.style.display = &#39;block&#39;;<br>        }</pre><pre>        function closeModal() {<br>            document.getElementById(&#39;beerListModal&#39;).style.display = &#39;none&#39;;<br>        }</pre><pre>        // Optional: Close the modal if the user clicks outside of it<br>        window.onclick = function(event) {<br>            let modal = document.getElementById(&#39;beerListModal&#39;);<br>            if (event.target == modal) {<br>                closeModal();<br>            }<br>        }<br>    &lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>Within the html text we need to add the Object URL from each photo. Once that is added we will now have our website up and running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*8bySsHe54nipf5LC.png" /><figcaption>Success! The images are now seen on our website from our S3</figcaption></figure><p><strong>Amazon CloudWatch Dashboard</strong></p><h3>What is CloudWatch?</h3><p>CloudWatch is an observability and monitoring service offered by AWS. It allows you to gather and track metrics, collect and monitor log files, set alarms, and respond to changes in your AWS resources.</p><ol><li>Log into the AWS account and search for CloudWatch section</li><li>Navigate to the dashboard section. Here we created a dashboard by clicking “Create Default Dashboard” We decided to name the Dashboard ArtisanalBrewery</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*hkW2PVIf7fw7YJrX.png" /></figure><p>3. With the dashboard being created we will now add metrics to our dashboard. We added “CPU-Utilization, Network In/Out, and Network Packets In/Out, CPU Credit Usage” This information will allow us to be aware of the volume of incoming traffic and the usage of the CPU.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*rneqk3ntFWG_PnXi.png" /></figure><p>This project was a great experience for Ayanda &amp; I as we were faced with being handed so much responsibility between the two of us. As this is still a work in progress because we want to add alarms and Amazon SNS so that we now have notifications and parameters set just incase something isn’t right and we can hop right in and fix the issue.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43894d0e551c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automating Serverless Website Deployment via CI/CD Pipeline]]></title>
            <link>https://medium.com/@aparker735/automating-serverless-website-deployment-via-ci-cd-pipeline-42d863efd33b?source=rss-47f7d62462b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/42d863efd33b</guid>
            <dc:creator><![CDATA[Aynda Parker]]></dc:creator>
            <pubDate>Thu, 25 Jul 2024 02:04:51 GMT</pubDate>
            <atom:updated>2024-07-25T02:04:51.191Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Step-by-Step Guide to Deploying a Serverless Website with CodePipeline and AWS Lambda</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*3x_4aiU5-gGsiOnA.png" /><figcaption>Created by Damion Raymond</figcaption></figure><h3>Scenario</h3><p>Vitality Sphere is a health and wellness company dedicated to improving its clients’ well-being through various services and products. The company’s online presence has grown significantly, with a website hosted on an AWS EC2 instance. As the company expands, it seeks to modernize its infrastructure to improve performance, reduce costs, and gain better insights into user interactions.</p><h3>Project Overview</h3><p>The cloud engineers for Vitality Sphere are tasked with implementing a series of updates and improvements to the company’s website and deployment processes. These updates will ensure that Vitality Sphere maintains a high level of service and stays competitive in the market. The company wants to migrate its website to a more cost-effective and scalable solution, implement user interaction tracking, and streamline its deployment process.</p><blockquote><em>Let’s get started!!!</em></blockquote><h3>Task 1: Migrate the Website to a Static S3 Hosted Website</h3><p><strong>Objectives:</strong></p><ul><li><strong>Migrate Content:</strong> Move the website content (HTML, CSS, JavaScript, images) from the current EC2 instance to an S3 bucket configured for static website hosting.</li><li><strong>Set Up CloudFront:</strong> Configure CloudFront to serve the static website, ensuring reduced latency and improved load times for users worldwide.</li><li><strong>Update DNS:</strong> Use Route 53 to point the company’s domain to the CloudFront distribution.</li></ul><h3>Migrating Content</h3><blockquote><em>contributor (</em><a href="https://medium.com/@mrskeetonthe1"><em>Jessica Ross</em></a><em>)</em></blockquote><p>Content migrating is the process of transferring files from one AWS service to another. In this scenario, Vitality Sphere, a health and wellness company, hosted a website on AWS EC2 but as the company’s online presence grew, so did the need to upgrade to a more secure, modernized infrastructure to improve performance, reduce costs, and gain better insights into user interactions.</p><p>AWS S3 is a way to store files in a more secure fashion that allows you to host a static website, and layer other services to implement scalability, reliability, performance, and track metrics on user insights.</p><p><strong>Objective:</strong> Move files from AWS EC2 to a S3 bucket.</p><p><strong>Migration Steps:</strong></p><ol><li>Connect to the EC2 instance via Sessions Manager.</li><li>Update the AWS packages so the terminal can communicate using AWS commands.</li></ol><pre>Sudo apt-get install s3cmd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*nd9wCoSU7ls7l8-5" /></figure><p>Sudo apt-get install s3cmd</p><p>3. Locate the files within the instance.</p><pre>ls</pre><p>4. Know the path to get to the files.</p><pre>/var/www/html</pre><p>With the files located, migrating the files can happen in one of two ways:</p><ol><li>One at a time, which can be time-consuming depending on how many files you have.</li><li>Moving whole directories.</li></ol><p>I started by moving each file individually using the following command:</p><pre>Sudo aws s3 cp /var/www/html/about.html s3://pod1.dev.vitality.luitprojects.com/about.html</pre><p>This code allows elevated privileges to the user (sudo) on AWS S3 to copy (cp) from the location of the files in the EC2 instance (/var/www/html) file named (about.html) to the S3 bucket (s3://pod1.dev.vitality.luitprojects.com) with the file name at the end (about.html).</p><p>I quickly realized there was a faster way of moving files, by moving whole directories with the following command:</p><pre>Sudo  aws s3 cp /var/www/html/ s3://pod1.dev.vitality.luitprojects.com/ – -recursive</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Mv-0uZ_gFnLxW10z" /></figure><p>Output</p><p>I repeated the process of copying the same files into the 2nd s3 bucket named:</p><ul><li>pod1.vitality.luitprojects.com</li></ul><h3>Hosting the Static Website on S3</h3><blockquote><em>contributors (</em><a href="https://medium.com/@hadianoor16"><em>Hadia Noor</em></a><em>, </em><a href="https://medium.com/@mrskeetonthe1"><em>Jessica Ross</em></a><em>)</em></blockquote><p>A static website is a basic type of website that contains web pages with fixed content.</p><p><strong>Objective:</strong> Create a static website</p><p><strong>Steps:</strong></p><ol><li>Locate the S3 bucket that has the objects you added to it.</li></ol><ul><li>pod1.dev.vitality.luitprojects.com</li><li>pod1.vitality.luitprojects.com</li></ul><p>2. Click on the highlighted bucket and the properties tab. Scroll to the bottom of the page and edit Static Web Hosting.</p><p>3. Toggle ‘Enable static web hosting and host a static website’. Enter index.html under index document and save changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*9UC4Eg_0kf2Js1fu" /></figure><p>Static Website Hosting</p><p>Repeat the process for the second bucket. There should be two static websites hosted, one for each bucket. The bucket policies will be different to reflect what is allowed and how each bucket interacts with users. Be mindful of who and what you allow in each bucket. That is very important to keep the buckets safe and secure.</p><h3>Hosted Zones</h3><p>AWS Route 53 hosted zones are like a well-organized container for DNS records, and they play a crucial role in managing how traffic flows for a specific domain.</p><p><strong>Objective:</strong> Create a hosted zone for pod1.dev.vitality.luitprojects.com</p><ol><li>Search Route 53 in AWS and select Hosted Zones from the dashboard. Click<strong> Create record</strong>.</li></ol><ul><li>Give it a domain name</li><li>Set the type to <strong>Public hosted zone</strong></li><li>Click <strong>Create hosted zone</strong></li></ul><p>2. Once the hosted zone is created, edit the record.</p><ul><li>Leave the record name as default</li><li>Record type will be ‘A-Routes traffic to a IPv4 address and some AWS resources</li><li>Toggle Alias</li><li>Route traffic to ‘Alias to S3 website endpoint</li><li>Locate the region the S3 was created in</li><li>Enter S3 endpoint (name of the record)</li><li>Simple routing policy</li><li>Toggle evaluate health targets to ‘yes’</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*-ntP2UzsfGVJPqUH" /></figure><p>Route 53 Hosted Zone Setup</p><h3>Deploy Amazon CloudFront Distribution for Production Website</h3><blockquote><em>contributor (</em><a href="https://medium.com/@hadianoor16"><em>Hadia Noor</em></a><em>)</em></blockquote><p>Amazon CloudFront is a web service that speeds up the distribution of your static and dynamic web content, such as .html, .css, .js, and image files, to your users. CloudFront delivers your content through a worldwide network of data centers called edge locations. When a user requests content that you’re serving with CloudFront, the request is routed to the edge location that provides the lowest latency (time delay), so that content is delivered with the best possible performance.</p><p>In this task, we will integrate the S3 bucket to CloudFront to achieve seamless performance for our website content delivery.</p><h3>Steps:</h3><ol><li>Go to CloudFront and click Create Distribution. Choose prod S3 bucket as Origin domain from dropdown.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*qdCFn-pKAN0N5AcQ" /></figure><p>Create distribution</p><p>2. For Origin access, choose Origin Access Control setting (OAC) instead of Public. It makes sure that your bucket is not accessible publicly by everyone and is only accessible via CloudFront. (Create new OAC, leave the defaults, and click Create).</p><blockquote><em>Notice that you must update your bucket policy at the end that CloudFront provides you.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*QHsiuJzjzCX883Zt" /></figure><p>Origin access control settings</p><p>3. For Default cache behavior choose Redirect HTTP to HTTPs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*IS6AJLrcK1XzVP0m" /></figure><p>Default cache behavior settings</p><p>4. Keep Cache key and origin requests as Recommended settings.</p><p><strong>Note:</strong> You can also change the policy to ‘Caching Disabled’ if you are testing some changes on the webpage to see if CloudFront is serving the right content as Cache invalidations will cost you some money and you don’t want to wait for TTL to expire. This setting can also be changed later once the distribution is created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*zs2CFfLx0t2RBREr" /></figure><p>Caching Optimized</p><p>5. Scroll down to Web Application Firewall (WAF). Keep the WAF to “Do not enable security protections” for now.</p><p>6. Scroll down to Settings, and choose “Use all edge locations (best performance)”.</p><ul><li>Click ‘Add item’ copy your registered domain name in this field and choose the custom SSL certificate you requested from AWS. Please refer to this document to request an SSL certificate for your domain.</li></ul><p><a href="https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html">https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*ZyoYrzBPuIOeCpLK" /></figure><p><strong><em>Why alternate domain name:</em></strong></p><p>When you create a distribution, CloudFront provides a domain name for it, such as d111111abcdef8.cloudfront.net. Instead of using this provided domain name, you can use an alternate domain name (also known as a CNAME).</p><p><strong><em>Why we need an SSL certificate:</em></strong></p><p>To add an alternate domain name (CNAME) to a CloudFront distribution, you must attach to your distribution a trusted, valid SSL/TLS certificate that covers the alternate domain name. This ensures that only people with access to your domain’s certificate can associate with CloudFront a CNAME related to your domain.</p><p>You can add other domain names as well but that should be covered by your SSL certificate. For example, the certificate requested as *.example.com can cover domains like marketing.example.com, web.example.com, support.example.com, etc. However, you can’t add alternate domain names that are at levels higher or lower than the wildcard. For example, you can’t add the alternate domain names example.com or marketing.product.example.com.</p><p>This is detailed documentation from AWS about using alternate domain names:</p><p><a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html">https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html</a></p><p>7. Use index.html for ‘Default root object’. This ensures that index.html is returned by default when the user requests the root URL (/) instead of a specific object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*_sQLxjy1sPO-w4Uq" /></figure><p>Click ‘Create distribution’. It will take some time as CloudFront is Deploying. When it’s ready, copy the distribution domain name and you will see your webpage is now being served by CloudFront.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*h7SFdFrXCbFkIPyo" /></figure><p>Website served by CloudFront</p><p>Also, notice that the webpage loaded faster compared to when it was served from the former EC2 instance or S3 bucket. CloudFront speeds up content delivery by leveraging its global network of data centers, known as edge locations, to reduce delivery time by caching your content close to your end users.</p><h3>DNS Configuration</h3><blockquote><em>contributor (</em><a href="https://medium.com/@labossiere01"><em>John Labossiere</em></a><em>)</em></blockquote><p>A <strong>DNS (Domain Name System)</strong> record is critical for mapping URLs to IP addresses and directing internet traffic to the correct endpoints. An <strong>A Record (Address Record)</strong> maps a domain name to an IPv4 address.</p><p><strong>Amazon Route 53</strong> is a DNS web service by AWS that helps route user requests to applications hosted on AWS or elsewhere. It offers domain registration, DNS routing, and ensures traffic to endpoints. With multiple routing options and smooth integration with AWS services like CloudFront and S3, Route 53 makes managing web applications easier.</p><p><strong>Objective:</strong></p><ol><li>Direct the production domain to the CloudFront distribution, ensuring the S3 bucket is accessible only through CloudFront as per security requirements.</li><li>Modify the Route 53 DNS record to direct the development domain to the dev static S3 website.</li></ol><p><strong>Update Production DNS Record to Point to CloudFront Implementation steps:</strong></p><ol><li>Navigate to Route 53 management console.</li><li>Click on ‘Hosted zones’.</li><li>Click on ‘<strong>pod1.vitality.luitprojects.com</strong>’<strong>.</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*j-ez32_m8PFMSK1N" /></figure><p>4. Create a new record.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*93eFT5HR04E-U3Ce" /></figure><p>New record creation</p><p>5. Select ‘<strong>A record</strong>’ for Record Type.</p><p>6. Ensure the ‘<strong>Alias</strong>’ option is set to ‘<strong>Yes</strong>’.</p><p>7. For ‘Route traffic’ select ‘<strong>Alias to CloudFront distribution</strong>’.</p><p>8. Choose the CloudFront distribution domain ‘<strong>d34e450snuwv6b.cloudfront.net</strong>’.</p><p>9. Save the new DNS record.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*njcFCshj15QFKlwT" /></figure><p>Record configuration</p><p>10. Test the setup by searching the URL and using the ‘<strong>nslookup</strong>’ command to verify the changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/0*TU54ZYA80Hry9Mt-" /></figure><p>Test URL with ‘nslookup’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*InRYCwFE5_2rxq77" /></figure><p>Website URL displaying correctly</p><p><strong>Update Development DNS Record Implementation steps:</strong></p><ol><li>Select the existing <strong>A record</strong> for ‘<strong>pod1.dev.vitality.luitprojects.com</strong>’ in the Route 53 management console</li></ol><p>2. Confirm that it is an <strong>A record</strong> and points to the S3 website endpoint ‘<strong>s3-website-us-east-1.amazonaws.com</strong>’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*nCYQ5oY9opSnEONe" /></figure><p>Confirm A record endpoint</p><p>3. Since the Dev DNS record of ‘<strong>pod1.dev.vitality.luitprojects.com</strong>’ is already correctly set up and pointing to the S3 website endpoint, there is no need for further action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*CEjZAOuUFAcJ3Mof" /></figure><p>DNS Record</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*oW4aro1b9y1sAnHU" /></figure><p>DNS Record settings</p><p>4. Verify the configuration by searching the URL and running the ‘<strong>nslookup’</strong> command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/0*VtaiNLb2HNSmrb9U" /></figure><p>nslookup output</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*iY6Huk8HuxNuNaT9" /></figure><p>Website displaying correctly</p><h3>Task 2: Create an API for User Interaction Tracking</h3><blockquote><em>contributors (</em><a href="https://medium.com/@naperry2011"><em>Nicholas Perry</em></a><em>, </em><a href="https://medium.com/@aparker735"><em>Aynda Parker</em></a><em>, </em><a href="https://medium.com/@markeeta.d.little"><em>Dionne Little</em></a><em>)</em></blockquote><p><strong>Objectives:</strong></p><ul><li><strong>Set Up DynamoDB for Efficient Data Storage:</strong><br>Dependency: None, but needs to be set up before Lambda functions utilize it.</li><li><strong>API Development:</strong> Develop an API that triggers a Lambda function to record the time a user visits a page.</li><li><strong>Data Storage:</strong> Store the recorded data (timestamp and page URL) in a DynamoDB table.</li></ul><p><strong>Amazon DynamoDB</strong> is a fully managed NoSQL database service provided by AWS. It offers fast and predictable performance with seamless scalability. DynamoDB is designed to handle high throughput of read and write operations and can scale horizontally by adding more partitions. It supports both document and key-value store models and is optimized for low latency and high performance.</p><h3>Establish a DynamoDB Table</h3><h3><strong>Steps:</strong></h3><ol><li><strong>Open the DynamoDB Console</strong>:</li></ol><ul><li>Go to the<a href="https://aws.amazon.com/console/"> AWS Management Console</a>.</li><li>Navigate to the DynamoDB service.</li></ul><p><strong>Create a New Table</strong>:</p><ul><li>Click on “Create table”.</li><li><strong>Table name</strong>: TeamBlue_DynamoDB</li><li><strong>Partition key</strong>: Timestamp (String)</li><li><strong>Sort key</strong>: Page (String)</li></ul><p><strong>Set Table Settings</strong>:</p><ul><li>For this example, you can use the default settings. Optionally, adjust the read and write capacity modes based on your expected load (e.g., use on-demand capacity mode for automatic scaling).</li></ul><p><strong>Create the Table</strong>:</p><ul><li>Click on “Create” to establish the table.</li></ul><h3>Creation of Lambda Function and Setup of API Gateway</h3><p>Lambda functions, part of AWS Lambda service, offer several benefits that make them highly advantageous for building serverless applications and executing backend tasks efficiently:</p><ul><li>No Server Management</li><li>Automatic Scaling</li><li>Flexibility in Programming Languages</li><li>Event-Driven Model and so much more</li></ul><h3>Lambda Function Creation</h3><p><strong>Steps:</strong></p><ol><li><strong>Click on “Create function”</strong>:</li></ol><ul><li>On the Lambda dashboard, click on the orange “Create function” button.</li></ul><p>2.<strong> Select “Author from scratch” to create a new function.</strong></p><p>3. <strong>Basic Information</strong>:</p><ul><li><strong>Function Name</strong>: (team_blue)</li><li><strong>Runtime</strong>: Choose the runtime environment (Python 3.11)</li><li><strong>Role</strong>: This was given (LambdaToDynamoDB)</li></ul><p>4. <strong>Configure Triggers</strong></p><ul><li>Add Trigger (API Gateway)</li><li>Configure Trigger (POST Method)</li></ul><p>We have to add our script under the code section. This code was given and we had to tweak the code just a bit.</p><p>An example of our code is shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*OxxGvVrwM1x_b6qO" /></figure><p>Code</p><blockquote><em>Our code was tested and deployed for future usage.</em></blockquote><h3>Create a New API</h3><p>Creating an API Gateway for Vitality Sphere serves to enhance scalability by efficiently handling increased web traffic and dynamic scaling, reducing costs through a serverless architecture with pay-per-use pricing, and improving performance using caching and edge-optimized endpoints. It also facilitates user interaction tracking for better insights and real-time analytics, streamlines deployment with versioning, staging, and CI/CD integration, and ensures robust security with access control and protection against web threats. These improvements will make Vitality Sphere’s infrastructure more scalable, cost-effective, and performant, providing better user insights and a streamlined deployment process.</p><p><strong>Steps:</strong></p><ol><li>Click on <strong>Create API</strong>.</li><li>Choose the type of API you want to create. You can select between:</li></ol><ul><li><strong>HTTP API</strong>: For creating HTTP-based APIs.</li><li>Click <strong>Build</strong> under the chosen API type.</li></ul><h3>Configure API Settings</h3><ol><li><strong>API Name</strong>: Enter a name for your API our name is TeamBlue_API.</li><li><strong>Description</strong>: (Optional) Enter a description for your API.</li></ol><h3>Create Resources and Methods</h3><ol><li>In the API Gateway console, select your API from the list. TeamBlue_API.</li><li>Under the <strong>Resources</strong> section, click <strong>Create Resource</strong>.</li><li>Enter a resource name and path, then click <strong>Create Resource</strong>.</li><li>To create a method, select the newly created resource.</li><li>Click on <strong>Actions</strong> and select <strong>Create Method</strong>.</li><li>Choose an HTTP method ( POST) and click the checkmark.</li><li>Configure the method settings, such as integration type (Lambda Function, HTTP) and the corresponding configurations.</li></ol><h3>Deploy the API</h3><ol><li>After creating the resources and methods, click on <strong>Actions</strong> and select <strong>Deploy API</strong>.</li><li>Create a new stage TeamBlue_API.</li><li>Enter a stage name and click <strong>Deploy</strong>.</li></ol><h3>Test the API</h3><ol><li>Once deployed, go to the <strong>Stages</strong> section and select your stage. TeamBlue_API.</li><li>You will see the Invoke URL for your API. Use this URL to test your API using Postman.</li></ol><h3>Additional Configuration</h3><ul><li><strong>Enable CORS</strong>: If you need to enable Cross-Origin Resource Sharing (CORS), go to the method settings, click on <strong>Enable CORS</strong>, and follow the prompts.</li><li><strong>Custom Domain Names</strong>: Set up a custom domain name for your API if needed.</li><li><strong>API Keys and Usage Plans</strong>: Configure API keys and usage plans for better management and security.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*8UZhaMKIw5zePGF2" /></figure><p>CORS configuration</p><h3>Integrate Website with API Gateway</h3><h3>Description</h3><p>Update the static website code to include interaction with the newly configured API Gateway. This involves adding or modifying JavaScript in script.js to send data to the backend via API calls.</p><p>We need to update the website by going to CodeCommit, add the API URL to the script.js file and commit that file to update.</p><p>Grab the API URL from the API Gate→Team_BlueAPI→Stages: <a href="https://2djcuxzy4g.execute-api.us-east-1.amazonaws.com/metrics">https://2djcuxzy4g.execute-api.us-east-1.amazonaws.com/metrics</a></p><p>Once you have the URL got to code commit and follow the following steps<br><strong>Steps</strong></p><h3>Navigate to AWS CodeCommit</h3><ol><li>Sign in to the AWS Management Console.</li><li>Open the <strong>CodeCommit</strong> console at<a href="https://console.aws.amazon.com/codecommit"> https://console.aws.amazon.com/codecommit</a>.</li></ol><h3>Open Your Repository</h3><ol><li>In the navigation pane, choose <strong>Repositories</strong>.</li><li>Select the repository you want to update.</li></ol><h3>Navigate to the script.js File</h3><ol><li>In the repository, navigate through the directory structure to find the script.js file.</li><li>Click on script.js to open it.</li><li>Edit the script.js File</li></ol><h3>Commit the Changes</h3><ol><li>After making your changes, scroll down to the <strong>Commit message</strong> section.</li><li>Enter a commit message that describes the changes you made, for example, “Updated script.js to include API Gateway interaction”.</li><li>Click the <strong>Commit changes</strong> button.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*zwwfMDVoB940_DEO" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u-Xgg86riullCCvE" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*72hJK3HZkXCAXwSb" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*Fg-aJE_MHDhukmeI" /></figure><blockquote><em>The changes may take a minute but once they do, you are all set. If the changes are correct the lambda function we created will trigger each time a user visits the site and posts the time in DynamoDB.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*ChjB-E93C847woti" /></figure><h3>Task 3: Implement a CI/CD Pipeline</h3><p><strong>Objectives:</strong></p><ul><li><strong>Source Code Management:</strong> Use CodeCommit to manage the website’s source code.</li><li><strong>Continuous Integration</strong> <strong>and Deployment:</strong> Use CodeBuild and CodeDeploy to automate the build and deployment process.</li><li><strong>Approval Process:</strong> Implement a manual approval step before deploying to production.</li></ul><h3>Source Code Management</h3><blockquote><em>contributor (</em><a href="https://medium.com/@kennethbarnesjr.2"><em>Kenneth Barnes</em></a><em>)</em></blockquote><h3>Version Control and Repository Setup</h3><ul><li><strong>AWS CodeCommit</strong> is a <strong>version control service</strong> hosted by Amazon Web Services (AWS). It will allow us to privately store and manage assets such as documents, source code, and binary files in the cloud for the Vitality Sphere Website.</li><li><strong>Cloud9 </strong>is a cloud-based integrated development environment (IDE) that lets you write, run, and debug your code within a browser.</li></ul><p><strong>Objective:</strong><br>To create a central repository in CodeCommit for the Vitality Sphere website files.</p><p><strong>Steps:</strong></p><ol><li>Head to the <strong>CodeCommit</strong> service.</li><li>Click on the <strong>Repositories</strong> tab, then click “Create repository” and fill out your information as needed.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*BVnlaAFj4xsfg2Ew" /></figure><p>CodeCommit Repository Creation</p><h3>Setting up Cloud9 Instance to manually push files</h3><p><strong>Steps:</strong></p><ol><li>Now head to the <strong>Cloud9</strong> service and start the process of creating an environment.</li><li>I used most of the default<strong> </strong>settings to create this environment.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Lge6PZ9Ct8lWCm1f" /></figure><p>IAM roles are created to allow me to remote into the instance using the SSM service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*vd34s1msPNOydcXi" /></figure><p>3. Copy the git line that’s under step 3 to clone the CodeCommit repository and paste it within the Cloud9 instance. Then use ( cd &lt; Repository Name &gt; ) to be within the repository to push the Vitality Sphere website files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*63Wk03mu910KjInr" /></figure><p>The steps are within the image above</p><h3>Continuous Integration and Deployment</h3><blockquote><em>contributor (</em><a href="https://medium.com/@kennethbarnesjr.2"><em>Kenneth Barnes</em></a><em>)</em></blockquote><p><strong>Continuous Integration and Deployment </strong>is huge within Cloud DevOps, it ensures fast releases and provides efficiency when deploying.</p><p><strong>CodeBuild </strong>is a fully managed build service that compiles source code, runs tests, and produces software packages that are ready to deploy.</p><p><strong>CodePipeline </strong>is a continuous delivery service that automates the build, test, and deploy phases of your release process every time there is a code change, based on the release model that is defined.</p><p><strong>Objective:</strong></p><ol><li>Configuring AWS CodeBuild to compile and test code from our repository, ensuring code integrity before deployment.</li><li>Implement an AWS CodePipeline to automate the continuous integration and delivery process for the serverless environment. We will also configure the pipeline to AWS CodeCommit repository within the Vitality Sphere account, and ensure that updates to the repository will trigger the deployment process appropriately.</li><li>Establish an initial deployment stage in AWS CodePipeline to deploy artifacts to the development S3 bucket and test changes in a live environment.</li></ol><h3>Integrate AWS CodeBuild for Code Compilation and Testing</h3><p><strong>Steps:</strong></p><ol><li>Navigate to<strong> CodeBuild </strong>then on the left-hand side click on the “<em>Build projects</em>” tab and click Orange “<em>Create project</em>” to start the process of the Build Environment. The Source is from the <strong>CodeCommit</strong> repository that I have created earlier.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*vT6wGoJqLebRPivf" /></figure><p>Note: Within CodeBuild I used an existing role of CodeBuildRole. This role will allow the CodeBuild project to have AWSCodeBuildAdminAccess and Customer Managed policies to complete the following tasks in the project.</p><blockquote><em>Within this Project I used a </em><strong><em>buildspec.yaml</em></strong><em> file to define what</em><strong><em> CodeBuild</em></strong><em> should do during the build phase — This is very important!</em></blockquote><p>2. Now head to <strong>Cloud9 </strong>to push the website files into the <strong>CodeCommit </strong>repository using the following commands:</p><ul><li><strong>git add </strong>( # This command gets the next commit command ready for any modifications that have occurred in the working directory.)</li><li><strong>git commit -m “first commit”</strong> ( # This command makes a snapshot of the changes that were made when the <strong>git add</strong> command was used. The -m option lets you leave a commit message and my message was the “first commit”.)</li><li><strong>git push </strong>( # This command allows us to push the files that we saved within the working directory into the CodeCommit repository.)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*nNyY-ILcR8Pv35Lz" /></figure><p>Note: Make sure to save the files that you’re working on, because if you don’t save the file or files you will get a warning message, also make sure you’re in the correct directory that you want to work in.</p><blockquote><em>Then I ran a test within CodeBuild and it was able to succeed In doing certain checks before the deployment stage.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*APbDVKzWUfKHJBC8" /></figure><h3>Configure AWS CodePipeline with AWS CodeCommit Repository &amp; Automate Deployment to Development Environment</h3><p><strong>Steps:</strong></p><ol><li>Navigate to<strong> CodePipeline </strong>then on the left-hand side click on the “<em>Pipelines</em>” tab and click Orange “<em>Create pipeline</em>” to start the process of the CICD Pipeline.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*LLVpSgUyKxSBL2_q" /></figure><p>Within CodePipeline I used an existing role of CodepipelineRole. This role will allow the CodePipeline service to have AWSCodePipeline_FullAccess and Customer Managed policies to complete the following tasks in the project.</p><p>2. When finishing the <strong>CodePipeline</strong> I went back to the <strong>Cloud9 </strong>instance to make a test file and push that file to the<strong> CodeCommit</strong> repository to see if the <strong>CodePipeline </strong>is functioning correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*M6HiO15aWaiU2rL6" /></figure><p>Cloud9 test file push to CodeCommit</p><p>3. Once I pushed the code to the <strong>CodeCommit</strong> repository, as seen in the image above, a CloudWatchEvent was triggered to let CodePipeline know to start the process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*736_tHTIYXmInyCM" /></figure><p>In the image above, the CodePipeline went through the pipeline workflow and succeeded.</p><p>4. Then I went ahead and created a Deployment Stage within the <strong>CodePipeline</strong> that will output the information that is within the <strong>CodeCommit</strong> repository into the Dev S3 bucket that we have within this project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*_dttluGODeUS5gHw" /></figure><p>In the image above I went to the Dev S3 Bucket to create a folder for the output of the deployment stage when the CodePipeline is triggered. Update: For this project it’s incorrect, so I just clicked the “Extract file before deploy” and that section above is optional. So I just left it blank and the code will go straight to the bucket and not the folder that is within the bucket.</p><h3>Implement a manual approval step before deploying to production</h3><blockquote><em>contributor (</em><a href="https://medium.com/@hadianoor16"><em>Hadia Noor</em></a><em>)</em></blockquote><p>Once code changes have been deployed to the Dev bucket successfully, the next task will be to deploy to the Prod bucket. Since this is crucial to directly deploy to the Prod bucket, we can add a manual approval stage in our CodePipeline so changes are approved first before sending them out to end users.</p><p>Manual approval can be added later in the Pipeline so go to your pipeline and edit. Right after the Deploy stage to the Dev S3 bucket, click ‘Add Stage’ and name this stage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*3mTf6f9XxLfblDZ-" /></figure><p>Add stage</p><p>Once the stage is created, click ‘Add Action Group’ and select ‘Manual Approval’ for Action Provider.</p><p>URL for review is optional but it’s a good practice to review the Dev bucket once before we give the go-ahead to deploy those changes in Prod. Hence, I used the Dev bucket URL.</p><p><a href="https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html">https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html</a></p><p><a href="https://docs.aws.amazon.com/sns/latest/dg/sns-create-subscribe-endpoint-to-topic.html">https://docs.aws.amazon.com/sns/latest/dg/sns-create-subscribe-endpoint-to-topic.html</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Tj7QmZUUjYooRrIy" /></figure><p>Now ‘<strong>Add Action Group</strong>’ again for the Manual-Approval-Production stage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*woYqSzPc4rti1HNy" /></figure><p>Now for ‘<strong>Action Provider</strong>’ choose S3 bucket and select your Prod bucket from dropdown. Choose ‘<strong>Extract file before deploy</strong>’ and click <strong>Done</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*iEIkVR2xu_sr8RFa" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*27mEveYIo6EjiXPg" /></figure><p>Manual Approval to Production</p><p>Scroll up and <strong>Save pipeline</strong>.</p><p>Now time to test the changes, trigger the pipeline by making some code changes in CodeCommit Repo and the pipeline will be triggered. The changes are deployed to the Dev bucket right away, but the pipeline will stop at the Manual-Approval-Production step to be approved by developers before it continues execution to the Prod bucket. If you are subscribed to the SNS topic, you will receive an email notification like below. Follow the link to approve/reject.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Ph1Lrun-REUfGrZZ" /></figure><h3>Testing the CI/CD</h3><p>I changed the title in the index.html page in CodeCommit that triggered the Pipeline. It executed the deployment stage. The dev bucket shows the changes made to the webpage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*bfnkYNNV6VI_U6ka" /></figure><p>Now, the Approval stage is in the Pending state. Click Review and “Approve” to proceed to prod.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*l7H4qdVT0_vjrXwA" /></figure><p>Once it’s approved, the pipeline continues its operation and performs the next step which is to deploy the changes to the Prod environment.</p><p>When the deployment to the Production bucket shows succeeded, head out to the Prod S3 bucket to see if the changes are reflected.</p><p>Also, remember that our prod S3 bucket is being served by CloudFront, and Route 53 points to the company’s domain to the CloudFront distribution.</p><p>Copy the CloudFront Distribution domain name and see the changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*M9Ww_4gK0OMFIqIf" /></figure><p>Copy the company’s domain name <em>pod1.vitality.luitprojects.com</em> and paste it into the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*xLAOfynzwnOyiVaL" /></figure><p>Hence our end users are being served with the updated content via CloudFront.</p><p>You must remember that since CloudFront caches the object in the local cache till TTL expires, the user might still see the old content. For testing purposes, I kept the caching Disabled.</p><h3>Security and Compliance</h3><p><strong>Security Best Practices: </strong><em>contributors (</em><a href="https://medium.com/@naperry2011"><em>Nicholas Perry</em></a><em>)</em></p><ul><li>Apply appropriate bucket policies to secure the S3 buckets.</li><li>Use IAM roles and policies to grant the necessary permissions to Lambda, API Gateway, and other AWS services.</li></ul><p><strong>Compliance:</strong></p><ul><li>Follow the provided naming standards for all AWS resources.</li></ul><h3>IAM Roles and Permissions</h3><p><strong>Objective:</strong> Ensure IAM roles and permissions adhere to the principle of least privilege and are properly configured.</p><p><strong>Steps:</strong></p><h3>Review IAM Policies</h3><ul><li>Analyze each IAM role and attached policies.</li><li>Ensure roles have the minimum necessary permissions.</li></ul><h3>Roles and Attached Policies</h3><p><strong>AWSCloud9SSMInstanceProfile</strong></p><ul><li><strong>Permissions: </strong>Ensure the role has the necessary permissions for AWS Cloud9 instances, but no more.</li></ul><p><strong>AdministratorAccess</strong></p><ul><li><strong>Permissions: </strong>Ensure this role is limited to administrators and used sparingly.</li></ul><p><strong>ReadOnlyAccess</strong></p><ul><li><strong>Permissions: </strong>Confirm this role has only read-only access.</li></ul><p><strong>PowerUserIAMPolicy</strong></p><ul><li><strong>Permissions: </strong>Ensure this role provides necessary access without administrative privileges.</li></ul><p><strong>APIGatewayServiceRolePolicy</strong></p><ul><li><strong>Permissions: </strong>Verify the role has permissions for managing API Gateway resources.</li></ul><p><strong>AWSApplicationAutoscalingDynamoDBTablePolicy</strong></p><ul><li><strong>Permissions: </strong>Ensure the role has the necessary permissions for autoscaling DynamoDB tables.</li></ul><p><strong>AWSCloud9ServiceRolePolicy</strong></p><ul><li><strong>Permissions: </strong>Verify the role has permissions required for AWS Cloud9.</li></ul><p><strong>AWSOrganizationsServiceTrustPolicy</strong></p><ul><li><strong>Permissions: </strong>Confirm the role has the appropriate permissions for AWS Organizations.</li></ul><p><strong>AWSSSOServiceRolePolicy</strong></p><ul><li><strong>Permissions: </strong>Ensure the role has the necessary permissions for AWS SSO.</li></ul><p><strong>AWSSupportServiceRolePolicy</strong></p><ul><li><strong>Permissions: </strong>Verify the role has permissions for AWS Support.</li></ul><p><strong>Cloud9Role</strong></p><ul><li><strong>Permissions: AmazonS3FullAccess</strong></li><li>Confirm this access is necessary and limit it to specific buckets if possible.</li></ul><p><strong>AWSCodeCommitFullAccess</strong></p><ul><li>Ensure this is required for the role’s purpose.</li></ul><p><strong>CodeBuildRole</strong></p><ul><li><strong>Permissions: AWSCodeBuildAdminAccess</strong></li><li>Confirm administrative access is necessary.</li></ul><p><strong>CodeBuildBasePolicy-CodeBuildRole-us-east-1</strong></p><ul><li>Verify base policy permissions.</li></ul><p><strong>AWSCodeDeployRole</strong></p><ul><li><strong>Permissions: </strong>Ensure it has the necessary permissions for CodeDeploy and nothing more.</li></ul><p><strong>CodePipelineRole</strong></p><ul><li><strong>Permissions: AWSCodePipeline_FullAccess</strong></li><li>Verify full access is required.</li></ul><p><strong>CodePipelinePolicy</strong></p><ul><li>Review and confirm necessary permissions.</li></ul><p><strong>cwe-role-us-east-1-test</strong></p><ul><li><strong>Permissions: start-pipeline-execution-us-east-1-test</strong></li><li>Ensure it only has permissions to start pipeline execution.</li></ul><p><strong>cwe-role-us-east-1-VitalitySphere-Streamline</strong></p><ul><li><strong>Permissions: codepipeline</strong></li><li>Confirm this role has the minimal necessary permissions.</li></ul><p><strong>cwe-role-us-east-1-VitalitySphere-Dev-Pipeline-001-CI-CD</strong></p><ul><li><strong>Permissions: codepipeline</strong></li><li>Ensure it only has permissions to start pipeline execution.</li></ul><h3>Decommission Old EC2 Server After Successful Migration</h3><blockquote><em>contributor (</em><a href="https://medium.com/@hadianoor16"><em>Hadia Noor</em></a><em>)</em></blockquote><p>As Vitality Sphere achieved a more scalable, cost-effective, and efficient infrastructure for their website by migrating their website to S3 bucket and CloudFront, their next task is to decommission the old EC2 instances while making sure no other services get interrupted and there is no downtime for the users.</p><p>However, before shutting down the EC2 instances, cloud engineers need to make sure that 100% of the traffic is directed to the new production environment and that there are no reported issues for the specified period.</p><p>Once this is confirmed, go to EC2 instances, and click on your running instance -&gt; Instance State -&gt; Terminate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*W84mHETaPR8qKtGY" /></figure><p>Terminate old EC2 instance.</p><h3>Summary</h3><p>By completing these tasks, Vitality Sphere will achieve a more scalable, cost-effective, and efficient infrastructure for its website, along with valuable insights into user interactions and a streamlined deployment process.</p><h3>Final Deliverables</h3><ol><li><strong>Migrated Website:</strong></li></ol><ul><li>A static website hosted on S3, served through CloudFront, with DNS pointed by Route 53.</li></ul><p><strong>2. User Interaction API:</strong></p><ul><li>An API that triggers a Lambda function to record user interactions in DynamoDB.</li></ul><p><strong>3. CI/CD Pipeline:</strong></p><ul><li>A fully functioning CI/CD pipeline with automated build and deployment processes, including a manual approval step.</li></ul><p>This project could not have been possible without the amazing effort put forth by all my teammates at Level-Up-In-Tech: (<a href="https://medium.com/@naperry2011">Nicholas Perry</a>, <a href="https://medium.com/@hadianoor16">Hadia Noor</a>, <a href="https://medium.com/@kennethbarnesjr.2">Kenneth Barnes</a>, <a href="https://medium.com/@aparker735">Aynda Parker</a>, <a href="https://medium.com/@markeeta.d.little">Dionne Little</a>, <a href="https://medium.com/@mrskeetonthe1">Jessica Ross</a>, and <a href="https://medium.com/@labossiere01">John Labossiere</a>). Stay tuned for more cloud tips!!!</p><p><strong>References</strong>:</p><p><a href="https://blog.logrocket.com/product-management/fibonacci-sequence-story-points-agile/">Agile estimation: Using the Fibonacci sequence for story points — LogRocket Blog</a></p><p><a href="https://docs.aws.amazon.com/codepipeline/latest/userguide/integrations-action-type.html#w2aac12b9c13b7">Integrations with CodePipeline action types — AWS CodePipeline (amazon.com)</a></p><p><a href="https://www.youtube.com/watch?v=e90rz62rk-8">https://www.youtube.com/watch?v=e90rz62rk-8</a></p><p><a href="https://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-s3deploy.html">https://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-s3deploy.html</a></p><p><a href="https://medium.com/tag/aws-codepipeline?source=post_page-----d99e7a632838---------------aws_codepipeline-----------------">Aws Codepipeline</a></p><p><a href="https://medium.com/tag/serverless-architecture?source=post_page-----d99e7a632838---------------serverless_architecture-----------------">Serverless Architecture</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42d863efd33b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>