<?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 Kehinde Oniyide on Medium]]></title>
        <description><![CDATA[Stories by Kehinde Oniyide on Medium]]></description>
        <link>https://medium.com/@jkenny1930?source=rss-e0d222971d67------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6rxbfxO0EAdtDBFF8hCeRw.jpeg</url>
            <title>Stories by Kehinde Oniyide on Medium</title>
            <link>https://medium.com/@jkenny1930?source=rss-e0d222971d67------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 06:33:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jkenny1930/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[CREATE ECR, INSTALL DOCKER, CREATE IMAGE, AND PUSH IMAGE TO ECR]]></title>
            <link>https://medium.com/@jkenny1930/create-ecr-install-docker-create-image-and-push-image-to-ecr-84abe088bbc3?source=rss-e0d222971d67------2</link>
            <guid isPermaLink="false">https://medium.com/p/84abe088bbc3</guid>
            <dc:creator><![CDATA[Kehinde Oniyide]]></dc:creator>
            <pubDate>Wed, 24 Jul 2024 15:15:18 GMT</pubDate>
            <atom:updated>2024-07-24T15:15:18.899Z</atom:updated>
            <content:encoded><![CDATA[<p>CRESPO Multimedia is developing a new suite of microservices for their online platform which will be hosted on an Amazon EKS cluster. As part of their CI/CD pipeline, they need to set up a private Docker container registry using Amazon Elastic Container Registry (ECR). The process involves developers creating Docker images of their microservices locally, which are then pushed to ECR. These images will be pulled by the EKS cluster to deploy the microservices. The company requires a secure, scalable, and efficient workflow to manage the lifecycle of these Docker images, ensuring that only authorized users can push or pull images to maintain the integrity and security of their deployments.</p><p>This lab guide provides CRESPO Multimedia Company with a detailed procedure for setting up Amazon ECR, installing Docker, creating a Docker image, and pushing it to ECR for use with Amazon EKS.</p><h4>INTRODUCTIONS</h4><p><strong>ECR</strong>: Amazon Elastic Container Registry (ECR) is a fully managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images.</p><p>Amazon ECR is integrated with Amazon Elastic Container Service (ECS), simplifying your development to production workflow. Amazon ECR eliminates the need to operate your own container repositories or worry about scaling the underlying infrastructure.</p><p>Amazon ECR hosts your images in a highly available and scalable architecture, allowing you to reliably deploy containers for your applications. Integration with AWS Identity and Access Management (IAM) provides resource-level control of each repository.</p><p>With Amazon ECR, there are no upfront fees or commitments. You pay only for the amount of data you store in your repositories and data transferred to the Internet.</p><h4>DOCKER:</h4><p>Docker is a platform for developing, shipping, and running applications in containers. It simplifies the process of creating and managing containers, allowing developers to package their applications and all dependencies into a single unit for easy deployment and execution.</p><p>Docker Image A Docker image is a lightweight, standalone, and executable package that includes the application code, runtime, libraries, and other dependencies required to run an application. Images are used to create containers when executed.</p><h4>Push &amp; Pull:</h4><p>Push &amp; Pull (Docker) Push: In Docker, pushing refers to the process of uploading a Docker image to a container registry, making it available for others to pull and use. Pull: Pulling in Docker involves downloading a Docker image from a container registry to your local system or another environment.</p><h4>Git Push &amp; Pull Push (Git):</h4><p>Pushing in Git involves uploading your local changes (commits) to a remote repository, making them accessible to others collaborating on the same project. Pull (Git): Pulling in Git is the process of fetching changes from a remote repository and merging them into your local branch, ensuring your code is up-to-date with the latest changes.</p><p>This activity guide cover steps for:</p><ol><li>Creating a Repository in ECR</li><li>Configure AWS credentials and Install Docker</li><li>Creating a Docker file and build Images from it</li><li>Pushing images to Repository</li><li>Open your Console and search <strong>ECR</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*YxboV2IxVPkk3uvhHm_Jmg.png" /></figure><p>2. Click on <strong>Create Repository</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*G7ua1W3OMocDWjO-t3VKMg.png" /></figure><p>3. Enter your repository name, keep the settings according to your need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*XTJI6DI3bAu7uGGJZcYvkg.png" /></figure><p>4. Click on <strong>Create Repository</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*WpjbanqmpcBVg8g87H-gSQ.png" /></figure><p>5. Repository Created Successfully</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*7In9crmSTFk4q_aablwtNg.png" /></figure><h4>6. INSTALL DOCKER &amp; CREATE IMAGE</h4><p>Docker: It’s a platform for developing, shipping, and running applications in containers. Containers allow you to package an application and its dependencies together, ensuring consistency across different environments.</p><p>In Docker, an image is a lightweight, standalone, and executable package that includes everything needed to run a piece of software, including the code, runtime, libraries, and system tools. Creating an image involves defining a set of instructions (Dockerfile) that specify how the image should be built.</p><p>NOTE: We already configured our EC2 server on Amazon Linux, so we will just move to installing our Docker on EC2 Instance.</p><p><strong>6.1 Installing Docker On EC2 Instance</strong></p><ol><li>Switch to the root user</li></ol><p><em>$ sudo -i</em></p><p>2. First Update Software Repositories</p><p><em>$ yum update -y</em></p><p>3. Install Docker</p><p><em>$ yum install docker</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Ur0SKpawrkw1Nj2bm9O6Zw.png" /></figure><p>4. Start and Enable Docker</p><p><em>$ systemctl start docker</em></p><p><em>$ systemctl enable docker</em></p><p>5. Check Docker status</p><p><em>$ systemctl status docker</em></p><p>you should output like below (exit by typing q)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*SxC79hBMudAGJOKaOTtYeA.png" /></figure><p>6. Check Docker Version</p><p><em>$ docker — version</em></p><p>you should see output like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9RAg5q-n6RzscI7R16-7yQ.png" /></figure><p><strong>6.2 Creating a Docker File and build Image from it.</strong></p><ol><li>Download the Docker from GitHub by running the command below.</li></ol><p><em>$ wget</em> <a href="https://raw.githubusercontent.com/k21academyuk/Kubernetes/master/ECS/Dockerfile">https://raw.githubusercontent.com/k21academyuk/Kubernetes/master/ECS/Dockerfile</a></p><p><em>$ ls</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*qNR8Iel2FvmMopZbHJN84Q.png" /></figure><p>2. View the content of the File.</p><p><em>$ cat Dockerfile</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*8LbrS8iElzQovoshjVU18A.png" /></figure><p>3. Now build the docker image from the Dockerfile.</p><p><em># docker build -t hello-world .</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*aPZozRJ4jwXjMQHZK1LNRw.png" /></figure><p>4. Validate Docker Images Created.</p><p><em># docker images</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*BR93oXZny8_0BjFY8-lPRg.png" /></figure><p><strong>7.1 PUSH DOCKER IMAGE TO ECR</strong></p><ol><li>Go to ECR console then access the repo and click on <strong>View push commands</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ZFZM09L2PXUjS_XSM-HThg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*nxVldoutfTkIth754himWw.png" /></figure><p>2. Copy the get-login password command and run</p><p>3. Copy the docker tag command and run</p><p>4. Copy the docker push command and run</p><p>You should get a similar result below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*LhpJ7xRljoV0VdrA1Qrzuw.png" /></figure><p>5. Go back to ECR console, your image will be successfully pushed to repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*NSrwNRHxsAS5YRsrogp2Cw.png" /></figure><p>We have successfully Pushed the Docker Image in the ECR repository.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84abe088bbc3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deliver Content Faster Using Amazon CloudFront]]></title>
            <link>https://medium.com/@jkenny1930/deliver-content-faster-using-amazon-cloudfront-adb62f47eb08?source=rss-e0d222971d67------2</link>
            <guid isPermaLink="false">https://medium.com/p/adb62f47eb08</guid>
            <dc:creator><![CDATA[Kehinde Oniyide]]></dc:creator>
            <pubDate>Fri, 08 Sep 2023 21:41:16 GMT</pubDate>
            <atom:updated>2023-09-08T21:41:16.648Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>INTRODUCTION:</strong></p><p>Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency, high transfer speeds, all within a developer-friendly environment. CloudFront offers the most advanced security capabilities, including field level encryption and HTTPS support, seamlessly integrated with AWS Shield, AWS Web Application Firewall and Route 53 to protect against multiple types of attacks including network and application layer DDoS attacks.</p><p>These services co-reside at edge networking locations — globally scaled and connected via the AWS network backbone — providing a more secure, performant, and available experience for your users. CloudFront works seamlessly with any AWS origin, such as Amazon S3, Amazon EC2, Elastic Load Balancing, or with any custom HTTP origin. You can customize your content delivery through CloudFront using the secure and programmable edge computing feature AWS Lambda@Edge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*kBPsyrVJzenPcnJYMf9-DQ.png" /></figure><p><strong>This activity guide covered steps to:</strong></p><p>1. Create S3 Bucket and Host a static website</p><p>2. Create CloudFront Distribution</p><p>3. Test CloudFront Distribution</p><p><strong>CREATE S3 BUCKET &amp; UPLOAD STATIC WEBSITE FILES</strong></p><p>In this section we are going to create an S3 bucket, upload the static website file in that Bucket</p><ol><li>Login to you AWS console, search for S3 and click on it.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*bFFbKaLb-JT2cn8JfYWg5A.png" /></figure><p>2. Here on the S3 dashboard, click on Create Bucket.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*xZzRxNe9SYVvbKMlRjWaAA.png" /></figure><p>3. Here under Create bucket</p><p>Bucket Name → Enter your Bucket name</p><p>AWS Region → select any of your AWS region</p><p>Object Ownership : ACLs enabled</p><p>Clear the check box for Block all public access.</p><p>Check box for I acknowledge that</p><p>Note: Your bucket name must be unique all over the globe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*si5HF6P2TadnvxWS-4hf2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*WG3GbG1iiYJ_yVY0eJf3zg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Qfnimd15hZ9c7Pu_zmuMxQ.png" /></figure><p>4. Now scroll down and click on <strong>Create bucket</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*R2G0yrrIzK5Xb5F4nyoKog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*RbUq-LdZP3hoWEZtI7QD3g.png" /></figure><p>5. Here you shall see that your bucket is successfully created. Click on the bucket you created</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CjmGT58ZyWbIYQn8qF5owA.png" /></figure><p>At this step we have successfully created an Amazon S3 Bucket</p><p>6. Here inside the Bucket, Now Click <strong>upload</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*7XnNiwCV5cN5mR1CN8sSjg.png" /></figure><p>7. You can <strong>Drag and Drop the files</strong> into the Bucket or <strong>Click on Add Folder.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*adCGQ06uRO6u799YDM3hng.png" /></figure><p>8. After selecting the file click on <strong>upload.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*OBLCq_4w95ASrlanenZ-0g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*BxbWf1E6QgNnx0DCIoiUUQ.png" /></figure><p>9. Here you shall see that your file is successfully uploaded, <strong>click on close.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*I76yPkp1A5XVt_ZO_SgCxg.png" /></figure><p>At this step we have successfully uploaded the website file inside the bucket.</p><p>10. Here selects your file, choose Action and click on Make Public</p><p>Note: To access the file publicly, we have to make it Public</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*0iiULfhmiYxDT1mvxH2FMQ.png" /></figure><p>11. Click on <strong>Make Public</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*xBdKlXKTAtRv7ybwgbfcPw.png" /></figure><p>12. Here you shall see that our folder is successfully public, <strong>Click on Close</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*XffD6sS3zrOFiWfbkcqz3w.png" /></figure><p>At this step we have successfully make our both files public</p><p>Note: Make sure you make each file public before going to next step</p><p><strong>ENABLE STATIC WEBSITE HOSTING &amp; ANALYZE IT’S NETWORK LATENCY</strong></p><p>In this section we are going to enable the static website hosting and analyze its network latency of accessing the website.</p><ol><li>Under Bucket click on <strong>Properties</strong> and scroll down, here you see under the <strong>Static Website Hosting</strong> option is disabled, Click on <strong>Edit</strong> to enable it</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*neA64RE4llQOABMzV2CU7w.png" /></figure><p>2. Now under <strong>Static Website Hosting</strong> update these and click on Save changes</p><p>1. Static website hosting → Enable</p><p>2. Hosting type → Host a static website</p><p>3. Index document → Index.html</p><p>Note: In S3 bucket we have html file name with index.html, so We are specifying the default page with index.html name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*c4HhhbqoEnqWs6Zp6HWZOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Q_G9ZPLEYuKLKt7aokdHrA.png" /></figure><p>3. Here you shall see a successful message is prompted on your screen. The Static website hosting is enabled now and we have a <strong>Bucket website endpoint</strong>. Copy the URL and open a new tab/window.</p><p>Note: Remember this URL, we are going to use it in our CloudFront distribution Configuration in further steps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*iwrJ4MIOvPnUrAdeclvnzw.png" /></figure><p>4. Paste the <strong>URL</strong> here in new tab/Window and press enter</p><p>Here you shall see that our html page is accessible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Ui51gWNotTo4PilxQppQYw.png" /></figure><p>5. Now analyze the Network latency of accessing this object. Press <strong>Ctrl+Shift+I</strong> to open the inspection tab → select <strong>Network</strong> → Under Time you can see your latency of your page</p><p>Note: If you are not able to see the time, please refresh your page continuously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Sryfv_tQyCAcyAf5aIpV3w.png" /></figure><p>At this step we have successfully enabled the static website hosting and accessed the website with bucket website endpoint and analyze its Network latency.</p><p><strong>CREATE CLOUDFRONT DISTRIBUTION</strong></p><p>Amazon CloudFront is a content delivery network (CDN) offered by Amazon Web Services (AWS) that enables businesses and developers to distribute content globally with low latency and high data transfer speeds. Creating a CloudFront distribution is an important step in using CloudFront to distribute your content.</p><p>In this section we are going to create an CloudFront distribution. Which we are going to test in further steps.</p><ol><li>Search for <strong>CloudFront</strong> and Click on it</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*OguYqtK0dk2MhBKHFsE66g.png" /></figure><p>2. Now Click on <strong>Create Distribution</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*WuAXGGz2luPWoly3x4znlQ.png" /></figure><p>3. Here under Origin Domain Name paste the bucket website endpoint which we have copied at <strong>Section 5 step 3</strong></p><p>Note: At this step only configure your Origin Domain Name, other configuration is set to be default</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Ojd51UCR5TltEZfsIqgevA.png" /></figure><p>4. Under WAF, select the Do not enable security protections tab and scroll down and click on Create Distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*EJQapYDflNOQ51PyrEnVuQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*at8nvZSocTrKu36S3zyrDQ.png" /></figure><p>5. Here you shall see that your Distribution is successfully created</p><p>Note: It will take 5–10 min to change it status from in progress to Deployed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*FVLgIrOlaQxlwyuYAJJZXA.png" /></figure><p>At this step we have successfully created CloudFront Distribution.</p><p><strong>TEST YOUR DISTRIBUTION</strong></p><p>In this section we are going to test the CloudFront Distribution that we created and analyze the Network latency of accessing the website.</p><ol><li>Click on the ID to open the CloudFront Distribution</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*FVLgIrOlaQxlwyuYAJJZXA.png" /></figure><p>2. Here under Origin and Origin groups, select the link and press right click to copy or press Ctrl+C.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*JUFoN5QVP40bKsIw3UL_GA.png" /></figure><p>3. Now paste the link in new tab or in new window and press Enter</p><p>Here you shall see your web page is accessible by hitting your Origin Domain name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Do8ToqrInzuKuOLzv-Oklg.png" /></figure><p>5. Now analyze the network latency of accessing this object. Press <strong>Ctrl+Shift+I</strong> to open the inspection tab → select <strong>Network</strong> → Under Time you can see your latency of your page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*guAeVtS2t3PyWInxqx0uyQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adb62f47eb08" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VISUALIZE WEB TRAFFIC USING KINESIS DATA STREAMS]]></title>
            <link>https://medium.com/@jkenny1930/visualize-web-traffic-using-kinesis-data-streams-247c4ad6f212?source=rss-e0d222971d67------2</link>
            <guid isPermaLink="false">https://medium.com/p/247c4ad6f212</guid>
            <dc:creator><![CDATA[Kehinde Oniyide]]></dc:creator>
            <pubDate>Thu, 31 Aug 2023 17:56:10 GMT</pubDate>
            <atom:updated>2023-08-31T17:56:10.911Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>INTRODUCTION</strong></p><p>Amazon Kinesis Data Streams is a massively scalable, highly durable data ingestion and processing service optimized for streaming data. You can configure hundreds of thousands of data producers to continuously put data into a Kinesis data stream. Data will be available within milliseconds to your Amazon Kinesis applications, and those applications will receive data records in the order they were generated.</p><p>AWS CloudFormation gives you an easy way to model a collection of related AWS and thirdparty resources, provision them quickly and consistently, and manage them throughout their lifecycles, by treating infrastructure as code. A CloudFormation template describes your desired resources and their dependencies so you can launch and configure them together as a stack. You can use a template to create, update, and delete an entire stack as a single unit, as often as you need to, instead of managing resources individually. You can manage and provision stacks across multiple AWS accounts and AWS Regions.</p><p><strong>This activity guide cover steps for:</strong></p><p>1. Deploy an Amazon Kinesis Data Visualization Sample Application Using CloudFormation</p><p>2. Visualize the Data Streams Generated Through EC2 Instance</p><p>3. Monitor the Data Generated Via AWS Kinesis Dashboard</p><p><strong>DEPLOY AN AMAZON KINESIS DATA VISUALIZATION SAMPLE APPLICATION USING CLOUDFORMATION STACK</strong></p><p>In this section, we shall deploy a Kinesis Data Visualization Sample Application on top of EC2 instance using a CloudFormation Template. We will deploy the stack from an Amazon S3 URL which is consisting of our CloudFormation stack. We shall see the entire architecture of the CloudFormation stack which will spin up different resources in the backend using CloudFormation Designer. Also, we shall check the estimated cost for the resources which will incur us if they are kept up and running for month using the simple monthly calculator, so let’s get started.</p><ol><li>Open your <strong>Console</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ptvTNf58dHWsNKdQbdjd-g.png" /></figure><p>2. Search for <strong>CloudFormation</strong> and open it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sRDdKVhbE4GIXx56wPz0gA.png" /></figure><p>3. Click on Create a stack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*8TSOtSnYJSlzqyW83wjdJQ.png" /></figure><p>4. Under Create stack, select the following</p><p>• Under Prepare template select <strong>Template is ready</strong></p><p>• Under Specify template, choose <strong>Amazon S3 URL</strong> as source template</p><ul><li>Copy the following URL of an S3 bucket with kinesis-app template and paste</li></ul><p><a href="https://s3.amazonaws.com/kinesis-demo-bucket/amazon-kinesis-data-visualization-sample/kinesis-data-vis-sample-app.template">https://s3.amazonaws.com/kinesis-demo-bucket/amazon-kinesis-data-visualization-sample/kinesis-data-vis-sample-app.template</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*QYefpV31uIUubGg8oW7QtQ.png" /></figure><p>5. Now we shall see what exactly is there in our S3 URL template, for that right click on <strong>View in Designer</strong> and open in new tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Z8X6lLp3q_IuVbgE38qkDQ.png" /></figure><p><strong>Note:</strong> Make sure you open the View in Designer in a new tab as fail to do so would make us to perform all the steps from first again.</p><p>6. Now you shall be redirected to a new tab here you shall see the CloudFormation Template, how the json document will spun up services and how they interact with each other</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*V8-8HDgmP0_GVYhP89qI8w.png" /></figure><p>7. This is how the entire stack looks like when created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*jl40qeZi0uiklo7RYNUzTQ.png" /></figure><p>8. Back to previous tab and click on <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Z8X6lLp3q_IuVbgE38qkDQ.png" /></figure><p>9. Specify the details for your stack, as shown below:</p><p>● Write a name for the stack here we have given <strong>Kinesis-Data-Stream</strong></p><p>● Choose your instance type as <strong>t2.micro</strong></p><p>● Click on <strong>Next</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Uq9KfeQfDZzP_vSttry5mg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*6odJ77s7VeENlPgGaNuspQ.png" /></figure><p>11.Once you click on Next, you shall see Review Kinesis-Data-Stream options. Here, review the configuration, scroll down to bottom <strong>tick</strong> the I acknowledge checkmark and click on Submit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*nrHSfjnm9KVRJPN-gyp9-Q.png" /></figure><p>12.Now wait for 10–15 minutes until the stack spin up the resources in the backend till that it shows create in progress. After 10–15 minutes click on refresh and you shall see our stack creation is complete.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ui5dIcRsDpQokfx91bodkA.png" /></figure><p><strong>7 VISUALIZE THE DATA STREAMS GENERATED THROUGH EC2 INSTANCE</strong></p><p><strong>Note:</strong> The sample application has a stream writer that randomly generates records and sends them to a Kinesis data stream, a data consumer that counts the number of HTTPS requests to a resource, and a web application that displays the outputs of the stream processing data as a continuously updated graph. In this section, we shall see the graph visualization of the Data streams generated by the sample application deployed on EC2 Instance.</p><ol><li>Under Services search for <strong>EC2</strong> and open in new tab.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*h9TCwDXqyW5teGXvaxrEQQ.png" /></figure><p>2. Here click on <strong>Instances (running).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CeBq45e_5UB9MvzTmqL5fw.png" /></figure><p>3. Here you shall see a newly launched instance <strong>Up and Running</strong>, select the instance and copy the <strong>Public IPv4 address</strong> of that instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*THoXQXrIg8ZD3DmKFZKASQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*OfwMNRLtZhEKgkkwCCIlcQ.png" /></figure><p><strong>Note:</strong> In further steps, you shall see the meaningful data to show up in the data analysis graph. The real-time data analysis graph appears on a separate page, titled Kinesis Data Streams Data Visualization Sample. It displays the number of requests sent by the referring URL over a 10 second span, and the chart is updated every 1 second. The span of the graph is the last 2 minutes.</p><p>4. Now try to hit the Public IPv4 address on the browser in a new tab and you shall see the live data visualization graph of requests sent from referrers like amazon, google, bing and many more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*GRB5GWYnEddPPDO5lz4rng.png" /></figure><p><strong>8 MONITOR THE DATA GENERATED VIA AWS KINESIS DASHBOARD</strong></p><p><strong>Note:</strong> In this section, we shall see how the data generated in the Kinesis Streams under the monitoring section on the Kinesis Dashboard.</p><ol><li>Under <strong>Services</strong>, search for <strong>Kinesis</strong> and open in new tab</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*dUgMFYUwvL3AD_KlXSn0qQ.png" /></figure><p>2. On the Kinesis Dashboard, under Data Streams you shall see total data streams that should be 1 as you shall be creating this for first time and click on the number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*JhdocHs9y4oTUEzhScEoAg.png" /></figure><p>3. Now click on the <strong>Data stream name</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*wmikIsbDRcLJVscdakF3cA.png" /></figure><p>4. Here, click on <strong>Monitoring</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Slr-ke8-75o33BkqNPtgfg.png" /></figure><p>5. Under Monitoring you shall see the<strong> Stream metrics.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*snZz8EkPs_Zewh7vcta0cA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*sLb0azTDQRTGJrsxcbTiYQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=247c4ad6f212" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Configuring MySQL DB Instance via Relational Database Service (RDS)]]></title>
            <link>https://medium.com/@jkenny1930/configuring-mysql-db-instance-via-relational-database-service-rds-5c46f96ba4a?source=rss-e0d222971d67------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c46f96ba4a</guid>
            <dc:creator><![CDATA[Kehinde Oniyide]]></dc:creator>
            <pubDate>Sun, 20 Aug 2023 18:39:30 GMT</pubDate>
            <atom:updated>2023-08-20T18:39:30.767Z</atom:updated>
            <content:encoded><![CDATA[<p>Amazon Relational Database Service (Amazon RDS) makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups. It frees you to focus on your applications so you can give them the fast performance, high availability, security and compatibility they need. Amazon RDS is available on several database instance types — optimized for memory, performance or I/O — and provides you with six familiar database engines to choose from, including Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle Database, and SQL Server. You can use the AWS Database Migration Service to easily migrate or replicate your existing databases to Amazon RD.</p><p><strong>Activity guide steps:</strong></p><p>1. Download and Install MySQL Workbench.</p><p>2. Configuring a MySQL DB Instance via Relational Database Service (RDS)</p><p>3. Connecting to the database via MySQL Workbench and run some MySQL Queries</p><p><strong>CONFIGURATION OF AWS RDS INSTANCE:</strong></p><p>1. Go to the <strong><em>AWS console</em></strong> and select <strong><em>AWS services</em></strong>. In the search tab, search for <strong><em>RDS.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*KiWVbBdQMzklFqctW-XHVg.png" /></figure><p>2. From the right pane, go to <strong>Databases </strong>and click on <strong>Create Database.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*kPDU_plAzHo4j-vMy8HeXA.png" /></figure><p>3. To create MySQL DB, set the following configurations:</p><p>• <strong><em>Choose a database creation method:</em></strong> Standard Create</p><p>• <strong><em>Engine Type:</em></strong> MySQL</p><p>• <strong><em>Edition: </em></strong>MySQL Community</p><ul><li><strong><em>Version:</em></strong> Select the latest — MySQL 8.0.33</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*OrRWDAXO_NDmdWIV6zPmCw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*xp2sw5CP-CYN95IT34PaxA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*S0azKe8gtR7JynwdzgE77Q.png" /></figure><p><strong>4. Templates</strong>: Free Tier</p><p>Specify DB Details by providing DB Instance identifier, username and password for your DB Instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*4wUcP6qAkuGFReXtwkzvpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*AkbDOdsIBdeEOBB2sR7W0A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*5Gi-a1fWxcpb8iDKx6V71Q.png" /></figure><p>5. Under <strong><em>Connectivity</em></strong>, select the default VPC.</p><p>a. <strong><em>Subnet Group:</em></strong> default</p><p>b. <strong><em>Public accessibility:</em></strong> Yes</p><p>c. <strong><em>VPC security group</em></strong>: Create new</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*LStfe53g2wt0jRPL-OkA-w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*jhqJ_GpJkDfO242LlJMJgw.png" /></figure><p>6. Expand the <strong>Additional Connectivity configuration</strong>. After expanding the settings, add the following:</p><p>a<strong><em>. Database Port: </em></strong>3306 (Default for MySQL)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n-fZdtIVl6opX9ZW1G3ufg.png" /></figure><p>Expand the <strong><em>Additional configuration</em></strong>, and add any <strong><em>Initial database name</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lNuBPCt0BU9NJsj3JyGvUw.png" /></figure><p>7. Finally scroll down to the bottom and click on <strong><em>Create Database</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*XMWXPlObj9GSZZiNb6KNPg.png" /></figure><p>8. Now select the <strong><em>data base</em></strong> and Click on the <strong><em>security group</em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*SGpcmR4bWL0s_i4usVv8Dw.png" /></figure><p>9. Configure the security group by clicking on <strong><em>Edit inbound rules</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*vOLnfia1tfoOuXdUxN3nCA.png" /></figure><p>10. Now click <strong><em>on Add rule</em></strong> and select <strong>MYSQL/Aurora</strong>, source <strong>— Anywhere IPv4</strong> and click on <strong>Save Rules.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*r_Ya7gFvvHX_mwrzHY0NhA.png" /></figure><p><strong>CONFIGURING MYSQL WORKBENCH</strong></p><p><strong>5.1 Downloading MySQL Workbench on Window EC2</strong></p><ol><li>Go to the Download MySQL Workbench page to download and install MySQL Workbench.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*sAv9tdM8swDAOKGl4hUGtg.png" /></figure><p>2. You will be asked to login, signup or just begin the download. Click on <strong><em>No thanks, just start my download.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*IojRXS7zE_rXt1r0WtbcWg.png" /></figure><p><strong>5.2 Installing MySQL Workbench</strong></p><p>1. Now that the prerequisites are complete, again run the installer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*gfM1weNqVEd9r1_IJTg1EA.png" /></figure><p>2. Keep default and click on next</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*bCmqzTgHlNkfmyOBFqCr8Q.png" /></figure><p>3. Keep default and click on next</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*B38g43ep3_tASfqP4X74qw.png" /></figure><p>4. Click on Install</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*_JUCf7cAy3viF_3gFXvPBA.png" /></figure><p>5. Now the installation is complete, and Workbench will launch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*_n18aX_MVC9GUI8pcLWxTQ.png" /></figure><p>6. Now the workbench has been launched successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*_r_VLx5-g7c-8AKSHQbVUQ.png" /></figure><p>6. CONNECTING TO MYSQL DATABASE FROM WORKBENCH</p><p>1. Open the MySQL workbench and click on Database</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*JYelmIM8YCbZuM1Osw3jug.png" /></figure><p>2. Click on Connect to Database</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*5RxBZGuLFiIFhyM0a3qi2A.png" /></figure><p>3. Enter the below given details:</p><p>i<strong>.Hostname:</strong> Enter the Endpoint URL from the RDS Instance in Amazon RDS Console</p><p>ii.<strong>Port:</strong> The default port is 3306</p><p>iii.<strong>Username:</strong> Type in the username you created for the RDS database. In this guide, it is “admin”.</p><p>iv.<strong>Password:</strong> Click Store in Vault and enter the password that you used when creating the RDS database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*PKOQ0eSsa3_Zs5AG8VjQyQ.png" /></figure><p>Now you are connected to the Database. You can create tables, insert data and run queries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*UvhlvYlos2qe03IiQB0-aA.png" /></figure><p>7. Run the command to show the databases.</p><p><strong><em>show databases;</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*BR3WYj4uzNtgrT8g0XtXFw.png" /></figure><p>8. Run the below command to use a database</p><p><strong><em>use database_name;</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*E0bTiHdlvYCjxt7WgSyPvw.png" /></figure><p>9. Run the below command to create a table named sample with 4 columns (ID,FirstName, LastName and Contact) to the table.</p><p><strong><em>CREATE TABLE &lt;table_name&gt; (</em></strong></p><p><strong><em>ID int,</em></strong></p><p><strong><em>FirstName varchar(255),</em></strong></p><p><strong><em>LastName varchar(255),</em></strong></p><p><strong><em>Contact varchar(255)</em></strong></p><p><strong><em>);</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*o4rJ8pVfIzxKLNY8BlUJSA.png" /></figure><p>10. You can use the below command</p><p><strong><em>show tables;</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*PHHGtfiQKRbN9fmhkAWSQA.png" /></figure><p>11. The below command selects the table named sample.</p><p><strong><em>SELECT*FROM &lt;table_name&gt;;</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*YmXKNQ9LfUj60_8WzcwsuA.png" /></figure><p>12. To insert the data in the table use command</p><p><strong><em>INSERT INTO Sample (ID, FirstName, LastName, Contact) values (1, ‘K21’,’Academy’, 1234)</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*jHFgQ50zDb8OF40nNLgNFA.png" /></figure><p>Again, Run the command to see the entry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*OaQuDuRpTKur_PgTqeZTSw.png" /></figure><p>13. To delete a table, use the command:</p><p><strong><em>DROP TABLES &lt;table_name&gt;;</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*BJsj9ahm6rOYyQGWcPayaw.png" /></figure><p>14. Confirm the delete by running</p><p><strong><em>SHOW Tables;</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*YOoWTkZxtbnqcXd65xTN2A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c46f96ba4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Host Website on Windows EC2 Instance Using IIS]]></title>
            <link>https://medium.com/@jkenny1930/host-website-on-windows-ec2-instance-using-iis-56231b6dbdcf?source=rss-e0d222971d67------2</link>
            <guid isPermaLink="false">https://medium.com/p/56231b6dbdcf</guid>
            <dc:creator><![CDATA[Kehinde Oniyide]]></dc:creator>
            <pubDate>Wed, 09 Aug 2023 20:32:38 GMT</pubDate>
            <atom:updated>2023-08-09T20:32:38.564Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*WQZdeK25NcohbwmL_4QZiQ.png" /></figure><p><strong>INTRODUCTION</strong></p><p>Amazon EC2 is a web service that provides secure, resizable compute capacity in the cloud. It is designed to make web-scale computing easier for developers.</p><p>The simple web interface of Amazon EC2 allows you to obtain and configure capacity with minimal friction. It provides you with complete control of your computing resources and lets you run on Amazon’s proven computing environment. Amazon EC2 reduces the time required to obtain and boot new server instances (called Amazon EC2 instances) to minutes, allowing you to quickly scale capacity, both up and down, as your computing requirements change.</p><h4><strong>This activity guide cover steps for:</strong></h4><p>1. Create Windows EC2 Instance</p><p>2. Connect to Windows EC2 Instance</p><p>3. Install Web Server (IIS) in Windows EC2 Instance</p><p>4. Access Webpage through Server Manager</p><p>5. Delete Resources</p><h4><strong>EC2 Windows Server:</strong></h4><p>Amazon EC2 with Windows Server works similarly to Amazon EC2 with any different operating system. Amazon EC2 on Windows Server integrates seamlessly with existing Amazon EC2 services such as Amazon Elastic Block Store (EBS), Amazon CloudWatch, Elastic Load Balancing, and Elastic IPs. In all Regions, Windows instances are accessible in several Availability Zones.</p><h4><strong>What is Internet Information Services (IIS):</strong></h4><p>Microsoft’s Internet Information Services (IIS) is a versatile, general-purpose internet server that operates on Windows PCs and serves requested HTML pages or files. IIS web servers receive requests from distant client PCs and respond appropriately. This fundamental capability enables web servers to exchange and distribute information over LANs such as corporate intranets and WANs such as the Internet.</p><h4><strong>How to use Internet Information Services (IIS):</strong></h4><p>IIS communicates via a number of standard languages and protocols. Text, buttons, picture placements, direct interactions/behaviors, and hyperlinks are all created with HTML. Hypertext Transfer (HTTP) is the core communication mechanism that web servers and users use Protocol to exchange information. HTTPS, or HTTP over Secure Sockets Layer (SSL), encrypts communication via Transport Layer Security (TLS) or SSL for increased data security.</p><ol><li><strong>CREATE A WINDOWS EC2 INSTANCE</strong></li></ol><p>An EC2 Instance is a virtual server in Amazon’s Elastic Compute Cloud (EC2) for running applications on the Amazon Web Services infrastructure. Amazon provides a variety of types of instances with different configurations of CPU, memory, storage, and networking resources to suit user needs. Each type is also available in two different sizes to address workload requirements.</p><h4><strong>1.1 Launch a Windows Instance</strong></h4><ol><li>Log in to your <strong>AWS Management Console</strong>.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CCMiyJH2K_hkbd8b6ZfGoQ.png" /></figure><p><strong>2. Search for EC2 in the search box and click on it to open it.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*jV2iU5OKrK008LnNMYkJIQ.png" /></figure><p>3. Once you are at the EC2 Dashboard, click on <strong>Launch</strong> to launch an instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*jbemav-Bxml7YczP3tmgVQ.png" /></figure><p>4. In the Name and Tags step you can add tags to an instance, here tags help you to enable categorize AWS resources in different ways, for example, by owner, environment, or purpose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*-NaYj2pMcWBtOkALxi_wgA.png" /></figure><p>5. In Select Windows under QuickStart and Select Microsoft Windows Server 2022 Base AMI. You can also select other AMI as per your need but here we are launching a Windows Server, so we have to select the Windows Server 2022 Base AMI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*QDxhZJffAfK7OGWHsvixEQ.png" /></figure><p>6. Select the t2.micro instance type, if you want you may select another instance type but they are chargeable so we choose the t2.micro instance type which is eligible for the free tier and limited resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*VNYteCDsBdaeUlXAZXZB7A.png" /></figure><p>7. Select an existing key pair or create a new one, we will Create a new one, enter the name of the Key-pair as Windows-Key and Create the Key Pair.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Mf9sB9J9u_jKtUx1FZ9PBA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*cPRKd61DjBxvp9byNFqHgw.png" /></figure><p>8. Since it is a Windows Instance, we will require <strong>RDP</strong> on port <strong>3389</strong> which is selected by default. Also, for accessing the web page we will add <strong>HTTP</strong> rule by clicking on <strong>Add Rule</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*cCu_KuEjnyMY02QsoE5yHA.png" /></figure><p>9. Now keep everything as it is and click on <strong>Launch Instance</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*cCu_KuEjnyMY02QsoE5yHA.png" /></figure><p>10. Now click on <strong>View all Instances</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9vAIhb2otv_JvKS4mVVyfg.png" /></figure><p>11. Refresh and you shall see your instance is Up and Running, and the Status check has changed to <strong>2/2 checks</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*pNk42QBjbBeaklpel10MNw.png" /></figure><h4><strong>1.2 Connect to the Windows Instance</strong></h4><p><strong>Note:</strong> In this section we will be providing detailed steps for connecting to our Windows Instance using Remote Desktop Connection.</p><ol><li>Select the <strong>Windows Instance</strong> we just created and click on <strong>Connect</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*WgfojRLkDmYNoUEWvH10ow.png" /></figure><p>2. Here we have to select the <strong>RDP (Remote desktop protocol)</strong> Client and then Download the RDP File and save it somewhere safe then, and we need a password to access the RDP file, so click on <strong>Get Password.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*AtUDNgj7DSYi40RpZSfHmw.png" /></figure><p>3. Once you click on the <strong>Get Password</strong>, click on <strong>Upload private key file</strong> and select the <strong>key pair</strong> we just created at the time of instance launching.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*9ndceAlaMESvzx-9y1WpPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*WvayZZloe_WakRM1x8OzVg.png" /></figure><p>4. Click on <strong>Decrypt Password</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*EsGccEud3GF49nSUiYaOQg.png" /></figure><p>5. After this you will get the <strong>decrypted password</strong> for the instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*rWEws4r0VUQ-WcdZa1SbVQ.png" /></figure><p><strong>Note:</strong> Make a note of this Username and Password as we will be using this password for connecting to the Windows Instance.</p><p>6. To connect to the instance again, search for <strong>RDP </strong>in the Start menu and open it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*o_JeKYbclqGB-sY1GAYmtQ.png" /></figure><p>7. Now copy the <strong>Public IP</strong> of the Windows Instance and paste it and click on <strong>Connect</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*NUchekX882rCkz-C81lFhw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*_UmUcWt3yWnNGgf2Izcj8g.png" /></figure><p>8. Now enter the <strong>Username (Administrator by default)</strong> and the <strong>Password</strong> that you had <strong>decrypted</strong> earlier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*FbtDHPkMORO1iRvMtoASIQ.png" /></figure><p>9. Click on <strong>Yes.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*1ZHn9WS19UieUWpP4gxDpw.png" /></figure><p>10. You will be logged in to the <strong>Windows Instance.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*3Y7jgRF7dB6pj-AtELo-Sw.png" /></figure><p>Thus, we have successfully logged in to the Windows Instance</p><p><strong>2. INSTALL WEB SERVER (IIS) ON WINDOWS EC2 INSTANCE</strong></p><p>Internet Information Services (IIS, formerly Internet Information Server) is an extensible web server software created by Microsoft for use with the Windows NT family. IIS is used to host ASP.NET web applications and static websites. It can also be used as an FTP server, host WCF services, and be extended to host web applications built on other platforms such as PHP. There are built-in authentication options such as Basic, ASP.NET, and Windows auth.</p><p><strong>1. Once logged in to the Windows Instance, click on Start button and then click on Server Manager.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*K4W0eUN8_Mm88qBL389u8w.png" /></figure><p>2. Click on <strong>Add roles and features</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*L-iGxie2zTAePrtU2qIXLw.png" /></figure><p>3. Click on <strong>Next.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*3_C03Ho8bJhqd_ZgeW8RwA.png" /></figure><p>4. Click on <strong>Role based or feature based Installation</strong> and then click on <strong>Next</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*fhxZAPRxe3OsRjx98uE83g.png" /></figure><p>5. Keep everything <strong>default</strong> and click on <strong>Next</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*VNDto8eM_a7y5l1arFwsVw.png" /></figure><p>6. Scroll down a bit and click on <strong>Web Server (IIS)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*0bE-GXyubJBSlPGehHPtlA.png" /></figure><p>7. As you click on <strong>Web Server (IIS)</strong>, a small dialog box will open. Click on <strong>Add Features</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*PlddndwnwIIzwXjIbwzRgQ.png" /></figure><p>8. Now click on <strong>Next </strong>again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*0bE-GXyubJBSlPGehHPtlA.png" /></figure><p>9. Now keep clicking on <strong>Next</strong> till you reach <strong>Install dialog box.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*pBC9-CNq5y6bhYY-Cqg-0A.png" /></figure><p>10. The installation will start as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*tQRccEQOc7LgNmAj4qmBCQ.png" /></figure><p><strong>Note</strong>: The feature installation will take some time (approx. 5 minutes) to complete. Please be patient</p><p>11. The installation is <strong>complete </strong>now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Qj3dO5LbWCUWPH05XV4f4A.png" /></figure><p>Thus we have successfully installed IIS on our Windows Instance.</p><h4>3. ACCESS WEB PAGE THROUGH SERVER MANAGER</h4><p>In this section we will be providing detailed steps as to how you can access the web page after you have installed IIS on your Windows virtual machine.</p><ol><li>Navigate to the local disk of your Windows Virtual machine. You will see a folder by the name inetpub created in your local disk. Double click to open it.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*4Zb9IleVgsDku5SrbOmvjA.png" /></figure><p>2. Once you have opened it, now double click on <strong>wwwroot</strong> folder to open it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CNDxUbs_qvWw1I5MuIhpHQ.png" /></figure><p>3. You will find an <strong>HTML</strong> document inside by the name <strong>iisstart</strong>. This will be the home page of your <strong>web server</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*kBy3NtIURw9tBBuLNk9xJw.png" /></figure><p>4. Right click on this file and open with Notepad. It contains a HTML code as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*zvSt9c53og-j5STxmURF7g.png" /></figure><p>4. Now to make our web page look a bit attractive. We will edit this HTML code by erasing everything in it and write our own HTML code and Save it.</p><p><strong>Note</strong>: If you don’t want to edit the existing HTML code and want to keep it as it is you can skip this step and follow the next step</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*_Wzoh3QbAUK9yylGcWCueg.png" /></figure><p><strong>Note:</strong> Don’t forget to save it by clicking on File at the top left corner and then click on Save. If you don’t save the changes will not appear on the web page</p><p>6. Switch to the <strong>EC2 console</strong>, select the <strong>Windows Instance</strong> and copy its <strong>Public IP</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*NUchekX882rCkz-C81lFhw.png" /></figure><p>7. Now try hitting this <strong>Public IP</strong> of the <strong>Windows Instance</strong> in your <strong>Browser.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*UNS_jDKfRwhXjqJkJ1JzjQ.png" /></figure><p>3.0 <strong>DELETE RSOURCES</strong> In this section, we will delete all the resources that we used in the lab as keeping them running will charge us. So, all the resources must be deleted once you do not require them in order to be in free tier limit.</p><h4><strong>3.1 Stop the Windows Instance Note:</strong></h4><p>This section will cover steps to terminate the windows instance</p><p>Go to your Instance and select the Windows Instance. Click on Instance State and click on terminate Instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*aB6gZk3oI5zts7p0_Z3aHg.png" /></figure><p>2. Click on <strong>Terminate</strong> to terminate the <strong>Instance</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*LRCxHsgkFf7pKha69hCUkw.png" /></figure><p>3. The Instance will be deleted</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56231b6dbdcf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy Docker Containers On Amazon ECS]]></title>
            <link>https://medium.com/@jkenny1930/deploy-docker-containers-on-amazon-ecs-4b3c8d35d228?source=rss-e0d222971d67------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b3c8d35d228</guid>
            <dc:creator><![CDATA[Kehinde Oniyide]]></dc:creator>
            <pubDate>Mon, 31 Jul 2023 10:42:32 GMT</pubDate>
            <atom:updated>2023-07-31T10:42:32.876Z</atom:updated>
            <content:encoded><![CDATA[<p>Amazon Elastic Container Service (Amazon ECS) is the AWS service you use to run Docker applications on a scalable cluster. In this how-to guide, you will learn how to run a Docker-enabled sample application on an Amazon ECS cluster behind a load balancer.</p><p>Amazon ECS makes it easy to deploy, manage, and scale Docker containers running applications, services, and batch processes.</p><p>Amazon ECS places containers across your cluster based on your resource needs and is integrated with familiar features like Elastic Load Balancing, EC2 security groups, EBS Volumes and IAM Roles.</p><p><strong>Run containers at scale:</strong></p><p>Amazon ECS makes it easy to use containers as a foundational building block for your applications by eliminating the need for you to install, operate, and scale your own cluster management infrastructure.</p><p><strong>Flexible container placement:</strong></p><p>Amazon ECS lets you schedule long-running applications, services, and batch processes. Amazon ECS maintains application availability and allows you to scale your containers up or down to meet your application’s capacity requirements</p><p><strong>Integrated and extensible:</strong></p><p>Amazon ECS is integrated with familiar features like Elastic Load Balancing, EBS volumes, VPC, and IAM. Simple APIs let you integrate and use your own schedulers or connect Amazon ECS into your existing software delivery process.</p><p><strong>Step 1: Set up your first run with Amazon ECS</strong></p><p>The Amazon ECS first-run wizard will guide you through creating a cluster and launching a sample web application. In this step, you will enter the Amazon ECS console and launch the wizard.</p><p>a. To launch the Amazon ECS first-run wizard, choose the Get started button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*yy1Uk1j1brw2ktgs768-0Q.png" /></figure><h3>Step 2: Create container and task definition</h3><p>A task definition is like a blueprint for your application. In this step, you will specify a task definition so Amazon ECS knows which Docker image to use for containers, how many containers to use in the task, and the resource allocation for each container.</p><p>a. In the Container definition field, select Nginx.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*MM9xVkBtYUqqQFI9iY2UuQ.png" /></figure><p>b. The task definition comes preloaded with default configuration values.</p><p>Review the default values and choose Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*g2CRoCNRlm8swblZuIaLOw.png" /></figure><p><strong>Step 3: Define your service</strong></p><p>Now that you have created a task definition, you will configure the Amazon ECS service. A service launches and maintains copies of the task definition in your cluster. For example, by running an application as a service, Amazon ECS will auto-recover any stopped tasks and maintain the number of copies you specify.</p><p>a. Service options come preloaded with default configuration values.</p><p>· Service name: The Nginx<em>-service</em> is a web-based application. It is meant to run indefinitely; because it is running as a service, it will restart if the task becomes unhealthy or unexpectedly stops.</p><p>· Number of desired tasks: Leave the default value of 1. This will create one copy of your task.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*8o1FKJpXnBICJEBDTRhySQ.png" /></figure><p>b. Load balancing: You have the option to use a load balancer with your service. Amazon ECS can create an Elastic Load Balancing (ELB) load balancer to distribute the traffic across the container instances your task is launched on.</p><p>Select the Application Load Balancer option<em>.</em></p><p>The default values for Load balancer listener port and Load balancer listener protocol are set up for the sample application. For more information on load balancing configuration</p><p>Review your settings and choose Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*8o1FKJpXnBICJEBDTRhySQ.png" /></figure><h3>Step 4: Configure your cluster</h3><p>Your Amazon ECS tasks run on a cluster, which uses <a href="https://aws.amazon.com/fargate/">AWS Fargate</a> to provide the compute engine so that you do not need to manage servers. In this step, you will configure the cluster.</p><p>a. In the Cluster name field, enter <em>sample-cluster</em> and choose Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*lCXk7cexjEVxbhY3_-cSgA.png" /></figure><h3>Step 5: Launch and view your resources</h3><p>The previous steps, you configured your task definition (which is like an application blueprint), the Amazon ECS service (which launches and maintains copies of your task definitions), and your cluster.</p><p>In this step, you will review, launch, and view the resources you create.</p><p>a. You have a final chance to review your task definition, task configuration, and cluster configuration before launching. Choose Create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*jrCh0ON27UCmE_HC5i-Mxg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*A3Ghckw5Y3a1-aKcy32ynQ.png" /></figure><p>a. You are on a Launch Status page that shows the status of your launch and describes each step of the process. After the launch is complete, choose View service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*VV-Y2vlHGGTNV_P4Y1BNQA.png" /></figure><h3>Step 6: Open the sample application</h3><p>In this step, you will verify that the sample application is up and running by pointing your browser to the load balancer DNS name.</p><p>a. On the sample-app-service page, select the Details tab and select the entry under Target Group Name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*QGlbmUcDcxcmOsG2xJRFSA.png" /></figure><p>a. On the Target groups page, select the target group name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*hFxOq_8rVy5WC4VxnUpMeQ.png" /></figure><p>c. In the Details section, choose the Load balancer link</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*EU14j-tKcNMs180nKUJRsQ.png" /></figure><p>d. In the Description tab, select the two page icon next to the load balancer DNS to copy the DNS name to your clipboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Tgl74nfWg3p_Yp3ZXhIMEg.png" /></figure><p>e. Paste it into a new browser window, and press enter to view the Nginx application (in this case, a static webpage).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CyPP7N1gy3EiR4oqxDMAbw.png" /></figure><h3>Step 7: Clean up</h3><h3>Throughout this guide, you’ve launched three resources: an Amazon ECS cluster, AWS Fargate to run your container, and a load balancer. In this step, you will clean up all your resources to avoid unwanted charges.</h3><p>a. Navigate back to the Amazon ECS console page and select the cluster name (sample-cluster).</p><p>b. Choose Delete Cluster to delete the cluster.</p><p>c. Enter <em>delete me</em> in the dialog box and choose Delete.</p><p>d. You will now see the progress as all the resources created are deleted.</p><p>e. Once everything has been deleted, you will see the <em>Deleted cluster sample-cluster successfully </em>message in green. You have now completed this guide.</p><h3>Conclusion</h3><p>Congratulations! You have learned how to configure and deploy your Docker-enabled application to Amazon ECS, and how to delete resources that are no longer needed. Amazon ECS is a highly scalable, high performance container management service that supports Docker containers and allows you to easily run applications on a managed cluster of Amazon EC2 instances.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b3c8d35d228" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create ECR, Install Docker, Create Container Image, and Push Image To ECR]]></title>
            <link>https://medium.com/@jkenny1930/create-ecr-install-docker-create-container-image-and-push-image-to-ecr-be0b8bc5d17f?source=rss-e0d222971d67------2</link>
            <guid isPermaLink="false">https://medium.com/p/be0b8bc5d17f</guid>
            <dc:creator><![CDATA[Kehinde Oniyide]]></dc:creator>
            <pubDate>Wed, 26 Jul 2023 09:10:06 GMT</pubDate>
            <atom:updated>2023-07-26T09:10:06.887Z</atom:updated>
            <content:encoded><![CDATA[<p>Amazon Elastic Container Registry (ECR) is a fully managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images.</p><p>Amazon ECR is integrated with Amazon Elastic Container Service (ECS), simplifying your development to production workflow. Amazon ECR eliminates the need to operate your own container repositories or worry about scaling the underlying infrastructure.</p><p>Amazon ECR hosts your images in a highly available and scalable architecture, allowing you to reliably deploy containers for your applications. Integration with AWS Identity and Access Management (IAM) provides resource-level control of each repository.</p><p>With Amazon ECR, there are no upfront fees or commitments. You pay only for the amount of data you store in your repositories and data transferred to the Internet.</p><h4>GUIDE:</h4><ol><li>Create AWS Ubuntu Instance</li><li>Pushing Images to Amazon ECR</li></ol><p>a. Creating a Repository in ECR</p><p>b. Configure AWS credentials and Install Docker</p><p>c. Creating a Docker file and build Images from it d. Pushing images to Repository</p><p>3. Deleting/Cleanup</p><p>a. Terminating the Instance</p><p>b. Deleting the pushed image and Repository</p><h4>LAUNCH A UBUNTU INSTANCE USING EC2:</h4><p>Amazon EC2 basically provides a Virtual Computing environment, where they have preconfigured AMI (Amazon Machine Image) from which you can launch Virtual machines. In this section, we shall see the steps to create and configure the Linux EC2 instance from a pre-configured AMI named Linux-2 AMI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ca4E-WgT0YSjg3xZzcWlBg.png" /></figure><p>Search for EC2 in the search bar and click on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*OPC6BIYY4YhMyU-IELhhQw.png" /></figure><p>In the Name and Tags step you can add tags to an instance, tags help you to enable categorize AWS resources in different ways, for example, by owner, environment, or purpose.</p><p>Choose Ubuntu, select Ubuntu Server (HVM) architecture and Click on Select</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*syFtb775IC1ZpqmaGsmqFw.png" /></figure><p>For Select the t2.micro instance type, if you want you may select another instance type but they are chargeable so we choose the t2.micro instance type which is eligible for the free tier and limited resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*8a8Y-d-9nrpzcWRcxvO4QA.png" /></figure><p>Select an existing key pair or create a new one, enter the name of the Key-pair as Ubuntu-Key, select .pem and Create the Key Pair.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CtZqHoJjiBZbeymiw1a0mw.png" /></figure><p>Now select HTTP Port under Network Setting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*fmgEHyaCduBTfdsIzRyw2Q.png" /></figure><p>Now review all the things you have Configured and Click on Launch Instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*fcMSPP2vUYLSn3Ws3846QA.png" /></figure><p>Now Click on View all Instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*E2d7WmSlv8yPtCA4MdDVEQ.png" /></figure><p>Here, you shall see your instance is launching and the Status check is Initializing, wait for some time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*QITAgXMIJhELNKnOE2QWeg.png" /></figure><p>Refresh and you shall see your instance are Up and Running, and Status check has changed to 2/2 checks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*-9ZsjeFDrhJc_ZuFMsyjDA.png" /></figure><h4>Now, we have successfully created our Ubuntu Instance using EC2</h4><h4>B. INSTALL AWS CLI &amp; DOCKER ON UBUNTU INSTANCE</h4><ol><li>Open Security Credentials from AWS Console Home.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*gA2HFG6cRnbHalJf_6evTw.png" /></figure><p>2. Under Access Keys, click on Create New Access Keys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Nru14QVPaCCTSaVn9ylWwQ.png" /></figure><p>3. Now, copy the Access Key ID, Seceret Access Key (we will use this in further steps)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*w9dD6657BxYfEVo2Yt7ggA.png" /></figure><p>4. On EC2 Console, Connect to Ubuntu Instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*oHwRbjATv9V-GMF0Hf28sg.png" /></figure><p>5. Under EC2 Instance Connect, let everything default and Click on Connect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*v0ioHnl_mtUY25dNx_LDYw.png" /></figure><p>6. Run the following command “sudo su”, switch to root user</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*sUEkmhEYeysFaGz_g-vbHQ.png" /></figure><p>7. Run the following command “sudo apt-get update -y” to update software repositories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*VBLMZjk-oPN_qHHVYNMXkQ.png" /></figure><p>8. Run the following command “sudo apt install awscli”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*baYdG8n-O8zOYfn7_5XG0g.png" /></figure><p>Note: If you get message like below then type Y and hit enter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*m_8UIhOqgvo_5EJAipfcbg.png" /></figure><p>9. Run the following command “aws configure” and enter the Access Key &amp; Secret Access Keys (Created in earlier Steps). Press enter two times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*FRxPWCQipK4GmUWQtDyFoA.png" /></figure><p>Now AWSCLI will be installed in your Ubuntu Instance Successfully</p><p>C. Install Docker on Ubuntu Instance</p><ol><li>Type the following command “sudo apt install docker.io” to Install Docker</li></ol><p>Note: If you get message like below then type Y and hit enter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*kY64tn-KWpSQ2QVHyCDGog.png" /></figure><p>2. Start and Enable Docker with following command.</p><h4>“sudo systemctl start docker”</h4><h4>“sudo systemctl enable docker”</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*hPqzoUpUYhcAZZMJfUuNXA.png" /></figure><p>3. Check Docker status with following command “sudo systemctl status docker”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*4K1DQ1di2qR7-30PH7qAGg.png" /></figure><p>4. You should see output like below (exit by typing q)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*SDYqrXdRHCTacu2MHY42Gg.png" /></figure><p>Check Docker Version with following command “docker — version”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*SwWuJDz_OMhBPFDRsPVZOw.png" /></figure><ol><li>Create a Dockerfile. A Dockerfile is a manifest that describes the base image to use for your Docker image and what you want installed and running on it. Use below commands to create a docker file</li></ol><p>docker images</p><p>vi Dockerfile</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*pxOd4Vp6F_RDfpsSP1TjiQ.png" /></figure><p>2. Edit the Dockerfile you just created and add the following content.Press :x to execute the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*FxqYUyofdvgPkOZdGiDqfQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*BJOGAtf9iZSVaJB_4-lviw.png" /></figure><p>3. Now build the docker image from the Dockerfile with following command “docker build -t hello-world .”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*CpZgJYqoT8JgDUuZhEzAFQ.png" /></figure><p>4. Validate docker images created with following command “docker image”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*U4QcOw_4B_c2WM9m_wxOeg.png" /></figure><p>Here, we have Successfully Created the Docker Image.</p><h4>CREATING REPOSITORY IN ECR</h4><p>a. Search for ECR in Search bar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*7leyA7akGjmfPgKi_QoOqA.png" /></figure><p>b. Click on Get Started.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*CxMk7saZcwPDyrAChMajXQ.png" /></figure><p>c. Under General Settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*9PRtrHOg6iA9RbTKc9OwWw.png" /></figure><p>d. Scroll Down, Click on Create Repository</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*BFriOPABf1RdP3wHANPYVQ.png" /></figure><p>e. Repository Created Successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*1iDRM7U2LOg5QK8Lnyu8NA.png" /></figure><h4>PUSH DOCKER IMAGE TO ECR</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*CbpJ5uHRqxKURW0TrvWcdA.png" /></figure><p>1. Navigate to ECR console and click on View push commands</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*P76etlKHg4vyZYo0qyh2Mw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*d_XpjxBmSxcPAIP-gaGJXQ.png" /></figure><p>2. Copy the get-login password command and run as well copy other commands and paste.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ZKtEu5EQUfGT9vhmPHv8XQ.png" /></figure><p>3. Run the following command, tag your image so you can push the image to this repository:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*MurYo6LnQTJcj4_T8PEoZw.png" /></figure><p>5. Verify on ECR console, your image will be successfully pushed to repository and visible here</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*Iw6jBepnTjKEUOJOOSx0WA.png" /></figure><h4>DELETING/CLEANUP</h4><p>NOTE: It is important we delete all the resources created in this exercise in other to avoid charges.</p><h4>CREDIT:#K21ACADEMY</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be0b8bc5d17f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a Serverless Workflow with AWS Step Functions and AWS Lambda]]></title>
            <link>https://medium.com/@jkenny1930/create-a-serverless-workflow-with-aws-step-functions-and-aws-lambda-238171d5e833?source=rss-e0d222971d67------2</link>
            <guid isPermaLink="false">https://medium.com/p/238171d5e833</guid>
            <dc:creator><![CDATA[Kehinde Oniyide]]></dc:creator>
            <pubDate>Wed, 19 Jul 2023 10:13:02 GMT</pubDate>
            <atom:updated>2023-07-19T10:13:02.915Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview:</h3><p>In this hands-on, I use AWS Step Functions to design and run a Serverless workflow that coordinates multiple AWS Lambda functions.</p><p>AWS Lambda is a compute service that lets you run code without provisioning or managing servers. You pay only for the compute time that you consume — there is no charge when your code is not running. With Lambda, you can run code for virtually any type of application or backend service, all with zero administration.</p><h4><strong>How it works:</strong></h4><p>Below is a simple Lambda functions. Click “Run” in your Lambda environment in your console to see functions output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*1-4C1U0mrhYVWCgEfFT43g.png" /></figure><p>As a developer who has been asked to create a serverless application to automate handling of support tickets in a call center. While i could have one Lambda function call the other, but the worry is that managing all of those connections will become challenging as the call center application becomes more sophisticated. Plus, any change in the flow of the application will require changes in multiple places, and i could end up writing the same code over and over again.</p><p>To solve this challenge, I decided to use AWS Step Functions. Step Functions is a Serverless orchestration service that lets you easily coordinate multiple Lambda functions into flexible workflows that are easy to debug and change. Step Functions will keep my Lambda functions free of additional logic by triggering and tracking each step of my application.</p><h4>Intention of the Task:</h4><ul><li>Create a Step Functions state machine to describe the current call center process</li><li>Create a few simple Lambda functions that simulate the tasks of the support team</li><li>Pass data between each Lambda function to track the progress of the support case</li><li>Perform several tests of your workflow to observe how it responds to different inputs</li><li>Delete the AWS resources you used in the tutorial</li></ul><h3>Prerequisites:</h3><p>You need an AWS account to complete this tutorial. If you don’t already have an account, see the <a href="https://aws.amazon.com/getting-started/guides/setup-environment/">Setting Up Your AWS Environment</a> getting started guide.</p><h3>Implementation:</h3><h3>Step 1: Create an AWS Identity and Access Management (IAM) role</h3><p>AWS IAM is a web service that helps you securely control access to AWS resources. In this step, you will create an IAM role that allows Step Functions to access Lambda.</p><p>a. Open the <a href="https://us-east-1.console.aws.amazon.com/iamv2/home?region=us-east-1#/home">IAM Management Console.</a> Select Roles from the left navigation pane and then choose Create role.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*j1N8l9cbGhtPviKARVQDtw.png" /></figure><p>b. On the Create role screen, under Trusted entity type, keep AWS service selected. Under Use case, search <em>Step Functions</em> in the dropdown and select Step Functions. Choose Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*M7RVbA5_Jr-rZfVvXKiiqA.png" /></figure><p>Choose Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/186/1*1dkPjP8t0UYYz9CcePLbRA.png" /></figure><p>c. In the Name, review, and create section, in Role name, i used basic<em>_functions_execution.</em> Choose Create role.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*z0zmX9p7fuZ_JF11MS3avQ.png" /></figure><p>Choose Create Role.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/184/1*Q4o4FPlrjq-927rrsY3YLg.png" /></figure><h3>Step 2: Create a state machine and serverless workflow</h3><p>My first step was to design a workflow that describes how i want support tickets to be handled in my call center. Workflows describe a process as a series of discrete tasks that can be repeated again and again.</p><p>I was able to sit down with the call center manager to talk through best practices for handling support cases. Using the visual workflows in Step Functions as an intuitive reference, we define the workflow together.</p><p>Then, i will design my workflow in AWS Step Functions. My workflow will call one AWS Lambda function to create a support case, invoke another function to assign the case to a support representative for resolution, and so on. It will also pass data between Lambda functions to track the status of the support case as it’s being worked on.</p><p>a. In the <a href="https://console.aws.amazon.com/states/home#/statemachines/create">AWS Step Functions console</a>. Click create state machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*0wnvWIOQlNo7oQQvfTDWLw.png" /></figure><p>Select Write your workflow in code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*RuSRy5tyo_IiDdcjh0UWIw.png" /></figure><p>b. I replace the contents of the state machine definition window with the <a href="https://states-language.net/spec.html">Amazon States Language (ASL)</a> . Amazon States Language is a JSON-based, structured language used to define my state machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*u08Frl-b8XMVdBh89RUSkw.png" /></figure><p>This state machine uses a series of Task states to open, assign, and work on a support case. Then, a Choice state is used to determine if the case can be closed or not. Two more Task states then close or escalate the support case as appropriate.</p><p>c. I use refresh button to show the ASL state machine definition as a visual workflow. In my scenario, you can easily verify that the process is described correctly by reviewing the visual workflow with the call center manager. Choose Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*y-5_L36y7SA_Woth9-ajXg.png" /></figure><p>d. In the State machine name text box, enter <em>CallCenterDeptMachine</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*GjQq8r2UIox5E4VMtAM_QA.png" /></figure><p>e. Under Permissions, select Choose an existing role, select basic<em>_functions_execution </em>from the dropdown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*r3wGwpbPmh5mP91MHIgOVw.png" /></figure><p>f. At the bottom of the page, choose Create state machine.</p><h3>Step 3: Create your Lambda functions</h3><p>Now that i have created my state machine, i can decide how i want it to perform work. I can connect my state machine to Lambda functions and other microservices that already exist in my environment, or create new ones. In this hands-on, i will create a few simple Lambda functions that simulate various steps for handling support calls, such as assigning the case to a customer support representative.</p><p>a. I open my <a href="https://us-east-1.console.aws.amazon.com/lambda/home?region=us-east-1#/functions">AWS Lambda console</a>. Choose Create function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*Lhwyt-Lq6lqt4rc2zf8dGg.png" /></figure><p>b. I Select Author from scratch.</p><p>c. I Configure my first Lambda function with these settings :</p><p>Name — <em>OpenCaseFunction</em>.</p><p>Runtime — Node.js 16.x.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*RKscMcL3gMmCVmmt9Gf56g.png" /></figure><p>Execution role — Create a new role with basic Lambda permissions</p><p>d. Choose Create function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*kphbtZh1idzy9Vw03ro0ng.png" /></figure><p>e. I Replace the contents of the Function code window with the following code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*avaBfh37AkdkSpfSy5YiiQ.png" /></figure><p>Choose Deploy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*YzotySywJjpdUHaoTj42Xw.png" /></figure><p>f. At the top of the page, select Functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*p09Mpn_78Cq5Lmhx3XGvuQ.png" /></figure><p>g. Repeat steps 3b-3d to create four more Lambda functions, using the lambda_basic_execution IAM role you created in step 3c.</p><p>Define AssignCaseFunction as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*avaBfh37AkdkSpfSy5YiiQ.png" /></figure><p>Define WorkOnCaseFunction as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*ysX27enHnMrqtDd68sZAzw.png" /></figure><p>Define CloseCaseFunction as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/333/1*0xY2F2f8qAlF9iWFhdLlzQ.png" /></figure><p>Define EscalateCaseFunction as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*rRlamDZlufTqpC-SYPlcpA.png" /></figure><p>Now we have five Lambda functions as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*3begwUPDxUMV_jLVMeoWxQ.png" /></figure><h3>Step 4: Populate your workflow</h3><p>The next step is to populate the task states in my Step Functions workflow with the Lambda functions i just created.</p><p>a. In the <a href="https://console.aws.amazon.com/states/home#/statemachines/create">AWS Step Functions console</a>. In the State machines section, select CallCenterDeptMachine<em> </em>and choose Edit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*kBQr5kia0IVCyZd165aRiQ.png" /></figure><p>b. In the state machine Definition section, find the line below the Open Case state which starts with <em>Resource</em>.</p><p>Replace the ARN with the ARN of your OpenCaseFunction.</p><p>If you choose the sample ARN, a list of the AWS Lambda functions in your account will appear and you can select it from the list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*pVqCY2LNCdNaKzu-eE1C7w.png" /></figure><p>C. I Repeat the previous step to update the Lambda function ARNs for the Assign Case, Work on Case, Close Case, and Escalate Case task states in my state machine, then choose Save.</p><h3>Step 5: Execute your workflow</h3><p>My serverless workflow is now ready to be executed. A state machine execution is an instance of my workflow, and occurs each time a Step Functions state machine runs and performs its tasks. Each Step Functions state machine can have multiple simultaneous executions, which i can initiate from the Step Functions console (which is what i will do next), or by using AWS SDKs, Step Functions API actions, or the AWS CLI. An execution receives JSON input and produces JSON output</p><p>a. Choose Start execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*FAispusVnsVh1KrdGngLEA.png" /></figure><p>b. A New execution dialog box appears. To supply an ID for your support case, enter the following content in the New execution dialog box in the Input window, then choose Start execution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*JDHZtrS9ufOreJ_Q3chLUA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*ZhzlK5E5Ie1k-0GVqNnFvw.png" /></figure><p>c. As my workflow executes, each step will change color in the Visual workflow pane. Wait a few seconds for execution to complete. Then, in the Execution details pane,i choose Execution input and Execution output to view the inputs and results of your workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*X8eqUxsASOdeDcBwRN55yA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*3SY_DUDUSfrDjnb1TI0_hA.png" /></figure><p>d. Scroll down to the Execution event history section. Click through each step of the execution to see how Step Functions called my Lambda functions and passed data between functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*CfRtVliuLLeJtWdsnVPLUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*Z5Kv0Qm5s2ognm-SneFhsQ.png" /></figure><p>e. Depending on the output of my WorkOnCaseFunction, my workflow may have ended by resolving the support case and closing the ticket, or escalating the ticket to the next tier of support. I can rerun the execution a few more times to observe this different behavior. This image shows an execution of the workflow where the support case was escalated, causing the workflow to exit with a Fail state.</p><p>In a real-world scenario, i might decide to continue working on the case until it’s resolved instead of failing out of my workflow. To do that, i could remove the Fail state and edit the Escalate Case Task in my state machine to loop back to the Work On Case state. No changes to my Lambda functions would be required. The functions we built for this hands-on are samples only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*NKjhysbhhomKkKaxTdeJnA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*3SY_DUDUSfrDjnb1TI0_hA.png" /></figure><h3>Step 6: Clean up resources</h3><p>After the task has been completed, i will terminate my AWS Step Functions and AWS Lambda resources.</p><p>Important: To avoid incurring unexpected charges, it’s a best practice to terminate active resources that i no longer need.</p><h4>Credit: AWS</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=238171d5e833" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy and Configure an Amazon Lightsail MySQL Database]]></title>
            <link>https://medium.com/@jkenny1930/deploy-and-configure-an-amazon-lightsail-mysql-database-dda9f252b906?source=rss-e0d222971d67------2</link>
            <guid isPermaLink="false">https://medium.com/p/dda9f252b906</guid>
            <dc:creator><![CDATA[Kehinde Oniyide]]></dc:creator>
            <pubDate>Mon, 17 Jul 2023 06:39:58 GMT</pubDate>
            <atom:updated>2023-07-17T06:39:58.966Z</atom:updated>
            <content:encoded><![CDATA[<p>In this hands-on, i will deploy a database on Amazon Lightsail, this can be used by any Lightsail instances or applications deployed in the same AWS Region. I will build applications and systems within Lightsail without needing to use additional AWS services. I will also add databases to a single instance, add users, create snapshots of my data, and understand how to view database metrics.</p><p>End Goal:</p><ul><li>To deploy a Lightsail MySQL database instance</li><li>To deploy a Lightsail Ubuntu instance</li><li>To connect the Ubuntu instance to the database instance</li><li>To create additional users and databases on the database instance</li><li>To enable logging and snapshots of the database instance</li></ul><h3>Prerequisites:</h3><ul><li>An AWS account: If you don’t already have an account, follow the <a href="https://aws.amazon.com/getting-started/guides/setup-environment/">Setting Up Your AWS Environment</a> guide for a quick overview.</li></ul><h3>Implementation:</h3><ol><li>Navigate to the <a href="https://lightsail.aws.amazon.com/">Amazon Lightsail console.</a></li></ol><p>2. Click on the Databases tab.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*ap_qHewTCsZ3MXI3hNt7xg.png" /></figure><p>3. Choose <strong><em>Create database.</em></strong></p><p>4. Choose Change AWS Region and Availability Zone and select the Region and Availability Zone where you want your database to reside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*r4v9nxUL1ewt1gktbpEJSQ.png" /></figure><p>5. I select MySQL database. Currently Lightsail supports MySQL and PostgreSQL. For this hands-on, i select MySQL and use the latest version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*icCZiLttg09q7WZ8rkyvmw.png" /></figure><p>6. Choose Specify login credentials. I create a database user name as dbpro or you can leave it blank and you will see default credentials after the database is deployed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*CLf8EWQHkC16UOIoZPGrDw.png" /></figure><p>7. By default, Lightsail will create a strong password for my database instance, which will be shown in the console after the database is deployed. Clear the Create a strong password for me check box and enter Bishop10! or a password of your choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*GuhlVrTStiiOaqTVCXAP_g.png" /></figure><p>8. I Name my Database dbprimary</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*19L1iFJudZ_P6LegKrzNug.png" /></figure><p>9. With Lightsail databases, you can choose between a Standard plan and a High Availability plan. The High Availability plan provisions two database servers and will keep your database running even if something happens to the primary database. High Availability plans are twice the cost because the number of resources are double those of the Standard plan.</p><p>Select the $15 USD Standard plan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*IwrtMAUTKwMbANrInrM6kA.png" /></figure><p>10. I use <em>DB-Instance-pry.</em> This is the name of the database instance (server running MySQL), which you will see in the Lightsail console under your database resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*K2D3FA0myLvGtX-RtC0mBw.png" /></figure><p>11. Choose Create database. It will take 10–15 minutes to deploy the database server. Until it is ready, the resource will be grayed out with a status of Creating.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*QsD-tYzerl3l7HsJUxJWFw.png" /></figure><p>12. While i’m waiting for my database to be created, i will deploy a Lightsail Ubuntu instance that i will use to remote into my database instance and perform some administrative tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*Pexi0A-bIrtmVIpyfWZ8Tw.png" /></figure><p>13. Choose Create instance.</p><p>14. I Ensure that my instance is deployed to the same Region as my database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*pvxaTWYSxU1TfFhx6AuMzQ.png" /></figure><p>15. I click Add launch script. This will run code at the end of deploying this instance. It will be use to launch script to add the MySQL client, allowing me to remotely connect to my database instance and perform administrative tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*hpFGvMkPLhLOyka2zUs6PQ.png" /></figure><p>16. For this hands-on, i select the $3.50 USD per month instance plan. For larger applications or websites, you can select the instance plan according to your requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*kAtLqelJjId7B1AUY-rIyQ.png" /></figure><p>17. To identify my instance, enter <em>Ubuntu-pry,</em> then choose Create instance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*bpmKtD7CWA8FH8c0CeI0HQ.png" /></figure><p>18. Wait until the database instance is available. You can watch for the status change by navigating back to the Databases tab by choosing the Lightsail icon or the Home button in the Lightsail console:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*RmYbKmuPL0XJ2C4YY43n8w.png" /></figure><p>19. Now that my database is available, i can continue. Note that my instance can only be reached from other resources in my Lightsail account that are in the same Region as this instance. This means that i won’t be able to connect to this database from my home or office, or from resources outside of the current Region. Choose the instance name to continue.</p><p>20. note the page screenshot. You will see the resources, MySQL version, and Region, followed by the Endpoint and Port. The endpoint and port number are what you i will use to connect an application to the database.</p><p>Below that, you will see a number of tabs that i will walk through in the upcoming steps. Below the tabs, you will see the username and password to connect to the database instance. i can add additional users as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*03kQy0xF1-QcAqXDU5wCxQ.png" /></figure><p>21. I Select the Logs &amp; history tab, which provides additional tools for troubleshooting my database instance. By default, these logs are disabled but can be enabled by selecting the toggle buttons. I Enable all logs on this page by selecting the toggle buttons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*fycFBVTefDWt2_5jAwzG1Q.png" /></figure><p>22. Once these logs are enabled, i will choose the Open log buttons to see what is being logged and use this for troubleshooting as needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*66rK5lETeYIzuSakWwu8OQ.png" /></figure><p>23. Next, i select the Metrics tab. Here you can select various metrics and see a graphical representation of resource usage. This is helpful when troubleshooting or determining if a larger instance is needed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*1MH1qv-VpC4hxI5c36zQ7A.png" /></figure><p>24. I don’t want to select the Networking tab. I have the ability to enable Public mode. However, this will open my database up to be connected to from anywhere in the world and is highly discouraged, other than for temporary troubleshooting purposes. If i select the Public mode toggle, it will take 10–15 minutes to reconfigure the instance to be enabled. Similarly, if i clear the Public mode selection, it will take a number of minutes to modify the instance to the latest setting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*VxY3MVw5cTPF7HpoJk6isg.png" /></figure><p>25. Select Snapshots &amp; restore. Here you can create a manual snapshot (point-in-time copy) of your database. Additionally, Lightsail creates backups of your database in 5-minute increments. If you need to restore to an earlier snapshot, you could choose Restore to new database and deploy it as a new database with a different instance name that you could then re-point your applications to. Choose Create snapshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*_hkWL-59t4_E6Zq37hh4Sw.png" /></figure><p>26. Give your snapshot a name. In this case, enter <em>DB-Instance-pry-123</em> and choose Create. My snapshot will be created within a few minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*y_dhqLzb1pTR6YjPse1i_g.png" /></figure><p>27. Once the snapshot has been created, select the 3-dot button to the right of the snapshot. This provides the option of creating a new database from this snapshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*fwoMzKvjOdBKhOAPx6nVjg.png" /></figure><p>28. I copy the database endpoint to your clipboard, then navigate back to my Ubuntu-1 instance. Choose the remote terminal icon.</p><p>A new SSH window will pop up and you can now connect from this instance into your database instance. Enter the following command and replace DATABASE_URL with the database endpoint you copied to your clipboard in the previous step. (Note: Make sure there is no space between the -p and the password.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*OnHNmo9JwsVQw1Zlpe1Etw.png" /></figure><p>29. I am now connected to the MySQL instance. I will Run the command SHOW DATABASES; You will see <em>dbprimary</em>, which i created during database deployment, along with several others used by the Lightsail database service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*p2tgkqWx8YsyaYNSpmD8jg.png" /></figure><p>30. I will create another database on this instance using the following command: CREATE DATABASE secondDB;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*IzovENXOLHXGzsUWZyf9zQ.png" /></figure><p>31. I will give my user dbpro privileges on the new database by running the following command: GRANT ALL PRIVILEGES ON secondDB.* TO ‘dbpro’@’%’;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*mklXPT5C-zyo7EGCh4LADQ.png" /></figure><p>32. Finally, we can exit the remote SQL session by entering:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*n1vwxnr5Jw4KFrBZwt8qdQ.png" /></figure><h3>Conclusion</h3><p>In this Lab, i was able to deployed my database instance, added an additional database and user, connected remotely from a Lightsail Ubuntu instance, and configured additional database settings and snapshots.</p><p>Credit AWS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dda9f252b906" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>