<?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 Jayprajapati on Medium]]></title>
        <description><![CDATA[Stories by Jayprajapati on Medium]]></description>
        <link>https://medium.com/@jayprajapati2323?source=rss-1cccdfdcdc1e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*5JFByfi0hlo2vYco</url>
            <title>Stories by Jayprajapati on Medium</title>
            <link>https://medium.com/@jayprajapati2323?source=rss-1cccdfdcdc1e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 00:22:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jayprajapati2323/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[Lambda Wasn’t Broken. So Why Did AWS Build Lambda MicroVMs?]]></title>
            <link>https://medium.com/@jayprajapati2323/lambda-wasnt-broken-so-why-did-aws-build-lambda-microvms-a1abac5509c6?source=rss-1cccdfdcdc1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1abac5509c6</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Jayprajapati]]></dc:creator>
            <pubDate>Mon, 13 Jul 2026 12:24:22 GMT</pubDate>
            <atom:updated>2026-07-13T12:24:22.988Z</atom:updated>
            <content:encoded><![CDATA[<p>AWS recently announced Lambda MicroVMs.</p><p>When I first saw the announcement, my immediate thought was: <em>“Why?”</em></p><p>AWS already gives us:</p><ul><li>EC2</li><li>ECS</li><li>EKS</li><li>Fargate</li><li>Lambda</li></ul><p>Another compute service?</p><p>That was my honest reaction. Compute at AWS already feels like a fully stocked toolbox. Adding one more tool usually means one of two things: either AWS is chasing a marketing headline, or there’s a real gap nobody had quite named yet.</p><p>After reading the announcement carefully, I realized it was the second one. AWS wasn’t replacing Lambda. They weren’t trying to out-EC2 EC2. They were solving an entirely different problem — one that’s been quietly getting worse for the last two or three years.</p><h3>The Gap Nobody Was Talking About</h3><p>Don’t think about Lambda for a second. Think about the gap instead.</p><p>Imagine you’re building something like:</p><ul><li>Replit</li><li>ChatGPT’s Code Interpreter</li><li>GitHub Codespaces</li><li>Online VS code editor</li><li>CI/CD Platforms</li></ul><p>In products like these, users aren’t simply calling an API and getting a response back. They’re <strong>executing code</strong>. Running terminals. Installing packages. Starting web servers. Keeping a session alive while they poke around, break things, and try again.</p><p>Suddenly, Lambda starts feeling like the wrong tool.</p><p>Not because Lambda is bad. Lambda is fantastic at what it was built for. But what it was built for — short, stateless, event-driven functions — isn’t what this new wave of applications actually needs.</p><p>That’s the gap AWS wanted to solve. And it’s not a hypothetical gap. Over the past couple of years, a whole category of products has emerged that all share the same underlying requirement: hand each end user their own dedicated execution environment to safely run code the application developer didn’t write. AI coding assistants, interactive notebooks, data analytics platforms, vulnerability scanners, game servers running user scripts — the list keeps growing, and every one of them runs into the same wall.</p><h3>How We Were Solving This Before</h3><p>Before MicroVMs, if you wanted isolated, long-running, stateful execution per user, the answer was almost always some version of this:</p><pre>User<br> ↓<br>EKS<br> ↓<br>Pod<br> ↓<br>Docker<br> ↓<br>Python</pre><p>And to be fair, this works. Plenty of production systems run exactly this way today.</p><p>But now you’re managing:</p><ul><li>clusters</li><li>scaling</li><li>nodes</li><li>patching</li><li>security</li><li>cleanup</li></ul><p>This isn’t a Lambda problem. It’s an operational burden. You didn’t set out to build a Kubernetes platform — you set out to build a coding assistant, or a sandbox, or an analytics tool. Somewhere along the way, half your engineering time started going toward keeping a container fleet alive instead of building the product your users actually asked for.</p><h3>Why Not Just Use Lambda?</h3><p>It’s worth asking directly: why not just force-fit this into Lambda? Plenty of teams try.</p><p>Picture an online IDE.</p><pre>User<br> ↓<br>Run<br> ↓<br>Lambda<br> ↓<br>Output</pre><p>Works great — for the first request.</p><p>Now the user clicks <strong>Terminal</strong>. Problem. Lambda doesn’t hand out a persistent terminal session.</p><p>Now they start a Flask server so they can preview their app. Problem. Lambda isn’t built to keep a long-lived process listening on a port and reachable by URL.</p><p>Now they run npm install. Problem. That takes time, writes to disk, and Lambda&#39;s execution model wasn&#39;t designed around a slow, stateful build step in the middle of a session.</p><p>Now they leave for lunch. Problem. Lambda has a hard 15-minute execution ceiling, and it doesn’t retain memory or disk state between invocations the way an interactive session needs.</p><p>You could work around every one of these individually. Plenty of teams have. But each workaround chips away at the exact thing that made Lambda appealing in the first place: not having to think about infrastructure.</p><h3>Enter Lambda MicroVMs</h3><p>AWS basically said: instead of giving you a function, we’ll give you your own isolated machine.</p><p>That’s it. That’s the whole idea, stripped down to one sentence.</p><p>Each MicroVM comes with its own filesystem, its own memory, its own network path, and its own dedicated HTTPS endpoint. It’s powered by Firecracker — the same lightweight virtualization technology that already underpins trillions of Lambda invocations every month — so AWS isn’t introducing some unproven new isolation model. It’s exposing infrastructure that’s already been battle-tested at enormous scale, just in a new shape.</p><p>The lifecycle looks like this: you package your application and a Dockerfile, upload it to S3, and AWS builds and snapshots a MicroVM image from it — memory and disk state included. From that point on, every MicroVM you launch resumes from that pre-initialized snapshot instead of booting cold, which is what makes startup feel near-instant even for a fairly heavy application.</p><p>And crucially, a MicroVM can suspend and resume. When a session goes idle, AWS can snapshot it and pause billing for compute, while keeping the environment — installed packages, running processes, open files, all of it — fully intact. When the user comes back, it resumes exactly where they left off. State can be preserved this way for hours, not minutes, which is the entire point: this is built for sessions, not requests.</p><h3>Why This Matters — In Plain Terms</h3><p>It’s easy to gloss over this with buzzwords. So let’s make it concrete.</p><p>Instead of saying “AI,” say: <em>ChatGPT generates code. Where should it execute?</em></p><ul><li><strong>Before:</strong> stand up Kubernetes, manage a pod per session, handle scaling and cleanup yourself.</li><li><strong>After:</strong> launch a MicroVM. Done.</li></ul><p>Same idea with infrastructure-as-code tooling. Say a customer uploads a Terraform config and your platform needs to run it in isolation.</p><ul><li><strong>Before:</strong> customer uploads Terraform → you create an ECS Task → you manage the task lifecycle, networking, and teardown.</li><li><strong>After:</strong> customer uploads Terraform → you create a MicroVM. Done.</li></ul><p>In both cases, the isolation and lifecycle management that used to be <em>your</em> job now belongs to the platform.</p><h3>When Should You Actually Use Each Compute Option?</h3><ul><li><strong>API Backend</strong> → Lambda</li><li><strong>Long-running Application</strong> → ECS/EKS</li><li><strong>Traditional Server</strong> → EC2</li><li><strong>User Sandbox / Untrusted Code</strong> → Lambda MicroVMs</li></ul><p>Simple. Useful. And it slots neatly into the compute decisions you were probably already making.</p><h3>Should Everyone Migrate?</h3><p>No.</p><p>Lambda isn’t being replaced. Containers aren’t going away. If your workload is a stateless API handling requests in milliseconds, Lambda Functions remain exactly the right choice — AWS has been explicit that the two are meant to complement each other, not compete. A lot of real systems will end up using both: Lambda Functions for the event-driven backbone, and MicroVMs for the specific steps that need to run untrusted, user- or AI-generated code in isolation.</p><p>MicroVMs fill a gap that previously forced developers to choose between three things they shouldn’t have had to trade off against each other: strong isolation, fast startup, and persistent state. Containers gave you speed but a shared kernel. VMs gave you isolation but slow boot times. Lambda gave you serverless simplicity but no session state. MicroVMs are AWS’s attempt to stop making you pick two out of three.</p><p>That’s why this announcement matters.</p><blockquote><em>For years, the decision was relatively straightforward:</em></blockquote><blockquote><em>Need a VM? → EC2<br>Need containers? → ECS/EKS/Fargate<br>Need serverless? → Lambda</em></blockquote><blockquote><em>Lambda MicroVMs introduce a new category:</em></blockquote><blockquote><em>Need an isolated, stateful environment without managing infrastructure? → Lambda MicroVMs</em></blockquote><p>I believe this is less about replacing existing services and more about AWS preparing for the next generation of workloads — AI agents, browser-based development environments, secure execution sandboxes, and other applications where executing code safely is becoming just as important as running applications reliably.</p><p>Lambda wasn’t broken. AWS just noticed that the next decade of software isn’t only going to run code developers wrote — it’s going to run code <em>users and models</em> wrote, on demand, one isolated session at a time. MicroVMs are AWS betting that this shift is real, and betting early.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1abac5509c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Three Tier Web App Architecture AWS]]></title>
            <link>https://medium.com/@jayprajapati2323/three-tier-web-app-architecture-aws-cfe08e609763?source=rss-1cccdfdcdc1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfe08e609763</guid>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[vpc]]></category>
            <category><![CDATA[rds-mysql]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[three-tier-architecture]]></category>
            <dc:creator><![CDATA[Jayprajapati]]></dc:creator>
            <pubDate>Fri, 23 Jun 2023 20:38:21 GMT</pubDate>
            <atom:updated>2023-06-23T20:39:02.272Z</atom:updated>
            <content:encoded><![CDATA[<h4>An architecture that ensures decoupled, secured and independently scalable components for each layer</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/0*C-xFdWECjT4rtbQf.png" /><figcaption>Basic Flow</figcaption></figure><h4><strong>Architecture Overview</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*205IqoxuGFmrCOzJeUlA_A.png" /></figure><h4>1️⃣ Create a VPC</h4><ul><li>Launch a separate new VPC apart from the default VPC.</li><li>Add a CIDR range of ’10.10.0.0/16’.</li></ul><h4>2️⃣ Subnets</h4><ul><li>Create three public subnets for the web layer, three private subnets for the app layer, three private subnets for the database layer.</li><li>Divide the CIDR range into the parts as following:</li><li>10.10.1.0/24, 10.10.2.0/24, 10.10.3.0/24 and so on………</li></ul><h4>3️⃣ Internet Gateway &amp; NAT Gateway</h4><ul><li>Create an Internet Gateway for this particular VPC.</li><li>Then set up the NAT Gateway.</li></ul><h4>4️⃣Route Table</h4><ul><li>Create three route tables, namely ‘public-web-route-table’ , ‘private-app-route-table’ and ‘private-db-route-table’.</li><li>Associate subnets to the respective route tables.</li><li>Then comes the modification of routes. By default there is only local route created for the subnets associated with the route table. To provide the internet connection to the resources created within the subnet, then you need to add the route to the internet gateway in the route table of the corresponding subnet. So add the route of the igw to in the public-web-route-table.</li><li>Now, we do not want to directly expose the resources to the internet which are created within the app and the db layer… So what we’ll do is that, create a nat gateway and direct the traffic to the NAT gateway which is going to the internet, with the help of the routes created in the route table.</li></ul><h4>5️⃣Launch Web Layer Instance</h4><ul><li>Launch an instance in the public web subnet of the AZ-1. Select the AMI of your choice, I will select the Amazon Linux 2 HVM SSD backed. Main config is of the Security group i.e allow the SSH connection from the source anywhere IPv4. Create with the key pair.</li></ul><h4>6️⃣Launch App Layer Instance</h4><ul><li>Here we need to launch two instances in the AZ-a and b in the private subnets of the app layer. The sg rules for this layer instances will contain only the ssh from the sg of the web layer, that means that only the traffic from the web layer can reach to the app layer and not directly to it. But later on when we’ll configure the load balancer at that time we’ll need to add one more rule for the allowance of the traffic from the load balancer to our web app also.</li></ul><h4>7️⃣ Creating Application Load Balancer</h4><h4>8️⃣ RDS config</h4><h4>9️⃣ Configuring Apache and phpMyAdmin on App layer Server</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfe08e609763" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build a Serverless Web Application]]></title>
            <link>https://medium.com/@jayprajapati2323/build-a-serverless-web-application-9bfad7ae4fc8?source=rss-1cccdfdcdc1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bfad7ae4fc8</guid>
            <category><![CDATA[web-applications]]></category>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Jayprajapati]]></dc:creator>
            <pubDate>Mon, 19 Jun 2023 05:20:32 GMT</pubDate>
            <atom:updated>2023-06-20T05:17:01.710Z</atom:updated>
            <content:encoded><![CDATA[<h4>step-by-step instructions to launch your first serverless web application on AWS.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5F3UiynXrFH9f8c-TsqLDA.png" /></figure><h4>Introduction</h4><p>In this tutorial, I will guide you through the process of building a simple serverless web application with AWS that revolutionizes transportation by allowing users to request unicorn rides from the WildRydes fleet.</p><h4><strong>Application Architecture</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p5Qdv9kjT_tvV-rjcjXO-Q.png" /></figure><p>Amplify Console provides continuous deployment and hosting of the static web resources including HTML, CSS, JavaScript, and image files which are loaded in the user’s browser. JavaScript executed in the browser sends and receives data from a public backend API built using Lambda and API Gateway. Amazon Cognito provides user management and authentication functions to secure the backend API. Finally, DynamoDB provides a persistence layer where data can be stored by the API’s Lambda function.</p><h4>Services Used</h4><ul><li>AWS Amplify</li><li>Amazon Cognito</li><li>Amazon API Gateway</li><li>AWS Lambda</li><li>Amazon DynamoDB</li></ul><h4><strong>This hands on is divided into 5 segments</strong></h4><ul><li>Host a Static Website</li><li>Configuring Amazon Cognito to Manage Users</li><li>Building a Serverless Backend</li><li>Deploying a RESTful API</li><li>Exploring the website and terminate the resources</li></ul><h4>1️⃣ Host a Static Website</h4><ul><li>In this module, you will configure AWS Amplify to host the static resources for your web application with continuous deployment built in. The Amplify Console provides a git-based workflow for continuous deployment and hosting of full-stack web apps.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5FyW3C2GH8oR6MArEwIAxQ.png" /></figure><p><strong>Select a region:</strong></p><ul><li>First of all when you land on the console’s home page, then select the region of your choice, in which you want to deploy your Web Application.</li></ul><p><strong>Create a git repository:</strong></p><p>To manage the source code, you have two options to operate the repository from;</p><ul><li>AWS CodeCommit</li><li>Github</li></ul><p>You can work with any of them. I will go with AWS CodeCommit. So,</p><ul><li>Open the AWS CodeCommit console</li><li>Select Create Repository</li><li>Set the Repository name to “wildrydes-site”</li><li>Select Create</li><li>Now that the repository is created, set up an IAM user with Git credentials in the IAM console following these instructions.</li><li>Back in the CodeCommit console, from the Clone URL dropdown, select Clone HTTPS</li><li>From a terminal window run git clone and the HTTPS URL of the repository:</li></ul><pre>$ git clone &lt;https clone URL&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*BSwwM91NIHg84r9BlLuWPw.png" /></figure><p><strong>Populate the git repository:</strong></p><p>Now, you’ll need to copy the website content from an existing publicly accessible S3 bucket associated with this workshop and add the content to your repository.</p><ul><li>Change directory into your repository and copy the static files from S3:</li></ul><pre>cd wildrydes-site</pre><p>Paste this link:</p><pre>aws s3 cp s3://wildrydes-us-east-1/WebApplication/1_StaticWebHosting/website ./ --recursive</pre><p>After successful execution of this command, the files will be downloaded to the repository from the S3 bucket.</p><p>Now run the following commands, to push the files to the git successfully.</p><pre>git add .<br>git commit -m &quot;comment/message&quot;<br>git push</pre><p><strong>Enable Web Hosting with AWS Amplify Console:</strong></p><ul><li>Navigate to the Amplify Console console page.</li><li>Click Get Started under Deploy with Amplify Console</li><li>Go to New App on the top right and choose Host Web App</li><li>Select CodeCommit under Get started with Amplify Hosting</li><li>Select the Repository service provider used today and select Continue</li><li>If you used GitHub, you’ll need to authorize AWS Amplify to your GitHub account</li><li>From the dropdown, select the Repository and Branch you just created and select Next.</li><li>On the Configure build settings page, leave all the defaults, Select Allow AWS Amplify to automatically deploy all files hosted in your project root directory and select Next.</li><li>On the “Review” page select Save and deploy</li><li>The process takes a couple of minutes for Amplify Console to create the necessary resources and to deploy your code.</li></ul><p>Once completed, click on the site image to launch your Wild Rydes site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xBslvQx5BqUoihjk0rb__w.png" /></figure><p><strong>Modify Your Site:</strong></p><p>The AWS Amplify Console will rebuild and redeploy the app when it detects changes to the connected repository.</p><p>Open `wildryde-site/index.html` in a text editor of your choice and modify the title line so that it says: &lt;title&gt;Wild Rydes — Rydes of the Future!&lt;/title&gt;.</p><p>· Save the file and commit to your git repository again.</p><p>· Run following commands:</p><pre>git add .<br>git commit -m &quot;comment/message&quot;<br>git push</pre><p>Now reopen the site and observe the changes in the title.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q2IGHQbgrNKg-K7wFGivRA.png" /></figure><p>So far, in this segment we have made a static website which is the base of this whole project. AWS Amplify Console makes it really easy to deploy static websites following a continuous integration and delivery model.</p><h4>2️⃣<strong>Configuring Amazon Cognito to Manage Users</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PiV5jQCr20FCWkl0Af3LPw.png" /></figure><p>When users visit your website they will first register a new user account. For the purposes of this project we’ll only require them to provide an email address and password to register.</p><p>After users submit their registration, Amazon Cognito will send a confirmation email with a verification code to the address they provided. To confirm their account, users will return to your site and enter their email address and the verification code they received. You can also confirm user accounts using the Amazon Cognito console with a fake email addresses for testing.</p><p>After users have a confirmed account (either using the email verification process or a manual confirmation through the console), they will be able to sign in. When users sign in, they enter their username (or email) and password.</p><p><strong>Creating an Amazon Cognito User Pool to integrate with web app:</strong></p><p>Amazon Cognito provides two different mechanisms for authenticating users. You can use Cognito User Pools to add sign-up and sign-in functionality to your application or use Cognito Identity Pools to authenticate users through social identity providers such as Facebook, Twitter, or Amazon, with SAML identity solutions, or by using your own identity system. For this module you’ll use a user pool as the backend for the provided registration and sign-in pages.</p><ul><li>In the AWS Console, enter Cognito in the search bar and select Cognito from the search results.</li><li>Choose Create user pool.</li><li>On the Configure sign-in experience page, in the Cognito user pool sign-in options section, select User name. Keep the defaults for the other settings, such as Provider types in the Authentication providers section. Choose Next.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IY6v8fxxOzzvRNst6Xf8ug.png" /></figure><p>On the Configure security requirements page, keep the Password policy mode as Cognito defaults. You can choose to configure multi-factor authentication (MFA) or choose No MFA and keep other configurations as default. Choose Next.</p><p>On the Configure sign-up experience page, keep everything as default. Choose Next.</p><p>On the Configure message delivery page, for Email provider, confirm that Send email with Amazon SES — Recommended is selected. In the FROM email address field, select an email address that you have verified with Amazon SES, following <a href="https://docs.aws.amazon.com/ses/latest/dg/creating-identities.html#just-verify-email-proc">these instructions from the Amazon SES Developer Guide</a>.</p><p>On the Integrate your app page, provide a name for your user pool such as WildRydes. Under Initial app client, give the app client a name such as WildRydesWebApp and keep other settings as default.</p><p>On the Review and create page, choose Create user pool.</p><p>Note the Pool ID and the App client ID on the Pool details page of your newly created user pool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YoT5tFxDNVkEmG7bC8kPbA.png" /></figure><p><strong>Configuring Website settings for User Pool:</strong></p><p>The /js/config.js file contains settings for the user pool ID, app client ID and Region.</p><p>So, we need to update this file in order to configure the User Pool details so that it integrates with it and work accordingly.</p><p>From your local machine, open `wildryde-site/js/config.js` in a text editor of your choice.</p><p>Update the cognito section with the correct values for the user pool and app you just created.</p><p>From the User Pool dashboard in the Amazon Cognito section, you will get the User Pool ID and for the ClientID navigate to the ‘App integration’ section of the User Pool.</p><p>You find the value/code of the region from the Pool ARN.</p><p>Save the modified file and push it to your git repo, by using those three commands of Git.</p><p><strong>Let’s check the implementation:</strong></p><p>Visit /register.html under your website domain, or choose the Giddy Up! button on the homepage of your site.</p><p>Complete the registration form and choose Let’s Ryde. You can use your own email or enter a fake email. Make sure to choose a password that contains at least one upper-case letter, a number, and a special character. Don’t forget the password you entered for later. You should see an alert that confirms that your user has been created.</p><p>Confirm your new user using one of the two following methods.</p><p>If you used an email address you control, you can complete the account verification process by visiting /verify.html under your website domain and entering the verification code that is emailed to you. Please note, the verification email may end up in your spam folder. For real deployments we recommend configuring your user pool to use Amazon Simple Email Service to send emails from a domain you own.</p><p>If you used a dummy email address, you must confirm the user manually through the Cognito console.</p><p>From the AWS console, click Services then select Cognito under Security, Identity &amp; Compliance.</p><p>Choose Manage your User Pools</p><p>Select the WildRydes user pool and click Users and groups in the left navigation bar.</p><p>You should see a user corresponding to the email address that you submitted through the registration page. Choose that username to view the user detail page.</p><p>Choose Confirm user to finalize the account creation process.</p><p>After confirming the new user using either the /verify.html page or the Cognito console, visit /signin.html and log in using the email address and password you entered during the registration step.</p><p>If successful, you should be redirected to /ride.html. You should see a notification that the API is not configured.</p><p><strong>Note: At this point, when I was validating the implementation, I came across an error, or I can say a property of SES which I was not aware of, that is, When I registered with my email and password into the register page of the website , I didn’t receive an email for the verification code, which I need to enter into the ‘verify.html’ page for my email verification. The reason behind it is that, by default AWS places all new accounts into the Amazon SES Sandbox. Due to which you can only send mails to verified email address only. So, for the first time you have to verify the email address from the Cognito console(manually) only.</strong></p><p>To move out of the sandbox environment, you can request AWS from the SES console, and after completing some steps in some time your account will be moved out of sandbox environment.</p><p><a href="https://docs.aws.amazon.com/ses/latest/dg/request-production-access.html">Refer this for moving out of the sandbox environment</a>.</p><h4>3️⃣ Setting up Serverless Backend</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yDLEeIuCUwALEk9kyAVlAA.png" /></figure><p>In this module, you will use AWS Lambda and Amazon DynamoDB to build a backend process for handling requests for your web application. The browser application that you deployed in the first module allows users to request that a unicorn be sent to a location of their choice. To fulfill those requests, the JavaScript running in the browser will need to invoke a service running in the cloud.</p><p>You will implement a Lambda function that will be invoked each time a user requests a unicorn. The function will select a unicorn from the fleet, record the request in a DynamoDB table, and then respond to the frontend application with details about the unicorn being dispatched.</p><p>The function is invoked from the browser using Amazon API Gateway. You’ll implement that connection in the next module. For this module, you will just test your function in isolation.</p><p><strong>Creating Amazon DynamoDB Table:</strong></p><ul><li>From the AWS Management Console, choose Services then select DynamoDB under Databases.</li><li>Choose Create table.</li><li>Enter Rides for the Table name. This field is case sensitive.</li><li>Enter RideId for the Partition key and select String for the key type. This field is case sensitive.</li><li>Check the Use default settings box and choose Create. Navigate to the Tables page in the DynamoDB console and wait for your table creation to complete. Once it is completed, select your table name.</li><li>Scroll to the bottom of the Overview section of your new table and choose Additional info. Note the ARN. You will use this in the next section.</li></ul><p><strong>Create an IAM Role for your Lambda function:</strong></p><p>Every Lambda function has an IAM role associated with it. This role defines that, which services can Lambda function access.</p><p>So, for this project we’ll need to create a new IAM Role that will have permission to write logs to CloudWatch Logs and to access the DynamoDB table which we have created earlier.</p><ul><li>From the AWS Management Console, click on Services and then select IAM in the Security, Identity &amp; Compliance section.</li><li>Select Roles in the left navigation pane and then choose Create Role.</li><li>Underneath Trusted Entity Type, select AWS service. For Use case, select Lambda, then choose Next.</li><li>Note: Selecting a role type automatically creates a trust policy for your role that allows AWS services to assume this role on your behalf. If you were creating this role using the CLI, AWS CloudFormation or another mechanism, you would specify a trust policy directly.</li><li>Begin typing AWSLambdaBasicExecutionRole in the Filter text box and check the box next to that role.</li><li>Choose Next Step.</li><li>Enter WildRydesLambda for the Role Name. Keep other parameters as default.</li><li>Choose Create Role.</li><li>Type WildRydesLambda into the filter box on the Roles page and choose the role you just created.</li><li>On the Permissions tab, on the left under Add permissions, choose Create Inline Policy.</li><li>Select Choose a service.</li><li>Begin typing DynamoDB into the search box labeled Find a service and select DynamoDB when it appears..</li><li>Choose Select actions.</li><li>Begin typing PutItem into the search box labeled Filter actions and check the box next to PutItem when it appears.</li><li>Select the Resources section.</li><li>With the Specific option selected, choose the Add ARN link in the table section.</li><li>Paste the ARN of the table you created in the previous section in the Specify ARN for table field, and choose Add.</li><li>Choose Review Policy.</li><li>Enter DynamoDBWriteAccess for the policy name and choose Create policy.</li></ul><p><strong>Create a Lambda Function:</strong></p><p>AWS Lambda will run your code in response to events such as an HTTP request. In this step you’ll build the core function that will process API requests from the web application to dispatch a unicorn.</p><p>In the next module you’ll use Amazon API Gateway to create a RESTful API that will expose an HTTP endpoint that can be invoked from your users’ browsers.</p><p>You’ll then connect the Lambda function you create in this step to that API in order to create a fully functional backend for your web application.</p><ul><li>Choose Services then select Lambda in the Compute section.</li><li>Click Create function.</li><li>Keep the default Author from scratch card selected.</li><li>Enter RequestUnicorn in the Name field.</li><li>Select Node.js 16.x for the Runtime (newer versions of Node.js will not work in this tutorial)</li><li>Ensure ‘Use an existing role’ is selected from the Change default execution role dropdown.</li><li>Select WildRydesLambda from the Existing Role dropdown.</li><li>Click on Create function.</li><li>Scroll down to the Code source section and replace the existing code in the index.js code editor with the contents of requestUnicorn.js.</li><li>Choose Deploy.</li></ul><p><strong>Let’s test the implementation:</strong></p><p>Now we’ll test the function we have built in this segment.</p><p>Follow the steps to test:</p><ul><li>From the main edit screen for your function, select Test and choose Configure test event from the dropdown.</li><li>Keep Create new event selected.</li><li>Enter TestRequestEvent in the Event name field</li><li>Copy and paste the following test event into the editor:</li></ul><pre>{<br>&quot;path&quot;: &quot;/ride&quot;,<br>&quot;httpMethod&quot;: &quot;POST&quot;,<br>&quot;headers&quot;: {<br>&quot;Accept&quot;: &quot;*/*&quot;,<br>&quot;Authorization&quot;: &quot;eyJraWQiOiJLTzRVMWZs&quot;,<br>&quot;content-type&quot;: &quot;application/json; charset=UTF-8&quot;<br>},<br>&quot;queryStringParameters&quot;: null,<br>&quot;pathParameters&quot;: null,<br>&quot;requestContext&quot;: {<br>&quot;authorizer&quot;: {<br>&quot;claims&quot;: {<br>&quot;cognito:username&quot;: &quot;the_username&quot;<br>}<br>}<br>},<br>&quot;body&quot;: &quot;{\&quot;PickupLocation\&quot;:{\&quot;Latitude\&quot;:47.6174755835663,\&quot;Longitude\&quot;:-122.28837066650185}}&quot;<br>}</pre><ul><li>Choose Save.</li><li>On the main function edit screen click Test with TestRequestEvent selected in the dropdown.</li><li>Scroll to the top of the page and expand the Details section of the Execution result section.</li><li>Verify that the execution succeeded and that the function result looks like the following:</li></ul><pre>{<br>&quot;statusCode&quot;: 201,<br>&quot;body&quot;: &quot;{\&quot;RideId\&quot;:\&quot;SvLnijIAtg6inAFUBRT+Fg==\&quot;,\&quot;Unicorn\&quot;:{\&quot;Name\&quot;:\&quot;Rocinante\&quot;,\&quot;Color\&quot;:\&quot;Yellow\&quot;,\&quot;Gender\&quot;:\&quot;Female\&quot;},\&quot;Eta\&quot;:\&quot;30 seconds\&quot;}&quot;,<br>&quot;headers&quot;: {<br>&quot;Access-Control-Allow-Origin&quot;: &quot;*&quot;<br>}<br>}</pre><h4>4️⃣ Deploy a RESTful Web API</h4><p>In this module, you will use Amazon API Gateway to expose the Lambda function you built in the previous module as a RESTful API. This API will be accessible on the public Internet.</p><p>It will be secured using the Amazon Cognito user pool you created in the previous module. Using this configuration, you will then turn your statically hosted website into a dynamic web application by adding client-side JavaScript that makes AJAX calls to the exposed APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bJcR1CD4ryg66F8ti0p4UQ.png" /></figure><p><strong>Create a New REST API:</strong></p><ul><li>In the AWS Management Console, click Services then select API Gateway under Application Services.</li><li>Choose Create API. Underneath the Create new API section, make sure New API is selected.</li><li>Select Build under REST API and enter WildRydes for the API Name.</li><li>Choose Edge optimized in the Endpoint Type dropdown. Note: Edge optimized are best for public services being accessed from the Internet. Regional endpoints are typically used for APIs that are accessed primarily from within the same AWS Region.</li><li>Choose Create API.</li></ul><p><strong>Create a new resource and method:</strong></p><p>Create a new resource called /ride within your API. Then create a POST method for that resource and configure it to use a Lambda proxy integration backed by the RequestUnicorn function you created in the first step of this module.</p><ul><li>In the left nav, click on Resources under your WildRydes API.</li><li>From the Actions dropdown select Create Resource.</li><li>Enter ride as the Resource Name.</li><li>Ensure the Resource Path is set to ride.</li><li>Select Enable API Gateway CORS for the resource.</li><li>Click Create Resource.</li><li>With the newly created /ride resource selected, from the Action dropdown select Create Method.</li><li>Select POST from the new dropdown that appears, then click the checkmark.</li><li>Select Lambda Function for the integration type.</li><li>Check the box for Use Lambda Proxy integration.</li><li>Select the Region you are using for Lambda Region.</li><li>Enter the name of the function you created in the previous module, RequestUnicorn, for Lambda Function.</li><li>Choose Save. Please note, if you get an error that your function does not exist, check that the region you selected matches the one you used in the previous module.</li><li>When prompted to give Amazon API Gateway permission to invoke your function, choose OK.</li><li>Choose on the Method Request card.</li><li>Choose the pencil icon next to Authorization.</li><li>Select the WildRydes Cognito user pool authorizer from the drop-down list, and click the checkmark icon.</li></ul><p><strong>Deploy your API:</strong></p><p>From the Amazon API Gateway console, choose Actions, Deploy API. You’ll be prompted to create a new stage. You can use prod for the stage name.</p><ul><li>In the Actions drop-down list select Deploy API.</li><li>Select [New Stage] in the Deployment stage drop-down list.</li><li>Enter <em>prod </em>for the Stage Name.</li><li>Choose Deploy.</li><li>Note the Invoke URL. You will use it in the next section.</li></ul><p>Save the modified file and push it to the git repository.</p><pre>$ git add .<br>$ git commit -m &quot;new_configuration&quot;<br>$ git push</pre><p><strong>Update the website config:</strong></p><ul><li>Open the config.js file in a text editor.</li><li>Update the <strong>invokeUrl </strong>setting under the <strong>api </strong>key in the config.js file. Set the value to the Invoke URL for the deployment stage your created in the previous section.</li></ul><p><strong>Let’s test the implementation:</strong></p><p>Update the ArcGIS JS version from ‘4.3’ to ‘4.6’ (newer versions will not work) in the ride.html file as:</p><p>These two lines include the version, so modify these two lines.</p><pre>&lt;script src=&quot;https://js.arcgis.com/4.6/&quot;&gt;&lt;/script&gt;<br>&lt;link rel=&quot;stylesheet&quot; href=&quot;https://js.arcgis.com/4.6/esri/css/main.css&quot;&gt;</pre><p>Save the modified file and push it to your Git repository to have it automatically deploy to Amplify Console.</p><p>Visit /ride.html under your website domain.</p><p>If you are redirected to the ArcGIS sign-in page, sign in with the user credentials you created previously in the Introduction section as a prerequisite of this tutorial.</p><p>After the map has loaded, click anywhere on the map to set a pickup location.</p><p>Choose Request Unicorn. You should see a notification in the right sidebar that a unicorn is on its way and then see a unicorn icon fly to your pickup location.</p><h4>5️⃣ Terminate the resources</h4><p>After exploring the website, terminate all the resources created throughout this hands-on, so that you don’t get billed in case you exceed the Free-Tier limit.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bfad7ae4fc8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step by Step Guide: Deploying WordPress with Amazon RDS]]></title>
            <link>https://medium.com/@jayprajapati2323/step-by-step-guide-deploying-wordpress-with-amazon-rds-c8bb258d5a75?source=rss-1cccdfdcdc1e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8bb258d5a75</guid>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[rds-mysql]]></category>
            <category><![CDATA[ec2]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <category><![CDATA[wordpress]]></category>
            <dc:creator><![CDATA[Jayprajapati]]></dc:creator>
            <pubDate>Wed, 14 Jun 2023 07:40:18 GMT</pubDate>
            <atom:updated>2023-06-14T07:50:40.519Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Comprehensive Tutorial for Building a High-Performance WordPress Website using a fully managed MySQL database with Amazon RDS</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6yfOUPV1amtbvIixKF4fNA.jpeg" /></figure><h3>Introduction</h3><p>Welcome to the world of AWS and web development! In this blog post, I’ll guide you through the process of deploying WordPress with Amazon RDS (Relational Database Service).</p><p>To configure this WordPress site, we’ll create the following resources in AWS:</p><ul><li>An Amazon EC2 instance to install and host the WordPress application</li><li>An Amazon RDS for MySQL database to store your WordPress data</li></ul><h3><strong>Services Used</strong></h3><ul><li>Amazon EC2</li><li>Amazon RDS</li></ul><h3><strong>Prerequisites</strong></h3><p>To get started, create an AWS account if you haven’t already. Simply head over to the AWS website and sign up. Once you have your account ready, log in to the AWS Management Console, and we’re ready to roll.</p><p><strong>This tutorial is divided into 5 segments:</strong></p><ol><li>Creating a MySQL database with Amazon RDS.</li><li>Creating an EC2 Instance</li><li>Configuring Your Amazon RDS Database</li><li>Configuring WordPress on EC2</li><li>Explore Your New Website and Clean Up</li></ol><h4>1️⃣ <strong>Launch an Amazon RDS MySQL Database Instance</strong></h4><p>Our first step is to set up an Amazon RDS database instance to store the WordPress data.</p><p>Follow these steps:</p><ul><li>Navigate to the Amazon RDS service in the AWS Management Console.</li><li>Click on “Create database”.</li><li>Select the “Standard Create” as the database creation method.</li><li>Select the engine that suits your needs (MySQL, MariaDB, etc.). We’ll select the MySQL as the database engine for the WordPress application.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UQxyyChPobdKEITn0ugrKw.png" /><figcaption>Database creation method and Engine Options</figcaption></figure><ul><li>Then keep the below settings as default and skip to the Templates section.</li><li>Select the “Free Tier” as the Template for the database. In the Free Tier template, only single DB instance is supported, ‘multi-AZ DB instance’ and ‘Multi-AZ DB cluster’ option is not available. They’re supported in the Production and Dev/Test environment only.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ICNCO1bHk5VFIGNauzP38g.png" /><figcaption>Database Template</figcaption></figure><ul><li>Then move to the settings tab given below.</li><li>Set the Database name in the field of the DB Instance identifier field. I will give the name ‘wordpress’.</li><li>Then comes the credentials setting of the database.</li><li>Set the username and password and store them somewhere for future use.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*05XY6geMDdllw2mSCzJkew.png" /><figcaption>DB credentials configuration</figcaption></figure><ul><li>Configure the database instance settings, including the instance class and instance type. Here we’ll set the burstable classes as the instance class and ‘db.t2.micro’ or any of the type which comes under the free tier.</li><li>Then move to the Storage settings.</li><li>EBS Volumes are the default and the only type of storage for the DB instance storage. Instance Store is not supported as the storage for the DB instance storage. Keep the settings as default in the storage section.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ndCmmSTrNsVXOzpYL102ww.png" /><figcaption>Instance and Volume configurations</figcaption></figure><ul><li>Next, you can configure connectivity and network settings. Amazon RDS instances must be created in an Amazon VPC, which is a logically separate network where your provisioned resources will live.</li><li>VPCs are an advanced topic outside the scope of this guide. Fortunately, AWS has created a default VPC in each Region in your account. The default VPC is already selected for you, and you can launch your Amazon RDS instance in this VPC.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LhGu4fldR_H3lvSOYlY9hA.png" /><figcaption>Connectivity</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pARMVOtPfAYrZhhFXSoe3A.png" /><figcaption>VPC and Securtiy Group configuration</figcaption></figure><ul><li>Finally, Amazon RDS provides a number of additional configuration options to customize your deployment. You need to make one change in this area. Select the Additional configuration line to expand the options. Set the Initial database name to wordpress. This will ensure Amazon RDS creates the database in your MySQL instance upon initialization. You will use this database name when connecting to your database.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1W4lz-6hogktGSf17_xowQ.png" /></figure><ul><li>Retain the other settings as default.</li><li>Click on the Final Create Database button, to create the DB instance.</li></ul><h4>2️⃣<strong> Set up an EC2 Instance for WordPress</strong></h4><ul><li>Now, let’s set up an EC2 instance to host our WordPress website:</li><li>Navigate to the EC2 service in the AWS Management Console.</li><li>Choose the Launch instance button to open the instance creation wizard.</li><li>On the first page, enter a name for your instance in the name section.</li><li>Next, choose an Amazon Machine Image (AMI). The AMI you choose will determine the base software that is installed on your new EC2 instance. This includes the operating system and the applications that are installed on the machine.</li><li>We’ll select the Amazon Linux 2 AMI (HVM) which is supported by the Free Tier.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mRCIFg4YhjKTkIo1C3b6Cw.png" /><figcaption>AMI</figcaption></figure><ul><li>Scroll down to select an EC2 instance type. An instance type is a particular configuration of CPU, memory (RAM), storage, and network capacity.</li><li>Select the t2.micro instance.</li><li>Open the key pair (login) section and choose Create new key pair for your instance.</li><li>Give your key pair a name. Then choose the Create key pair button, which will download the .pem file to your machine. You will use this file in the next module.</li><li>In the Network settings below, we’ll configure the security group.</li><li>Here we need to configure the security group rules such that it allows,<br>-SSH traffic from your current IP address, so that you can use the SSH protocol to log into the EC2 instance.<br>-HTTP traffic from the source ‘anywhere’.</li><li>To configure this, select Allow SSH traffic from My IP and select Allow HTTP traffic from the internet.</li><li>In the Network settings section, choose the Edit button. Scroll down to Firewall (security groups) and enter the name for the Security group.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nlscPTE3v7eIgRpZMkUjHQ.png" /><figcaption>Security Group configurations</figcaption></figure><ul><li>Choose the Launch instance button to create your EC2 instance.</li><li>Now the RDS Database and EC2 instance are ready itself. But we need to configure the traffic flow to the RDS Database from the EC2 instance only on which the Wordpress website will be hosted.</li><li>So to accomplish this, the security group of the RDS DB instance needs to be modified to accept the traffic from the EC2 instance security group only.</li></ul><h4>3️⃣ <strong>Connecting RDS Database with the WordPress EC2 instance</strong></h4><ul><li>To configure this, go to the Amazon RDS databases page in the AWS console. Choose the MySQL database you created in the earlier module in this guide.</li><li>Scroll to the Connectivity &amp; security tab in the display and choose the security group listed in VPC security groups. The console will take you to the security group configured for your database.</li><li>Select the Inbound rules tab, then choose the Edit inbound rules button to change the rules for your security group.</li><li>The default security group has a rule that allows all inbound traffic from other instances in the default security group. However, since your WordPress EC2 instance is not in that security group, it will not have access to the Amazon RDS database.</li><li>Change the Type property to MYSQL/Aurora, which will update the Protocol and Port range to the proper values. Then, remove the current security group value configured for the Source.</li><li>For Source, enter wordpress. The console will show the available security groups that are configured. Choose the wordpress security group that you used for your EC2 instance.</li><li>After you choose the wordpress security group, the security group ID will be filled in. This rule will allow MySQL access to any EC2 instance with that security group configured.</li><li>When you’re finished, choose the Save rules button to save your changes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nCKv6Myckmkc5C2mvqgveQ.png" /><figcaption>Configuring DB security group</figcaption></figure><h4>SSH into the EC2 instance</h4><ul><li>For Windows users you’ll need to use Putty, an SSH client for Windows, to connect to your instance.</li><li>For Mac or Linux users:<br>- Open a terminal window. If you are on a Mac, you can use the default Terminal program that is installed, or you can use your own terminal.<br>- In your terminal, run the following commands to use SSH to connect to your instance. Replace the “&lt;path/to/pem/file&gt;” with the path to your file, e.g., “~/Downloads/wordpress.pem”, and the “&lt;publicIpAddress&gt;” with the public IP address for your EC2 instance.</li><li>Commands:</li></ul><pre>chmod 400 &lt;path/to/pem/file&gt; <br>ssh -i &lt;path/to/pem/file&gt; ec2-user@&lt;public_IP_DNSAddress&gt;</pre><ul><li>With the EC2 instance up and running, it’s time to connect and install WordPress:</li><li>Connect to the EC2 instance using SSH.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*MWkRzvUMsBiiPL3CtXPPAw.png" /></figure><h4><strong>Create a Database User</strong></h4><ul><li>First of all, you should have an active SSH session to your EC2 instance in your terminal.</li><li>Now you’ll connect to your MySQL database.</li><li>First, run the following command in your terminal to install a MySQL client to interact with the database.</li></ul><pre>sudo yum install -y mysql</pre><ul><li>Next, find the hostname for your Amazon RDS database in the AWS console. In the details of your Amazon RDS database, the hostname will be shown as the Endpoint in the Connectivity &amp; security section.</li><li>Note down the hostname of the database somewhere… for later use.</li><li>In your terminal, enter the following command to set an environment variable for your MySQL host. Be sure to replace “&lt;your-endpoint&gt;” with the hostname of your RDS instance.</li></ul><pre>export MYSQL_HOST=&lt;your-endpoint&gt;</pre><ul><li>Next, run the following command in your terminal to connect to your MySQL database. Replace “&lt;user&gt;” and “&lt;password&gt;” with the master username and password you configured when creating your Amazon RDS database.</li></ul><pre>mysql --user=&lt;user&gt; --password=&lt;password&gt; wordpress</pre><ul><li>Finally, create a database user for your WordPress application and give the user permission to access the wordpress database.</li><li>Run the following commands in your terminal:</li></ul><pre>CREATE USER &#39;wordpress&#39; IDENTIFIED BY &#39;wordpress-pass&#39;;<br>GRANT ALL PRIVILEGES ON wordpress.* TO wordpress;<br>FLUSH PRIVILEGES;<br>Exit</pre><ul><li>In the next module, you will configure your EC2 instance to run the WordPress application.</li></ul><h4>4️⃣ <strong>Configuring WordPress on EC2</strong></h4><h4><strong>Installing Web Server on the EC2 instance</strong></h4><ul><li>To run WordPress, you need to run a web server on your EC2 instance. The open source Apache web server is the most popular web server used with WordPress.</li><li>To install Apache on the EC2 instance, run the following command:</li></ul><pre>sudo yum install -y httpd</pre><ul><li>To start the Apache web server, run the following command in your terminal:</li></ul><pre>sudo service httpd start</pre><ul><li>You can confirm the working of the Apache web server by visiting the public DNS/ IP of the EC2 instance.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*upjbSj4FHp1ZZ7TRk1B0Jg.png" /><figcaption>Apache Web Server Test Page</figcaption></figure><h4><strong>Download and Configure WordPress</strong></h4><ul><li>In this step we will download and configure the WordPress on the Web Server.</li><li>To download the WordPress run the following command on the terminal:</li></ul><pre>wget https://wordpress.org/latest.tar.gz</pre><ul><li>Now, to uncompress the folder, run the following command:</li></ul><pre>tar -xzf latest.tar.gz</pre><ul><li>To view the contents of the directory, run the ‘ls’ command. The you will see a tar file and a directory called ‘wordpress’.</li><li>Then change the directory to wordpress by executing the following command:</li></ul><pre>cd wordpress</pre><ul><li>Then we need to create a copy of the default sample-config file into the wp-config file, by running the following command:</li></ul><pre>cp wp-config-sample.php wp-config.php</pre><ul><li>This command copies the content of the ‘wp-config-sample.php’ into the ‘wp-config.php’.</li><li>Then we need to edit some content of the wp-config file, therefore open the wp-config file using the nano editor.</li></ul><pre>nano wp-config.php</pre><ul><li>You need to edit two areas of configuration.</li><li>First, edit the database configuration by changing the following lines:</li></ul><pre>// ** MySQL settings - You can get this info from your web host ** //<br>/** The name of the database for WordPress */<br>define( &#39;DB_NAME&#39;, &#39;database_name_here&#39; );<br>/** MySQL database username */<br>define( &#39;DB_USER&#39;, &#39;username_here&#39; );<br>/** MySQL database password */<br>define( &#39;DB_PASSWORD&#39;, &#39;password_here&#39; );<br>/** MySQL hostname */<br>define( &#39;DB_HOST&#39;, &#39;localhost&#39; );</pre><ul><li><strong>The values should be:</strong></li><li>DB_NAME: “wordpress”</li><li>DB_USER: The name of the user you created in the database in the previous module</li><li>DB_PASSWORD: The password for the user you created in the previous module</li><li>DB_HOST: The hostname of the database that you found in the previous module</li><li>The second configuration section you need to configure is the Authentication Unique Keys and Salts. It looks as follows in the configuration file:</li></ul><pre>/**#@+<br> * Authentication Unique Keys and Salts.<br> *<br> * Change these to different unique phrases!<br> * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}<br> * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.<br> *<br> * @since 2.6.0<br> */<br>define( &#39;AUTH_KEY&#39;,         &#39;put your unique phrase here&#39; );<br>define( &#39;SECURE_AUTH_KEY&#39;,  &#39;put your unique phrase here&#39; );<br>define( &#39;LOGGED_IN_KEY&#39;,    &#39;put your unique phrase here&#39; );<br>define( &#39;NONCE_KEY&#39;,        &#39;put your unique phrase here&#39; );<br>define( &#39;AUTH_SALT&#39;,        &#39;put your unique phrase here&#39; );<br>define( &#39;SECURE_AUTH_SALT&#39;, &#39;put your unique phrase here&#39; );<br>define( &#39;LOGGED_IN_SALT&#39;,   &#39;put your unique phrase here&#39; );<br>define( &#39;NONCE_SALT&#39;,       &#39;put your unique phrase here&#39; );</pre><ul><li>To get the unique values, visit t<a href="https://api.wordpress.org/secret-key/1.1/salt/">his Link</a> and then update the second area according to the values generated from this link.</li><li>You can save and exit from nano by entering CTRL+O followed by CTRL+X.</li><li>Now you’re almost ready to deploy your WordPress website.</li></ul><h4>Deploying WordPress</h4><ul><li>Install the application dependencies you need for WordPress:</li></ul><pre>sudo amazon-linux-extras install -y lamp-mariadb10.2-php7.2 php7.2</pre><ul><li>Second, change to the proper directory by running the following command:</li></ul><pre>cd /home/ec2-user</pre><ul><li>Then, copy your WordPress application files into the /var/www/html directory used by Apache.</li></ul><pre>sudo cp -r wordpress/* /var/www/html/</pre><ul><li>Finally, restart the Apache web server to pick up the changes.</li></ul><pre>sudo service httpd restart</pre><ul><li>That’s it, Your WordPress Website is live…</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W3iVvPu7gve7B0Q9q9vk6g.png" /><figcaption>WordPress Installation page</figcaption></figure><h4>5️⃣ Terminate the resources</h4><ul><li>After exploring the website, terminate all the resources created throughout this hands-on, so that you don’t get billed in case you exceed the Free-Tier limit.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8bb258d5a75" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>