{"componentChunkName":"component---src-templates-tag-js","path":"/tags/aws/","result":{"data":{"site":{"siteMetadata":{"title":"LoginRadius Blog"}},"allMarkdownRemark":{"totalCount":5,"edges":[{"node":{"fields":{"slug":"/engineering/smart-cache-redis-cloud-aws-elasticache-for-redis/"},"html":"<p>LoginRadius is one of the leading and technologically advanced Customer Identity and Access Management (CIAM) solutions. Enterprise customers rely on our CIAM to manage end-user authentication and authorization. They typically serve hundreds of thousands to millions of end-users, making our CIAM a critical part of their IT infrastructure and value delivery.</p>\n<p>Our backend consists of multiple microservices handling various identity and access management functions and workflows through APIs. And we use MongoDB as persistent storage for configuration data. For faster access and availability of this data, we deployed Redis in-memory cache through Redis Enterprise Cloud.</p>\n<h2 id=\"challenges-with-cache-updates\" style=\"position:relative;\"><a href=\"#challenges-with-cache-updates\" aria-label=\"challenges with cache updates permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Challenges with Cache Updates</h2>\n<p>We had our configuration cache set up in Redis Cloud. And to reduce the Redis Cloud latency, we kept the configuration cache at the application level in memory — but we ran into problems.</p>\n<p>Generally, customers don’t update their configurations so frequently. But when a customer updates their configuration, it doesn’t propagate in the backend until the server memory cache is purged — sometimes even taking several hours.</p>\n<p><em>This is bad for business:</em> A customer updates configurations in response to a new requirement or rapidly changing business environment. If these changes take so much time for a digital identity process, it can affect end-users and, in turn, business outcomes. Simply imagine that a customer updated app configuration to accommodate a one-time flash sale, and end-users can’t place orders properly due to configuration update issues!</p>\n<p>So, we started evaluating various options to address these issues. We considered running multiple instances in the Redis Cloud and synchronizing them to minimize latency for all regions while ensuring customer configuration updates go live immediately. But this proved to be technically cumbersome and costly.</p>\n<p>We continued our research with various solutions and concluded that AWS ElastiCache for Redis best serves our needs.</p>\n<h2 id=\"migrating-to-aws-elasticache-for-redis\" style=\"position:relative;\"><a href=\"#migrating-to-aws-elasticache-for-redis\" aria-label=\"migrating to aws elasticache for redis permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Migrating to AWS ElastiCache for Redis</h2>\n<p>AWS provides ElastiCache for Redis as a Redis Cloud alternative with all necessary capabilities. Also, we were already using AWS Cloud for some of our IT infrastructure needs.\nSo, we can deploy ElastiCache alongside the same infrastructure to solve the latency issues.</p>\n<p>Accordingly, we have created ElastiCache instances in multiple AWS regions and set up the primary ElastiCache DB to quickly sync configuration updates in the secondary ElastiCache instances. Also, we deployed ElastiCache instances in multiple locations as needed.</p>\n<p>For migration, we updated the old Redis and ElastiCache primary instances simultaneously. Once we reached a sufficient confidence level with the new setup, we completely switched over to ElastiCache.</p>\n<h2 id=\"conclusion\" style=\"position:relative;\"><a href=\"#conclusion\" aria-label=\"conclusion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Conclusion</h2>\n<p>Our applications and cache are deployed in AWS, so our API response latency is no longer problematic. Ultimately, we can reduce application in memory cache updates to a few minutes or seconds as required.</p>\n<p>Now customers get updated configurations deployed rapidly, solving our primary challenge!</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"August 09, 2023","updated_date":null,"title":"Breaking Down the Decision: Why We Chose AWS ElastiCache Over Redis Cloud","tags":["Cache","AWS","Redis","LoginRadius"],"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/f73d944745cd7f94227e1f20e4214968/14b42/migrating-to-aws-elasticache-for-redis.jpg","srcSet":"/static/f73d944745cd7f94227e1f20e4214968/f836f/migrating-to-aws-elasticache-for-redis.jpg 200w,\n/static/f73d944745cd7f94227e1f20e4214968/2244e/migrating-to-aws-elasticache-for-redis.jpg 400w,\n/static/f73d944745cd7f94227e1f20e4214968/14b42/migrating-to-aws-elasticache-for-redis.jpg 800w,\n/static/f73d944745cd7f94227e1f20e4214968/47498/migrating-to-aws-elasticache-for-redis.jpg 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Kundan Singh","github":null,"avatar":null}}}},{"node":{"fields":{"slug":"/engineering/ec2-instance-aws/"},"html":"<p>AWS EC2 is a virtual computing environment (known as instances) to develop and deploy applications. To create an EC2 instance in AWS, we need an active Amazon Web Services account. </p>\n<h2 id=\"ec2-dashboard\" style=\"position:relative;\"><a href=\"#ec2-dashboard\" aria-label=\"ec2 dashboard permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>EC2 Dashboard</h2>\n<p>First, let's login into our AWS account. Once login, we will land on the Management Console page, we can see all the AWS services. </p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 48.3076923076923%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAIAAAA7N+mxAAAACXBIWXMAAA7DAAAOwwHHb6hkAAABpElEQVQoz3VR207bQBD1J/cBKtFCpYiGB4TEN/DCA1KVRtDGNGmA9ival1YUx6zjvcx67xenE4xQXzo7to6O5syZ3SnOz96fno5e7Y1fvzva3R/vYB6MEeweHP2bO0/Mm9Hx28OT/cMT/O+NjgvnPeMCABhnAkTXSQwueN/3m/9Ej2ebmwJ1j4S0lEnUdV2n1ACU1i+JJCHNQ1Wt6poyhgyqOECBaL1eY32MIaW0NRw8++dAgHxV1b9+3z9UKwBhrR08tmLQTtrYuaicNyG6lG1MNiWfe5+fcAhCAJOKQSdBGvMiNrZu7knz0wZqU8aZGFJ5o2OumSAcVEzYkVLWUhpjxCm898PVCuucU0Q0PzaJ47BGKcF58B4xAhAQQ8g5k6b9U62UUtaYEMKzs9ZGG7eqW5DaeYcO9SMBiU8Q25YCSLw2VotOU7HdhFIanbFAgCxSTtjYGD3sBjsxxoZNoI/WelgPQs4FioUQ2AtVIYZiNr+ZXl1//HRdLu6+LL9NLssL/BZ35eL2w/Tz+cUEC+bL79NyOZkty/kt8lh2VX69nC3+AvRfFPiZA07/AAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"AWS Management Console\"\n        title=\"AWS Management Console\"\n        src=\"/static/f01a35052034bea9b8a8545fd7a94d66/e5715/1_console.png\"\n        srcset=\"/static/f01a35052034bea9b8a8545fd7a94d66/a6d36/1_console.png 650w,\n/static/f01a35052034bea9b8a8545fd7a94d66/e5715/1_console.png 768w,\n/static/f01a35052034bea9b8a8545fd7a94d66/28e7f/1_console.png 1848w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>There is a drop-down on the top left corner, which is one more option to search and browse all the services provided by AWS. You can find <code>EC2</code> under the <code>Compute</code> category.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 45.38461538461539%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAIAAAC9o5sfAAAACXBIWXMAAA7DAAAOwwHHb6hkAAABc0lEQVQoz2VR2W6DMBDkR8gFOYAEmzOYwzaEHCSBNE0iVarSvvSh/f8f6ASkSm2llTVmPTsziyLKvD6wKGMa4ToVEzefeoVGxaOIwBe9w22hZYZrIyiNYAWghP42LW5WtMN9uEgttnXkceiIgSNGruyRDDVorwB9wnGqdqrameYIhS636eZis82YisGcR7K43EoaxUOb+6KeR+sRyRZsw9bP5nI9dqWbHaDcM1nZvCowM3EkXmgYRvjMz31RzXwJt4FsfFmjO/NXUXm2lhuEYuU5zE89Kz5c3xUQNJK156PGjvREs4h3ADTZL9gWWcywDPIGuUawIxuXH1SDnV4+lB8aamRnsESTSm+xx492vJu4siMDtBMrkuxUk13fvn6RH7bbfXbY5UcoYxA0l6snmJ96eVicsIu+FV/v/8j4GZ6soQCMR4ht+CvQwEFLp9wTRzgazJO/yp1tklQAEMRiAllDFuZpukd4LAwTnbRSjehy//wG2kh0BZ+OKHwAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"AWS Services\"\n        title=\"AWS Services\"\n        src=\"/static/ceecda6785c4a989fae06b6ba1327fa1/e5715/2_services.png\"\n        srcset=\"/static/ceecda6785c4a989fae06b6ba1327fa1/a6d36/2_services.png 650w,\n/static/ceecda6785c4a989fae06b6ba1327fa1/e5715/2_services.png 768w,\n/static/ceecda6785c4a989fae06b6ba1327fa1/260cd/2_services.png 1845w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>Once we click on <code>EC2</code> you will be redirected to the <strong>EC2 Dashboard</strong>. It shows the information related to all the EC2 resources for a specific Region in our account.</p>\n<blockquote>\n<p>Note: If we change the region from the top right corner of the dashboard, it will show the selected region's information. In the below snapshot, we have selected <code>Mumbai</code> region. </p>\n</blockquote>\n<p>There is a button <code>Launch Instance</code> to create a new instance in the selected region on the dashboard's bottom section. </p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 44.92307692307693%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAIAAAC9o5sfAAAACXBIWXMAAA7DAAAOwwHHb6hkAAABd0lEQVQoz41RTWsUQRCdny0SXJNF1w0hcQ8iBO/+Fg+C4MVcYj4Yd2Z2p7+qurp6+mOsCaxnH4/qaqiq97q6Od/u1tvdanPz+vzy1Wpzsd0t/HDiKV+9vz5bX73d3JxdXH3+tL69vXzz7mMzz2Weaykl5zT/B+oLBeR94z3VuSLicFQjBB+YYxQKFNBegdynBWlKSRvXDnrKoje3bdsAgKiGEEZtLaVS6z8RCHFEPolVsYc+OIq5LDVd1zXGGCLiEI7GjhiBGHnyMVFMhqKU0ksuDFPGwAqjRhaNru8bQJTmNEUtJh0/H9zjEVvje0sD8AFYYu+CUFFygP0weL88zjontpE8ppSMtcN4MGCZRYBDjBZg3/fKGBmPngJHbfT9/e+u64mCJ2qsA+lMuaJ+0E8/YH+X/B/2KuciCjLROSdBquVHxOZ+GI+jkk0tzXJMMeY6Q/fTffsC37+y/sVBTanIFtH7nDMEC+RSSdbah8fncVQy0QH8BXD36xwqt2hzAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"EC2 Dashborad\"\n        title=\"EC2 Dashborad\"\n        src=\"/static/500d92c7e3393280e192801a819409f0/e5715/3_dashboard.png\"\n        srcset=\"/static/500d92c7e3393280e192801a819409f0/a6d36/3_dashboard.png 650w,\n/static/500d92c7e3393280e192801a819409f0/e5715/3_dashboard.png 768w,\n/static/500d92c7e3393280e192801a819409f0/69d6b/3_dashboard.png 1912w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h2 id=\"how-to-launch-an-ec2-instance\" style=\"position:relative;\"><a href=\"#how-to-launch-an-ec2-instance\" aria-label=\"how to launch an ec2 instance permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>How to launch an EC2 Instance</h2>\n<p>After clicking the Launch button, we need to select the Amazon Machine Image (AMI) it includes the operating system and applications required to launch an instance. Here we will select the Ubuntu Server 20.04 LTS as shown in the below snapshot.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 41.69230769230769%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAIAAAB2/0i6AAAACXBIWXMAAA7DAAAOwwHHb6hkAAABJUlEQVQY02WRS2+EIBSF+f+/qGnSfXd9JF10Hmk741hFQBB5y9gDTmbTE3MQc8/lu0gEo5NS0zRpraeyYqdyztfrdVkW+PpP+O7CkpZM2DAIIbz3VvN51ohLKZFHrxn76tsL2lvn1jX/0PnhnSptyDAMTdOM43g8HrquQ5JzpquMsRCSxpjNIe+snP1Xp2JMhLGhbVuUSsaQRBdVXYzjVg6oEGPwVSEAm07x+SBdSASEJaDU7rDv+77MLFUxKdHRWheqYhXSa05nZh5ff12IBEWinva5310uF844Di0gt3CRqQMUeD17a/vRvn0LD+w6JMd9a0YL78bMOfx+YYjdbsFaYLe0eXr5cIaSjQrjnE4npSR+Q4GsT0oJ283vQtha3g/nHNUf8ObG21Q+K14AAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"EC2 AMIs\"\n        title=\"EC2 AMIs\"\n        src=\"/static/d4667e1ad4b579dbee46839cbcfea13e/e5715/4_ami.png\"\n        srcset=\"/static/d4667e1ad4b579dbee46839cbcfea13e/a6d36/4_ami.png 650w,\n/static/d4667e1ad4b579dbee46839cbcfea13e/e5715/4_ami.png 768w,\n/static/d4667e1ad4b579dbee46839cbcfea13e/ec09f/4_ami.png 1916w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>The next step is to choose the type of instance we need. AWS provides many types of instances based on different use cases with various CPU combinations, memory, storage, and networking capacity. We will here select the <code>t2.micro instance</code>, which is a free tier eligible instance.</p>\n<blockquote>\n<p>while writing this tutorial, Amazon provides 750 hours per month of free usage on the t2.micro instance. It makes it very affordable to run small/sample applications for an initial period.</p>\n</blockquote>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 41.23076923076923%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAIAAAB2/0i6AAAACXBIWXMAAA7DAAAOwwHHb6hkAAABLklEQVQY0zVQCUpFMQx897+Q5xBRUARF+b69e9Km23PqMpRhmCZpOtO27/u2LvNtWRalDTEHYuIE9oGGJo4xikj5Qc44A9CTUmrb1nXdlNLz/HWc52HodCySUkwgAM0orf8YujWMm6zWaFbn4azVGKBBivAkEZooBMYezN47mFgjBB8jths8KUvGkbbBePpcZu0CtHa0nQb+bdnWXcHZT6OMP7V7/7hB49a6MFmuJJ1StzE/z282CudrONIhTBDHBYLLBQ6pHSZYKkEapzK1WnsDBkdicG9/ztW7JEY+EL8F+K1zFnHg4znLlEcS7SePhlWGHqE0yaW3jsA5pj5w9WvAe4+4UJBznUrrOLmCryhwem4XtJQGTlKk1FQvzHiZ3d2ju399c8fDsTy58+UbumnL7own8HQAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"EC2 Types\"\n        title=\"EC2 Types\"\n        src=\"/static/bb9d3b1e6a6cb61ea9b66e3471851bba/e5715/5_type.png\"\n        srcset=\"/static/bb9d3b1e6a6cb61ea9b66e3471851bba/a6d36/5_type.png 650w,\n/static/bb9d3b1e6a6cb61ea9b66e3471851bba/e5715/5_type.png 768w,\n/static/bb9d3b1e6a6cb61ea9b66e3471851bba/69d6b/5_type.png 1912w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>On the Instance Configuration Details Page, we have options to run more than one instance at once, and there are other configurations regarding roles and access management. We will skip all this and click on the <code>Next: Add Storage</code> button.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 42.46153846153847%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAIAAAB2/0i6AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAA60lEQVQY031QwVLFIAzs//+VV2/OePLkxemjtLUFklAI1KWvjn0z6g4TFshmEzo7Tsea7WDG4SYixJFFWGJgIYkicftGjCfPOatql3Nal2UwxjkPZQihRd48RWZRPF8A2Z3UWpHW7fteSvlcFsjWdbXWEhEemMhzkk33P4C0JkZn0zThMM9z3/fgzrnWwqYxaf0NUJ3OyDPGMMOsASQf2P9FmxkbZvD+HBjKeIAoLF4cpVJ+DMG1IOKqqOYmhsloLfQBKwTUwk3706Qpl2urD86lNvH9S1FPH3FNLbU1eJv901t4ff+g8Zmmly/RfNHCa2rGVwAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Configure Instance Details\"\n        title=\"Configure Instance Details\"\n        src=\"/static/7c37feb4e3c06124910ba34348e2acd2/e5715/6_configuratio.png\"\n        srcset=\"/static/7c37feb4e3c06124910ba34348e2acd2/a6d36/6_configuratio.png 650w,\n/static/7c37feb4e3c06124910ba34348e2acd2/e5715/6_configuratio.png 768w,\n/static/7c37feb4e3c06124910ba34348e2acd2/40a97/6_configuratio.png 1911w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>We can increase or decrease the size of instance storage while creating it; the free tier is eligible upto 30GB; if you need more storage, it will be billed according to <a href=\"https://aws.amazon.com/ebs/pricing/\">Elastic Block Store (EBS) Pricing</a></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 42.15384615384615%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAIAAAB2/0i6AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAA9klEQVQY041Qy04EIRDk/+9e/QUPevEXTNSDGrPRZGNWGJgHzRsGWMZmjSf3sJVKpRK6upsmQoiBsXEczR+sNUZN1ihrnbMowTrfWtv+gWAM89M0zfMsBF8WkOOe093MP4aBSQlSSqxhlKJSSgGAcyxbsC0BkDgpRUTw3uHgYNjqebJUK6m1xqc+35qYEmiXUurbuG7IsJjvEVQsOtZf1bGoENCrtJ18MeuxnNl6IxDKZKJ0GXxG7UTjS2eo3bsVQs21p/HnxxP7CVoj26U4d7CLw1ttLecsTGU6p6DLqsjXgV7Iz/3h5W13ff96dfv0+HD3/nzzAxrix86VvMxaAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Storage\"\n        title=\"Storage\"\n        src=\"/static/6804e1b44b93b5299b367eeef1bb5e96/e5715/7_storage.png\"\n        srcset=\"/static/6804e1b44b93b5299b367eeef1bb5e96/a6d36/7_storage.png 650w,\n/static/6804e1b44b93b5299b367eeef1bb5e96/e5715/7_storage.png 768w,\n/static/6804e1b44b93b5299b367eeef1bb5e96/29114/7_storage.png 1920w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>On the next screen, we can add tags to our instance and storage; these tags are key-value pair which are very useful to add properties to our resources, especially when we have multiple instances.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 42.30769230769231%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAIAAAB2/0i6AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAA2UlEQVQY05WQy27DIBBF/f8/1T/I2l1EimI1xjbGMMPDvDumcpPu0qMrpAHNHKAbp/nxYPOyAmoJiMagNhqlNgbQWLf7EEIkUmwrVf5Mx5eZjePEGOd8FVIqtRFyAwDnXEoxN4L3MRyUUupJJxUeASQPeckthKBB8pijoCEVcEET1So2RHw2O7NEr1KARKsHktAxNZPWWmsaqO0eS8jVp0LbL+bpAryP+rbjNbuhnOQXqKjHbX/ypKtvQ3251N83l9Zc/uYfvGUmIf32F8ePHj4HtqsbbIOD+zcX59IHil+V9AAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Tags\"\n        title=\"Tags\"\n        src=\"/static/29391a24ea76e156f955e0ee5033b77d/e5715/8_tags.png\"\n        srcset=\"/static/29391a24ea76e156f955e0ee5033b77d/a6d36/8_tags.png 650w,\n/static/29391a24ea76e156f955e0ee5033b77d/e5715/8_tags.png 768w,\n/static/29391a24ea76e156f955e0ee5033b77d/7ebf9/8_tags.png 1919w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>We can define the firewall rules in a security group attached to our instance. With the help of these rules, we can control the traffic to our instance.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 42.15384615384615%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAIAAAB2/0i6AAAACXBIWXMAAA7DAAAOwwHHb6hkAAABCElEQVQY041PSU7EMBD0/7/AEzihufEIDiPxAiaO7bEdJ3a8L1SCQBoJJEqtVnV39UaUlJxxOk2UUs6FVsoYYzcAzq4HzAqyuZOv1toYYwghpUTGGL1353bvPVScM/SVUuqJ1tr4GwRS55zWmjE2zzPnXCkFghAlcwKCfT+mIwPlT0i0VtZutRTvdxTyCTR87YeIM4aJOBgCvEBPOGeVkkQvZvcBN+BIPNL7cU+MKZd6JhvW4HlkwFPK4MtiUN6sI3aZomUt25q3B0u/hL26UffRwuh+9EBGWZKjOcgSVQr37CX4g31natK9bSUt3s2zvAn1QcRdCakP/w/jQt6ouL6/Pb1cnl8vn/OAxpLbalmRAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Security Group\"\n        title=\"Security Group\"\n        src=\"/static/a3f07a56cc2d0d60915bfcaf44b0f09d/e5715/9_security.png\"\n        srcset=\"/static/a3f07a56cc2d0d60915bfcaf44b0f09d/a6d36/9_security.png 650w,\n/static/a3f07a56cc2d0d60915bfcaf44b0f09d/e5715/9_security.png 768w,\n/static/a3f07a56cc2d0d60915bfcaf44b0f09d/29114/9_security.png 1920w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>Once we are done with firewall rules, we can review the complete detail of our new instance on a single page, and here we can click <code>Launch</code> button to launch the instance.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 42.15384615384615%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAIAAAB2/0i6AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAA80lEQVQY05VQy2oDMQz0//9Uoeec2xBoIJAlidf2ev1+b2dtAr00kDkMsiWNRiJaLovgWmullLU2dnjvc87b/yil+ZjJ6fvrdDyGEFUH+q1z0Aoh5I5SSq31b2drO2MAeVD6cz5LKTnnS4fs4JyB8WSMCSGgK/gOpVYoxtwWqYg1BmltDAJMRZExRnSMJ/rBzrl5nhnj3ruUS66bXBXBL3IwNkw+jbUXC9faUmmr0gTCt/sdS0J4mqbhmVIKxuSxCAIUwDMYvsYJwGScdx+akncO50GIY4xPtKG6JxNOCI4RVJy3D8HI9iawT0zlert8HD5/AVVAzfdyfqPJAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Review\"\n        title=\"Review\"\n        src=\"/static/c674c07a9bd6d82b5669c9677a337162/e5715/10_review.png\"\n        srcset=\"/static/c674c07a9bd6d82b5669c9677a337162/a6d36/10_review.png 650w,\n/static/c674c07a9bd6d82b5669c9677a337162/e5715/10_review.png 768w,\n/static/c674c07a9bd6d82b5669c9677a337162/29114/10_review.png 1920w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>When we click <code>Launch</code>, it will open a pop-up that will require you to select a pre-existing public-private key-pair or create one to connect to our instance securely. Once you select/download the key, you will be able to launch the instance.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 55.53846153846153%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAB/0lEQVQoz3WQ62/SYBTG+8/7zSUqG3ItpS13xibZdMRsc2o0USOZ9EJLQQsrL7RA7xcupR6QqInx5MlJng+/c85zsFS+lKEq+XKDrp3v9WKv87+0s1T1DDpZaeSK9d/C4hnqaTJXbjQ5nmc5jmHZDsuxYPgudI7vdhhW6g8UNBmP0cdPX9JkmSidHuBErhDP0peta9M0VFXVNA0hNEFI25U6VhQ0RjNtBsaxbV7opcgyWTn7xWMwKZ6lLlrXhmFMJkgDXlVhkLkrYz6f67qxWOgAh+FGlAbPkrl0vgQUXqhhYB4fp06bL03L0ua6qunaTDct17Ac1/V8zw983/M813WjKGJ54dFRLJbMxVIE8Bi8Kk1VWjdvLcvq9X/Io/FsYemmswDacb1d+cEygDFRtBWkAWQE5JAZXp0gigD7noseZNsyVoG39D3ogecE/tI1RmjwbtT/7GjtntRN5St/HnaSIZ8k8Iur16YfitNA97dTaz0x14qxUu2V6mynuv5dZvg+b5hDqS+eZGlICyt3meFbkBlgw9t8le320Lof2RxyGcWVVB80mK8UM5QXgbOJeEE8Ok4nieJznAYew+lqcn929J9ah6E85e+H0sNMFHt8ijycjcPZRLGepav15iuGEzqcwPyj9jfu9v3V5W3rzYfWzd1dhqoSpTpeqCfytZ8pgQ/8DjQQogAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Security Key\"\n        title=\"Security Key\"\n        src=\"/static/e4ceb420d42f9a9f72ab8cfeef5fa8a0/e5715/11_key.png\"\n        srcset=\"/static/e4ceb420d42f9a9f72ab8cfeef5fa8a0/a6d36/11_key.png 650w,\n/static/e4ceb420d42f9a9f72ab8cfeef5fa8a0/e5715/11_key.png 768w,\n/static/e4ceb420d42f9a9f72ab8cfeef5fa8a0/53639/11_key.png 1358w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>It will take approximately 5-10 min to launch the instance. Once launched, You can see the list of your running instances by clicking on the <code>Instances</code> button on the left menu.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 46.92307692307692%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAIAAAC9o5sfAAAACXBIWXMAAA7DAAAOwwHHb6hkAAABMUlEQVQoz42QTU/DMAyG85/5CUhcOMONCwhQ6ZZ9sFFusG60oyABEncOY13XrzVN2rGkSXGraRoTh1mPoteOHdtBV7h/g3t6u392fn2htRodA3fvmx2j2a1F19Bwr9G+0/DtpYb1Vk9v9fHJYfP4oHF6hJQqwaQsOOflniZouQxLThFjRBY/yzx3Z5UFQfg1mXlBNPWmk+m3685CsCSKFlG8SOI4hgTC8phmfhSjZfAhyOcq9+d+SAhZJEmyPteCpGlK6QZKGa1EFURwx1gGMwdhSBlLa+gW25U7oCzPIEcWAvqAD2/tD4KhoJqvVtB57sMisFqyAZxtd8PcD1zPQ0IIVf84FxyQSqpS/UFJ+R8QRyPbGb+8Oa/vD6Y1GI0fh/YO5tPz0HaGVk0tTKuKwPkL2Prm3a8JiKIAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Running\"\n        title=\"Running\"\n        src=\"/static/ee18ffecc1684a9d17dc2181c295db90/e5715/12_runnning_instace.png\"\n        srcset=\"/static/ee18ffecc1684a9d17dc2181c295db90/a6d36/12_runnning_instace.png 650w,\n/static/ee18ffecc1684a9d17dc2181c295db90/e5715/12_runnning_instace.png 768w,\n/static/ee18ffecc1684a9d17dc2181c295db90/7ebf9/12_runnning_instace.png 1919w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h2 id=\"conclusion\" style=\"position:relative;\"><a href=\"#conclusion\" aria-label=\"conclusion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Conclusion</h2>\n<p>As you can see, it is effortless to create a free tier AWS instance to deploy your application. In the upcoming article, we will show you how to deploy an application on the EC2 instance and the best practices.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"November 18, 2020","updated_date":null,"title":"How to create an EC2 Instance in AWS","tags":["AWS","DevOps","EC2"],"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/3b0ae847df7e8ad3b57b8a90fbdbe870/ee604/ec2cover.png","srcSet":"/static/3b0ae847df7e8ad3b57b8a90fbdbe870/69585/ec2cover.png 200w,\n/static/3b0ae847df7e8ad3b57b8a90fbdbe870/497c6/ec2cover.png 400w,\n/static/3b0ae847df7e8ad3b57b8a90fbdbe870/ee604/ec2cover.png 800w,\n/static/3b0ae847df7e8ad3b57b8a90fbdbe870/f3583/ec2cover.png 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Puneet Singh","github":"puneetsingh24","avatar":null}}}},{"node":{"fields":{"slug":"/engineering/a-journey-with-aws/"},"html":"<p>Amazon Web Services offers scalable, reliable, and inexpensive cloud computing services. Below are some salient features provided by AWS.</p>\n<ol>\n<li>Secure cloud services platform</li>\n<li>Compute power</li>\n<li>Database storage</li>\n<li>Content delivery </li>\n<li><strong>Pay for what you use</strong></li>\n</ol>\n<p>Prerequisites:</p>\n<ul>\n<li>AWS Account</li>\n<li>Active internet connection</li>\n<li>CLI usage</li>\n</ul>\n<h2 id=\"aws-ec2elastic-compute-cloud\" style=\"position:relative;\"><a href=\"#aws-ec2elastic-compute-cloud\" aria-label=\"aws ec2elastic compute cloud permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>AWS EC2(Elastic Compute Cloud)</h2>\n<p>It is the most commonly used service of AWS and catered deployment of various applications as per AMI configured before creating an EC2 Instance.\nAmazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure and resizable compute capacity in the cloud.\nIt is designed to make web-scale cloud computing easier for developers. <br>\n<strong>Here are some of the important steps while setting up new EC2 Instance-></strong> <br></p>\n<p>Choose an Amazon AMI.\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 46.15384615384615%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAYAAAAywQxIAAAACXBIWXMAAAsTAAALEwEAmpwYAAABfElEQVQoz22SyU7DQBBE/f+fxIEDQkickEAJm7J798Qe72tcdHUIRAJLpbF77FfVPXYC30MYBAjDUOX7PowxiOMYWZbhdDphHEfVNE36/N9lmwn9OMMpyxKFKM9zWJsjLwp0XYd5nv98xBpF6EWjmLT9KJsnDMMAx6ZGYdNEZ9E8CrBH27ZomgZ1XasBxRp1DaSKusP9MsImKuGEYYDVaoU0zbDbbfH+utB2o+/2qUBGwjFwBDQntO97NRmGXu4HPH4YuKYWYGyw2+9xPB5RFtJ2ZhSepqnWCLHWopBRMDFB1+kVPox42pXwsw5OYjJEUazO280ay8WzpAo01V6MXNeF53kKP8/Z/qw0K8Woalo8LAO4ibSc5/Y3hbyYJgaJtGe+FUURkiTRhAQx2WWmei8J66bD3at0mkjLhNGdwMNhj4/PNwWxRl1+IcKuD4itnyWHJTO8efKwDovzb8OXq6oCD2izXf8kYu2yz5VArpTu6X4ha4PblxjbuMIXWwmvDzeZGigAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"AWS\"\n        title=\"AWS\"\n        src=\"/static/39375118427b51e5a9addb9f636f8b74/e5715/AWS_EC21.png\"\n        srcset=\"/static/39375118427b51e5a9addb9f636f8b74/a6d36/AWS_EC21.png 650w,\n/static/39375118427b51e5a9addb9f636f8b74/e5715/AWS_EC21.png 768w,\n/static/39375118427b51e5a9addb9f636f8b74/67a79/AWS_EC21.png 1408w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>Choose the instance type.\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 48.15384615384615%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABrElEQVQoz5VS2Y6dMAzl/z+mUv+j6nulau703gJZIJCNkAQ4tTND3/rQSEdecxzH7iazQosesn9CzzMWv6EcF1I5sH/Cp4K4V6RccZwnruv6J7pp0hiGEdZ5aK0gpUBMO2z8IAEu/M/pxnEAg4m1UlBSkj1ilAqjkJBCYFkWWGvhvSNJHWlNPtNsR/4QApwj6T06szo8f/dYSHLLcpqabl2AWVaoyYBzfr3oWxTFLHUyLxSz4O96vD+psIKgmJpmatnueHtJGFfwUAN+DA+EDLh0NdjtbLaYPYzPTfc39gsvYSANvTCdWCnYbfsOpSewDHFrf1mOE6UeDblUVLKdD9job1kvx9GQKT6bpcU4LxFHt4aEx2sAy8VHaGplKyciTTfmjwmnetEr1pbDOsdvDNTqbAMCDdDGhK7kjHVdUUpGpgrbtuE8j4aDXlFLwUWrwn7OPUlnP7++EiINJJP/qLXFuy0l9H2PRDLGSNNyfy+1i0xI+8VFOYcPF7nPYmZEKsaHiTu+xIk3QaVKTMCkN9hmEl52GyJeo8aXbxpfv0/4+RQQtHaC1mumLfkDmiYD4QmXc7YAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"AWS\"\n        title=\"AWS\"\n        src=\"/static/2b98ce5fcfa460cd9d674eb4884f8121/e5715/AWS_EC22.png\"\n        srcset=\"/static/2b98ce5fcfa460cd9d674eb4884f8121/a6d36/AWS_EC22.png 650w,\n/static/2b98ce5fcfa460cd9d674eb4884f8121/e5715/AWS_EC22.png 768w,\n/static/2b98ce5fcfa460cd9d674eb4884f8121/133ae/AWS_EC22.png 1424w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>Configure security group(It allows specific IP's that user will give permission to specific ports as per requirement.)\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 48.76923076923077%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABSElEQVQoz52Ry3KEIBBF+f+/yTI/kU22WY1veSsoOCM3DWqSxSySUHWquy9tewHGpQYXCj2XEJQPQsItAUvY4NeIZQ3wk8FsJBbvsMYN9/v9Kfu+g7VNg77rUFU3okJdN+DjCME5jNEwWpdojYHWitBQSp1IKDtDmQlKSszzDIZzTdME5xzs5NC2LYQQ2Lat7KWU8NvF1nVFjKG4aMjtOA7kskLf9yV23TE8O7PWYouR+iP9LCKEUFxFipfG+mGENhbLstIdKnAu4P1Cjmd0/UCDTKnHkdPwvsTcbywdUxncbnXR87e5l8mhRvSKzhWBPROQiJKno8ZZZz091m+yni79gD1cCyc+4E0F9wNv6yPmWt9O7ajznj/39sCRNnEQBdjXheeY9j+RLvYTylm6ZuHvPH3l7PA/ZBfbI8HTY7ajxsubwOu7xCd3vQcxzSIDPgAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"AWS\"\n        title=\"AWS\"\n        src=\"/static/58a086d6cddcc19dc4af4208b8f996a1/e5715/AWS_EC23.png\"\n        srcset=\"/static/58a086d6cddcc19dc4af4208b8f996a1/a6d36/AWS_EC23.png 650w,\n/static/58a086d6cddcc19dc4af4208b8f996a1/e5715/AWS_EC23.png 768w,\n/static/58a086d6cddcc19dc4af4208b8f996a1/afd61/AWS_EC23.png 1431w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>Login to EC2 via CLI</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">$ ssh -i ec2-key.pem ec2-user@11.11.11.111</span></code></pre>\n<p>Switch to ROOT</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">sudo su</span></code></pre>\n<h2 id=\"aws-rdsrelational-database-service\" style=\"position:relative;\"><a href=\"#aws-rdsrelational-database-service\" aria-label=\"aws rdsrelational database service permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>AWS RDS(Relational Database Service)</h2>\n<p>Amazon Relational Database Service is a web service that makes it easier to set up, operate, and scale a relational database in the AWS Cloud. It provides a resizable,  cost-efficient capacity for an industry-standard relational database and manages everyday database administration tasks.\nAfter setting up RDS, you can be logged in to the local tool(SQL Developer/ MY SQL Workbench) and copy RDS's endpoint with Username/Password configured while setting RDS.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 760px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 90.15384615384615%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAACXBIWXMAAAsTAAALEwEAmpwYAAACuklEQVQ4y51U22rcMBT0/39AH/sBJYW+9KlQKBRKKAklLck6m653vd71/W5ZvkienCN7k01oXioYjnXxaHTOSFYcxbDte7g7F6uVDcdxsF6vTbSpvzv46IYRQ9+jJwzDYOJbsGrRIsoK5FWNJC8pNsjo28SyQtG0aJmQiQgcx3HEqJSBWuJAYwwrlRp3XoLbzQ62e4SXlghribCijZaYy9GQBWEEd++hrCoIEtIIgbpuTJRdR+QaVjNOOBQCTpBiFxcLcuyT0kQvq5B1pERrQ+hRCo5BiILUl4QsL8wGrFxrJux61L2CGDWaQaHqhhcoJaHtIGWHVkqjRFLsz1LA0YwTrLIsEccx0jRFlmVo2/YM4lX/GYIhGGL+XmAx2f36wVR162znpC87/w8sPkZKyvjoCoCeJsrXZOJE4Ka1Mvk5jellfJ7T85ie5yy/lPi18WHvfTz4CTKpkBA4rx3lJIqi+UfGmU2yPEeSZmaOq6uWOaseJsRiwM/fNi5v7lBRP++1IcSkkZB1Pn94DxlsZuITKXlOUo6d22u0opmJucr1QD91GlerDX7c2EhZIfXLjhMwQdD8x08XqEJ3UTMr5BZ5DlbX35+ObRRKsktFilpaI8iTzcB9BR7nBZPWs7KJycano7FCvaSSc2puDStk9rIoEAY+hk4aVRMXgRZIKlRMxh046aeCLWRFXZPVMuSUy5zWqBPhMM7yv1z+wbuLr+bbyKdJRT/2uy3Ufg8dhpjIEYaU0FKxHHpE/CAw/mVCc1O4Qtx2VOFvV7dPVTOXn68TGV4lMVQcQdNrwhvxXNcIOlWAw/FonPBMOM6GfKvpcyxHVosnz5sZY0IvzLD+uzW5YF8lSTp7jGJEbyUfe8nDy50Wk09nF4Cb1dGDwK/IkaT7Ph3hcMTOdeF5B7juHgG9LKcfplck/8IjQ7huFqyrrNkAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Available Databases\"\n        title=\"Available Databases\"\n        src=\"/static/d8b2d343908b287d565a18fa57154372/3c051/AWS_RDS.png\"\n        srcset=\"/static/d8b2d343908b287d565a18fa57154372/a6d36/AWS_RDS.png 650w,\n/static/d8b2d343908b287d565a18fa57154372/3c051/AWS_RDS.png 760w\"\n        sizes=\"(max-width: 760px) 100vw, 760px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h2 id=\"aws-elasticache\" style=\"position:relative;\"><a href=\"#aws-elasticache\" aria-label=\"aws elasticache permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>AWS ElastiCache</h2>\n<p>Amazon ElastiCache allows you to seamlessly set up, run, and scale popular open-Source compatible in-memory data stores in the cloud. This service is commonly used to avoid unnecessary calls to RDS and improve the user experience by displaying the data faster.</p>\n<p>There are two types of cluster engine supported by AWS ElastiCache</p>\n<ul>\n<li>Redis</li>\n<li>Memcached</li>\n</ul>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 66.15384615384615%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAAAsTAAALEwEAmpwYAAABW0lEQVQ4y41Sa2+CQBDkb7fWpFXTBK2pNenj3xkT/eALUEAQ7pjebMEcV7XdZFjucju7s7veaPIB//UT/uQL3cEYd48+Or0hHnojdJ6GBj7uzV138IL+cIqe/9ZC3+fdVPzz+B0eHFNlAa1KpEmMJElwPB6hzPm/5mmtQShlfFXJpdbVD1mWIwgjrFYr7HYBttstNpuNeGK/39exqoaGVxmSqiZq/pszLc9zLBYLLJdLqfZ0OgmyLBMSN+4s2SaxSYMgxGw2MxXupKLD4SDVk5TJ3GI8m6woCqnCvSNBakAfx7G8KctScJOQAev1WjLLgJre1tIumS33pmTzNUOCDIU9pNQ0TcWzQrffNwntcxRFmM/n56kmtXSSE5yy/b4luVkhOzMnyT5yCOqK9F+Sm2BK4TSZ+dIa0TdJbfzZQxr3LAxDZ3FVi4hTdreiVaFdDR82PboGJiCpHfsNQk7klNdShVAAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"AWS Elasti Cache\"\n        title=\"AWS Elasti Cache\"\n        src=\"/static/cfc6a58469afeb93ed80642ead207a62/e5715/AWS_EC.png\"\n        srcset=\"/static/cfc6a58469afeb93ed80642ead207a62/a6d36/AWS_EC.png 650w,\n/static/cfc6a58469afeb93ed80642ead207a62/e5715/AWS_EC.png 768w,\n/static/cfc6a58469afeb93ed80642ead207a62/05fb0/AWS_EC.png 1138w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>Login to Redis locally via this command (First port can be anything except 6379 as it will direct AWS Redis to local Redis installed on the machine) and after first port, just paste the endpoint of Redis.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\">ssh -f -i ec2-key.pem -N -L 6378:demo-redis.xxxx.xx.0001.xxxx.cache.amazonaws.com:6379 ec2-user@11.11.11.111</span></code></pre>\n<h2 id=\"aws-lex\" style=\"position:relative;\"><a href=\"#aws-lex\" aria-label=\"aws lex permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>AWS Lex</h2>\n<p>Amazon Lex provides advanced deep learning functionalities of ASR(Automatic Speech Recognition) &#x26; NLU(Natural Language Understanding). With the use of Lex, we can build chatbots that can converse using speech and text as mediums.\nThere are a few components of BOT that need to be understood to build it.</p>\n<ul>\n<li>Intent:- It is a particular goal that the user wants to achieve.</li>\n<li>Utterances:-These are spoken/typed phrases that invoke content.</li>\n<li>Slots:- Data provided by the user to fulfill the intent.</li>\n<li>Prompts:-These are queries/questions asked by the user to input the data.</li>\n</ul>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 74%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAACXBIWXMAAAsTAAALEwEAmpwYAAACtElEQVQ4y31UaU8TURTld2o0hBgXBDQkRj74QayIKEpDwIVSbAAxQhcK2NpSoMsUCpXSSolFsP3QIqYbNV1m68zxvWmHFkRPcvOmr/PuPWfOva9FlmVQ0FV9rlarKJVKykr3isUiCoUCJEk6E81nVbSoG/QFKC9JEEWRJCzX9pqgFqVBi12UvKU5O3f2uHKoXC4rBQRBUNbzRc4XVBjm83n4/Qy8fj88Xi+ikRDZlcDzPNLpNFiWBcdxStAiFPF4HAzDIBAIwOPxIJlMNiSHQiH09j/HgHYUmmdD0L59hyLL11heIJtizmhC/9MBaIeHoenrg93haCTcDn/FTZ0Dt95voH2KQavBj2CyAJmv4OjnsWIKlU6jUqkoB52LVuhfj2J6Qg/dyDB8K65aQp4UHIsk0LXgwz3bOjqsPvQ4NnHCCaeON75qDfGSgB73LrrtAdxfDqJ9yY832/sNhsFIlDC0o3PGj2sGDy5PMNgiDCGwKBK3q3VTeGoM+a4V8nvQFcT1uXW0WzbR+pHBo5U9lEViCuUxFYnjxvwGOm0h3F7YxN2lLWRKRJooIJPNKjJVySw1h7DW2Ty4ol9D26QPl8ZX8WApgpJYd9m5s4fe8UkMTs7gjmERV6d82Pv1G7LII5vLnbYNx/OKrASR3MXso2M1gm5vFG3OHbwMxRuSU4k4XHY7GJcTJtcGXi3v4jDHQq6KSKWOUDjJg60QQ8pkegSSVBZhsTswojdAN/0B2jE9nG5vPSFpg+N0Fl+iMUT3D5A4iOHH4XfkSpxiA88LCjt1QqR62xhnZ/HksQZDLwah6X2IzzZbE8NUCmazGQtWK4wmE9bcbtpw/5wGinA4DMv8PD6RRGaLBd9isb9HrxmSyuiCi0D+T7EzlwMN2neZTEZpZtVd+kzHj/5PDaLRfEGoK8UfkmhEcz19YjQAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"AWS Lex\"\n        title=\"AWS Lex\"\n        src=\"/static/27f62b87be9405b2c4160aeab5222eee/e5715/AWS_Lex.png\"\n        srcset=\"/static/27f62b87be9405b2c4160aeab5222eee/a6d36/AWS_Lex.png 650w,\n/static/27f62b87be9405b2c4160aeab5222eee/e5715/AWS_Lex.png 768w,\n/static/27f62b87be9405b2c4160aeab5222eee/7e4a6/AWS_Lex.png 952w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>Moreover, there are VERSIONS linked with bots, intents, and custom slots. With the help of versions, we can make changes in the dev version without any impact occurring in PROD; hence it helps to make Immutable versions of bot that is created using AWS Lex.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 69.84615384615384%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAOCAYAAAAvxDzwAAAACXBIWXMAAAsTAAALEwEAmpwYAAACYUlEQVQ4y22Ty27aQBSG/S48DC/ToPQSmpAmQC+oapQ+A1JXTTfNKhuaBYssGlCCHU98v1+hqigv8PecMUaQdvFrPPb4n+/8c0ZpPT/CyWkf7cMTvH7zFu8GZ3h5eIre+4/of/gk5+1OD+2jHvYPOth/Vet4o2cvOmgddHHcHUARQuDu9icMXcAUBmzLhmM7JBemYcJ4NOC5LnzfI/kI5OghCHy5xn4U+D5SMRje4Op6AsWyDIiHOwhdx3QypVFgejvB7H4GTdVgkqFLhpZlPZEtR9M0IWiNRv8ZBKDEeQY/ipBkOcIoRZ7nkoQXj8djXF5eQtM0LBYL+a0oCil+llrPy7IaFT/0ca/OyCzEvCyRpCk8z5PqdrtoNpsYDodYrVZIkgRZlkntmObFWjkRpgk8yiOMY6RpRkph27Yss7W3h0ajgfPzz0T4S25iU76G5Uqimrg2loRxlsKlkB0q0w9i+pDBdegQgghfL76h3+/j+scIf5YL2ixBGEYykpKq2TZkEGkY0SLTsWFSZglRcjmO68G6uUI8GWG5/A1N5Phy4WGmcRWRJK0Nn+ZaEQZMF8gXbChLExrEbAqdTl97MKCLmFolQURZ/4+wlpJxFvMSxXqBJHQc2FR2nKR0EKksdV7yQeRkuEtYG24IU1rEyop8k0UYhpuTZppq7ss5P/Om21S7hOScllU/bRsyZUAxyNtBI4sNY8qZe7LOrepBqrAo65Lzfwy5+1VVle3Dvcc/sCGTsSG3FG9aUzE9R8GRVIRsxrutM+QfmJBvC5vyNeP+q9/zu7pX2YifNZ3uvBfgL4MA1JOPP07EAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"AWS Lex Versions\"\n        title=\"AWS Lex Versions\"\n        src=\"/static/29fe85239a84f13823470cc3b162593e/e5715/AWS_LexV.png\"\n        srcset=\"/static/29fe85239a84f13823470cc3b162593e/a6d36/AWS_LexV.png 650w,\n/static/29fe85239a84f13823470cc3b162593e/e5715/AWS_LexV.png 768w,\n/static/29fe85239a84f13823470cc3b162593e/aa08e/AWS_LexV.png 967w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h2 id=\"aws-api-gateway\" style=\"position:relative;\"><a href=\"#aws-api-gateway\" aria-label=\"aws api gateway permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>AWS API Gateway</h2>\n<p>This AWS service is used to Create, Publish, Maintain, and Monitor secure Application Programming Interfaces(<strong>API</strong>). Moreover, it provides an easy interface for code running on AWS Lambda.\nHere are some of the pointers that explain the need for this service.</p>\n<ul>\n<li>Efficient API Development.</li>\n<li>Performance at Scale.</li>\n<li>Cost-saving at scale.</li>\n<li>Flexible Security Controls.</li>\n</ul>\n<p>This service enables us to make APIs on the go with a few clicks; also, we can use the Mocking approach to make dummy routes without any original data. In this faking data is used and bouncing back to without any activity.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 50%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAABG0lEQVQoz42SiW6DMBBE+f+frAikBWODsQ3hnu6YJEoVaLvSiGNX4ze2k6ZpoLXBsixonUdpGnk6+OChjcFHmiLLc6SXC2qZdd7H/pu8i70khA6327Ab+oCs0DC2jc3GWhRliVIpfBUFbNvKQuFQnGc/GccJ4zhi27ZoeFU1rPN3ygBT1zCmhhLTruviwvM8v2kYRgTpJ3gp2zpkn4WY7NGoPL+i73v8txKSUSwaMKIWIr6TUKkKqqqErsf8pFvetexKHmasTkjcfT8Y2Un0WminaZJIg+z17VDsMa6Vvf9ByJ+vJxcJhY6RXxc+K84cGj4J/X51eHoPkjOxz4Snhg9VWseTpRj9TDSM9/A3QkauJDIJnXyv6/pn7G+pSwh8eghThwAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"AWS API Gateway\"\n        title=\"AWS API Gateway\"\n        src=\"/static/6476a0f189d08b6bd81760c48ec0f9bb/e5715/AWS_API.png\"\n        srcset=\"/static/6476a0f189d08b6bd81760c48ec0f9bb/a6d36/AWS_API.png 650w,\n/static/6476a0f189d08b6bd81760c48ec0f9bb/e5715/AWS_API.png 768w,\n/static/6476a0f189d08b6bd81760c48ec0f9bb/1e093/AWS_API.png 1376w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h2 id=\"aws-dynamodb\" style=\"position:relative;\"><a href=\"#aws-dynamodb\" aria-label=\"aws dynamodb permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>AWS DynamoDB</h2>\n<p>Dynamo DB is a NO SQL database provided by Amazon Web Services. The main job of Dynamo DB is to Store &#x26; Retrieve any amount of data and serve any level requests of traffic.\nIn this, there are different terminologies as that of a regular database. Secondary Indexes is a Data Structure that contains a subset of attributes from a table.</p>\n<ul>\n<li>Partition &#x26; Sort Keys (Partition key is single primary key composed of one attribute only)</li>\n<li>\n<p>Local &#x26; Global Secondary Indexes</p>\n<ul>\n<li>Local Index: Index with same partition key as of base table but different sort key</li>\n<li>Global Index: In the global index, both the partition key and sort key can differ from that of the base table.  </li>\n</ul>\n</li>\n</ul>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 55.69230769230769%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAABUklEQVQoz5WSi26DMAxF+f9/7DaVAoFCeYRXSODO1y2snTRts3SUl33tOInGcYQxBnme65hlGZIkgbUWzjnM8/wC96ZpOuBe0zRI01RjIgpSoCxLFEWhooQOhGdxHB+J6NP3vTIMg47UWJYFtAgPo0ghVVZVhbZtEUJQvPca9Bfbtu0uyEnXdSpU1zW6thExr6xrkEq+Ktr9fyLaJ+oovBuL/HqDHaRHLijW/kPwpWThI2sRmxp179EMHpUNKOtORDtt+m8WMTObfj6fj+Y64hZMs9ORa/aSL8xz9Xma76zrehfcn5ywjxz7x3qQc/aX1937vLPHEJ4xSfS95KKZJUGmVd/kgf5r0WsHIVdbEMv1T6cT3oRU/l5yuUiSBFf5g9M0avX8Ac9xh2BYNzi/3gkbRudhihKpkU9+rXBJjc4vWa77/Tij7Ud5fa/+R6zgZf0JG0xVhVQuTaAAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"AWS Dynammo\"\n        title=\"AWS Dynammo\"\n        src=\"/static/092e8d1d77c1e9912f7f58f5dbb15977/e5715/AWS_Dynammo.png\"\n        srcset=\"/static/092e8d1d77c1e9912f7f58f5dbb15977/a6d36/AWS_Dynammo.png 650w,\n/static/092e8d1d77c1e9912f7f58f5dbb15977/e5715/AWS_Dynammo.png 768w,\n/static/092e8d1d77c1e9912f7f58f5dbb15977/f79fa/AWS_Dynammo.png 940w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n</style>","frontmatter":{"date":"November 03, 2020","updated_date":null,"title":"AWS Services-Walkthrough","tags":["AWS","Serverless"],"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/1bc36a6b88cc1025d3852dc1ffe6eef6/ee604/aws.png","srcSet":"/static/1bc36a6b88cc1025d3852dc1ffe6eef6/69585/aws.png 200w,\n/static/1bc36a6b88cc1025d3852dc1ffe6eef6/497c6/aws.png 400w,\n/static/1bc36a6b88cc1025d3852dc1ffe6eef6/ee604/aws.png 800w,\n/static/1bc36a6b88cc1025d3852dc1ffe6eef6/db955/aws.png 900w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Nitin Gupta","github":"ng29","avatar":null}}}},{"node":{"fields":{"slug":"/engineering/self-hosted-mongo/"},"html":"<p>You’re probably hosting your MongoDB on a reliable cloud service provider say <a href=\"https://cloud.mongodb.com\">Atlas</a> for instance because you really want to focus on your idea and delegate all the subtle key management areas such as networking, storage, access, etc.</p>\n<p>It all looks good initially until your small idea starts turning into a business and the cost starts skyrocketing. Even if that is not the case, this post will still give you a general overview of the technical complexities involved (and bucks saved!) if you were to migrate to a self-hosted solution.</p>\n<p>BTW, how much savings are we talking about? Let’s do a quick comparison between an <strong>Atlas</strong> instance and a self-hosted MongoDB on <strong>AWS</strong>.</p>\n<p><strong>Atlas (~$166/month)</strong></p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 42%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAIAAAB2/0i6AAAACXBIWXMAAAsTAAALEwEAmpwYAAABDUlEQVQY031Qy24DIQzM//9YL1VvVXto02y0kdhHAAMGzLPejdJDGxWNMBiPPcPhWR9f3TjQ9cWcLqQwExAuSlJJvtIMUqjVF4LoxkVINAKu78ORcVbzQRjpQlDGfAwnqSGnjNZNej0r4RxSpFrqjpJT6r23WjkZfdDeHiYmozeIYK3znp9jjF9GPIm3EEMkChQ3xICIrfdaKxcYDatR22QMQSzLMI7aGIeotebaXDpSibn2P6vtu01+l+09y5YA3AUcTtOMPqTaKNdc2n/km2zLfAAWz95SSq094DyebNmzx4sQq1IsGwDanc3hp1Hr7Td5tkpq/TkMN892W44D7P75opTm8w2c5w/rd/I3OuXMieG2KrwAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"&quot;Atlas Pricing&quot;\"\n        title=\"Atlas Pricing\"\n        src=\"/static/37ae695d63da0d8e11b315ac53da7162/e5715/atlas.png\"\n        srcset=\"/static/37ae695d63da0d8e11b315ac53da7162/a6d36/atlas.png 650w,\n/static/37ae695d63da0d8e11b315ac53da7162/e5715/atlas.png 768w,\n/static/37ae695d63da0d8e11b315ac53da7162/cc8d6/atlas.png 791w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span>\n$0.23/hour based on the above-selected requirements (~ <a href=\"https://cloud.mongodb.com\">cloud.mongodb.com</a>)</p>\n<p><br><br><strong>AWS (~$36/month)</strong>\n<span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 27.846153846153847%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAIAAABM9SnKAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAu0lEQVQY021QywqDMBDM//9Sv6HnXgo9VMGoZPMg72g6RhRpO2yGIQmzs8sez1c/cEGktNbGgKVSX4XLcZqPmmZBYuTqfmMpxlxKrdU51/U9SQldSlmW5WQhKISQck4p4bMgqZWqemZo50Pw3ltriQjt/QHYbew9HHcNwAVRlDE2RPbuOmtdaIgxhgtOl6v27Qkt4cgkyYIo/4DM9QdIvq4rBF7ZwDn2sW2rsWwLw4pwMEhuc16B9LtA/w8AoVktzOpq7wAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"&quot;AWS Pricing&quot;\"\n        title=\"AWS Pricing\"\n        src=\"/static/919463e3199f2098ff4d7388991b988f/e5715/aws.png\"\n        srcset=\"/static/919463e3199f2098ff4d7388991b988f/a6d36/aws.png 650w,\n/static/919463e3199f2098ff4d7388991b988f/e5715/aws.png 768w,\n/static/919463e3199f2098ff4d7388991b988f/2cefc/aws.png 1400w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>$0.0416/hour for the instance and additional pricing based on the EBS type and storage (~ <a href=\"https://calculator.aws/\">calculator.aws</a>)</p>\n<blockquote>\n<p>It is almost 4.5x savings just in terms of the infrastructure!</p>\n</blockquote>\n<p>Now that you know the major why(s) and are still reading this post, without further ado, let’s dive into the tech.</p>\n<hr />\n<h1 id=\"outline\" style=\"position:relative;\"><a href=\"#outline\" aria-label=\"outline permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Outline</h1>\n<ol>\n<li>Setting up the infrastructure</li>\n<li>Setting up MongoDB</li>\n<li>Bulk migration</li>\n<li>Delta-sync to bridge the connection switch latency (not applicable to stale clusters)</li>\n</ol>\n<p>Since the entire content can be a bit exhausting in one place, I’m going to divide this into 2 related posts.</p>\n<h1 id=\"1-setting-up-the-infrastructure\" style=\"position:relative;\"><a href=\"#1-setting-up-the-infrastructure\" aria-label=\"1 setting up the infrastructure permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>1. Setting up the Infrastructure</h1>\n<p>I’m going to mention below the guide for setting up an instance running <strong>RedHat Enterprise Linux 8</strong> on AWS. This is because MongoDB generally performs better with the xfs file-system.</p>\n<h2 id=\"spin-up-an-ec2-instance\" style=\"position:relative;\"><a href=\"#spin-up-an-ec2-instance\" aria-label=\"spin up an ec2 instance permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Spin up an EC2 Instance</h2>\n<p>I’ve used a <code>t3.small</code> instance that comes with <strong>2 vCPUs</strong> and <strong>2Gb of RAM</strong> albeit you can select any instance of your choice.</p>\n<blockquote>\n<p>It is recommended that your DB should have access to at least <strong>1GB of RAM</strong> and <strong>2 real cores</strong> as that directly affects the performance during caching &#x26; concurrency mechanisms as handled by the default engine <a href=\"https://docs.mongodb.com/manual/core/wiredtiger/\"><strong>WiredTiger</strong></a>. You can read more about the <a href=\"https://docs.mongodb.com/manual/administration/production-notes/#allocate-sufficient-ram-and-cpu\"><strong>production notes related to the RAM and CPU requirements here</strong></a>.</p>\n</blockquote>\n<p><em>Configuration Overview:</em></p>\n<ul>\n<li>OS: <strong>Redhat Enterprise Linux 8 (x64 intel-based)</strong></li>\n<li>Instance Type: <strong>t3.small</strong></li>\n<li>Storage: <strong>10GB</strong>(os) + <strong>30GB</strong>(data) + <strong>3GB</strong>(logs) of <strong>EBS</strong> i.e. 3 separate volumes</li>\n</ul>\n<p>I’m assuming that you’re familiar with creating a VM on AWS.</p>\n<p>Now, once the instance is in running state, assign an <strong>Elastic IP</strong> to it and then simply do a remote login into the machine.</p>\n<blockquote>\n<p>We'll need the <strong>Elastic IP</strong> to setup public hostname for the instance</p>\n</blockquote>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ ssh -i &lt;PEM_FILE&gt; ec2-user@&lt;ELASTIC_IP&gt;</span></span></code></pre>\n<h2 id=\"mount-additional-volumes\" style=\"position:relative;\"><a href=\"#mount-additional-volumes\" aria-label=\"mount additional volumes permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Mount Additional Volumes</h2>\n<p>We have added 2 additional EBS volumes other than the Root FS for Data and Logs which are yet to be mounted (<em>Remember the 30Gb and 3Gb?</em>). You can list the volume blocks using,</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"1\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ sudo lsblk</span></span></code></pre>\n<p>The additional volumes will be listed right after the root block (refer to the arrows)</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 353px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 25.21246458923513%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAIAAADKYVtkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA8klEQVQY0x2PyW6DMBCGeYKeUEmhbFJDCeBQFKAsYTFmSykW4lBVqtRz3/8J+sffYTRj+5vxSNM0DcMgy3Jd133fM8auAuQ4ybIMsaoqPMPVOI4oNU17FkhN00DWDb2l7crX4Exc1w3DsBEkSYIuaZoahmHbtmmalmXpgrvs+z6ldP34vA0zX/jri+McHUJIWZYYAnmeZ8iY9iQ4HA6Koqiqepcv8WXshmPlVT9s/LqdaeQGLgkI5xwyNHw4z/M4jqMoeheg9DwPjaSOdexKH7JH8pflv/TtO3Ojk3/y8LooCkTsiaQVLMuCptu27fuO7f4B7lI+vFGhNDMAAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"&quot;sudo lsblk&quot;\"\n        title=\"List volume blocks\"\n        src=\"/static/e89cd4d9897ca07cc7ffb0edcda7119e/6c115/lsblk.png\"\n        srcset=\"/static/e89cd4d9897ca07cc7ffb0edcda7119e/6c115/lsblk.png 353w\"\n        sizes=\"(max-width: 353px) 100vw, 353px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>In the image above, you can see that the additional volumes are named</p>\n<ol>\n<li><strong>xvdb</strong> (30Gb space to store data)</li>\n<li><strong>xvdc</strong> (3Gb space to store logs)</li>\n</ol>\n<p>Now, let’s create the file-systems in those volumes.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"2\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ sudo mkfs.xfs -L mongodata /dev/xvdb</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">$ sudo mkfs.xfs -L mongologs /dev/xvdc</span></span></code></pre>\n<blockquote>\n<p><code>-L</code> is an alias option for setting the <strong>volume label</strong></p>\n</blockquote>\n<p>And then mount the volumes.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"3\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ sudo mount -t xfs /dev/xvdb /var/lib/mongo</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">$ sudo mount -t xfs /dev/xvdc /var/log/mongodb</span></span></code></pre>\n<p>In order for these changes to reflect, the system must be rebooted. Hence, now we also need the partition persistence so that in case of an unintentional reboot we don’t lose the Database storage.</p>\n<p>We can achieve this by specifying the mount rules in the fstab file. <a href=\"https://geek-university.com/linux/etc-fstab-file/\">You can read more about it here</a>.</p>\n<p>Before that let's copy the UUID of the above partitions(<em>because they are unique and won't change over a system restart</em>)</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"4\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ sudo blkid</span></span></code></pre>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 768px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 9.846153846153847%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAACCAIAAADXZGvcAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAaUlEQVQI1x2KvQrFIAyF+xiCk5ODg1i7FBJsoWkrGlO47/8uN/gNh/O3EFEp5ZkMHnAi/A7+uLUmIsysB/W991rrO1GTc3bOLbohoma66Rty8b0LrpuueZ2klFQBQJsQQozRe2+Msdb+AZEjHOgCyMRoAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"&quot;sudo blkid&quot;\"\n        title=\"List attached block info\"\n        src=\"/static/a37188eaa209c947db818b61fd19dfbb/e5715/blkid.png\"\n        srcset=\"/static/a37188eaa209c947db818b61fd19dfbb/a6d36/blkid.png 650w,\n/static/a37188eaa209c947db818b61fd19dfbb/e5715/blkid.png 768w,\n/static/a37188eaa209c947db818b61fd19dfbb/20c85/blkid.png 999w\"\n        sizes=\"(max-width: 768px) 100vw, 768px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<p>Copy the UUIDs listed for <strong>/dev/xvdb</strong> and <strong>/dev/xvdc</strong>. Refer to the <strong>“LABEL”</strong> for block identification</p>\n<p>Now open the <code>/etc/fstab</code> file and paste the configuration in the following format.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"5\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">UUID=&lt;COPIED_UUID_FOR_DATA&gt; /var/lib/mongo xfs defaults,nofail 0 0</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">UUID=&lt;COPIED_UUID_FOR_LOGS&gt; /var/log/mongodb xfs defaults,nofail 0 0</span></span></code></pre>\n<h2 id=\"update-hostname\" style=\"position:relative;\"><a href=\"#update-hostname\" aria-label=\"update hostname permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Update Hostname</h2>\n<p>The hostname will be used to identify your database server on the network. You can either use the above assigned <strong>Elastic IP</strong> or Domain name (if available). Open the <code>/etc/hostname</code> file and append the entry. For e.g.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"6\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">ip-xx.us-east-2.compute.internal **&lt;ELASTIC_IP&gt; &lt;DOMAIN_1&gt; &lt;DOMAIN_2&gt;** ...</span></span></code></pre>\n<h2 id=\"update-the-process-limits-optional\" style=\"position:relative;\"><a href=\"#update-the-process-limits-optional\" aria-label=\"update the process limits optional permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Update the Process Limits (Optional)</h2>\n<p>This is optionally required in order to control the maximum number of acceptable connections while keeping the system stable.\nOpen the <code>/etc/security/limits.conf</code> file and add the following entries.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"7\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">* soft nofile 64000</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">* hard nofile 64000</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">* soft nproc 32000</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">* hard nproc 32000</span></span></code></pre>\n<p>Now that all of the infra related prerequisites are sorted, <strong>reboot</strong> the instance, and let’s proceed to MongoDB installation.</p>\n<hr />\n<h1 id=\"1-setting-up-mongodb\" style=\"position:relative;\"><a href=\"#1-setting-up-mongodb\" aria-label=\"1 setting up mongodb permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>1. Setting up MongoDB</h1>\n<h2 id=\"add-the-repo-source\" style=\"position:relative;\"><a href=\"#add-the-repo-source\" aria-label=\"add the repo source permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Add the Repo Source</h2>\n<p>Create a file <code>/etc/yum.repos.d/mongodb-org.4.2.repo</code> and add the following package repository details.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"8\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">[mongodb-org-4.2]</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">name=MongoDB Repository</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">baseurl=https://repo.mongodb.org/yum/redhat/</span><span class=\"mtk12\">$releasever</span><span class=\"mtk1\">/mongodb-org/4.2/x86_64/</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">gpgcheck=1</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">enabled=1</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">gpgkey=https://www.mongodb.org/static/pgp/server-4.2.asc</span></span></code></pre>\n<p>Now let’s install MongoDB.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"9\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ sudo yum -y install mongodb-org</span></span></code></pre>\n<h2 id=\"create-directories-and-setup-permissions\" style=\"position:relative;\"><a href=\"#create-directories-and-setup-permissions\" aria-label=\"create directories and setup permissions permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Create directories and setup permissions</h2>\n<p>MongoDB by default uses the following paths to store the data and the internal logs:</p>\n<blockquote>\n<p><strong>/var/lib/mongo</strong> → Data<br><strong>/var/log/mongodb</strong> → Logs</p>\n</blockquote>\n<p><strong>Create the directories</strong></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"10\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ sudo mkdir /var/lib/mongo</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">$ sudo mkdir /var/log/mongodb</span></span></code></pre>\n<p><strong>Change user &#x26; group permissions</strong></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"11\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ sudo chown mongod:mongod /var/lib/mongo</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">$ sudo chown mongod:mongod /var/log/mongod</span></span></code></pre>\n<h2 id=\"create-an-admin-user\" style=\"position:relative;\"><a href=\"#create-an-admin-user\" aria-label=\"create an admin user permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Create an Admin User</h2>\n<p>The <strong>mongod daemon/service</strong> must be first running before we proceed to create a user.\nLet’s use the default config(stored in <code>/etc/mongod.conf</code>) for now and start the daemon process.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"12\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ sudo -u mongod mongod -f /etc/mongod.conf</span></span></code></pre>\n<p>The above command will start the mongod daemon in fork mode (default).</p>\n<p>Now, let’s login to the server and create our first admin user.</p>\n<p><strong>Open a mongo shell</strong></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"13\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ mongo</span></span></code></pre>\n<p><strong>Use the \"admin\" database to create the root-admin</strong></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"14\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&gt; use admin</span></span></code></pre>\n<p><strong>Create the admin user</strong></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"15\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&gt; db.createUser({user: </span><span class=\"mtk8\">&quot;admin&quot;</span><span class=\"mtk1\">, pwd: </span><span class=\"mtk8\">&quot;password&quot;</span><span class=\"mtk1\">, roles: [{role: </span><span class=\"mtk8\">&quot;root&quot;</span><span class=\"mtk1\">, db: </span><span class=\"mtk8\">&quot;admin&quot;</span><span class=\"mtk1\">}]})</span></span></code></pre>\n<p><strong>Create a regular user</strong></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"16\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&gt; db.createUser({user: </span><span class=\"mtk8\">&quot;normal_user&quot;</span><span class=\"mtk1\">, pwd: </span><span class=\"mtk8\">&quot;password&quot;</span><span class=\"mtk1\">, roles: [{role: </span><span class=\"mtk8\">&quot;readWriteAnyDatabase&quot;</span><span class=\"mtk1\">, db: </span><span class=\"mtk8\">&quot;admin&quot;</span><span class=\"mtk1\">}]})</span></span></code></pre>\n<p><strong>Shutdown the server for now. We'll restart again with the modified config</strong></p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"17\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">&gt; </span><span class=\"mtk11\">db.shutDownServer</span><span class=\"mtk1\">()</span></span></code></pre>\n<h2 id=\"setting-up-authentication\" style=\"position:relative;\"><a href=\"#setting-up-authentication\" aria-label=\"setting up authentication permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Setting up Authentication</h2>\n<p>Here, we’ll enable the database authentication and modify the bind-address for our server to be accessible in the public domain.\nOpen <code>/etc/mongod.conf</code> and make the below changes.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"18\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk3\"># network interfaces</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">net:</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  port: 27017</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  bindIp: 0.0.0.0 </span><span class=\"mtk3\"># accessible on the network address</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">security:</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  authorization: enabled </span><span class=\"mtk3\"># creds will be required for making db operations</span></span></code></pre>\n<p>Save the config and <strong>restart</strong> the server.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"19\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ sudo -u mongod mongod -f /etc/mongod.conf</span></span></code></pre>\n<h2 id=\"test-login\" style=\"position:relative;\"><a href=\"#test-login\" aria-label=\"test login permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Test Login</h2>\n<p>You can verify if the credentials work using,</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"bash\" data-index=\"20\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk1\">$ mongo -u admin -p password</span></span></code></pre>\n<p>That is it about the initial setup! Please stay tuned for my next related post on the detailed migration process and tips on keeping the DB production-ready.</p>\n<p>P.S. Thanks to <a href=\"https://twitter.com/MrEnvoy17\">Piyush Kumar</a> for helping curate this post!</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk3 { color: #6A9955; }\n</style>","frontmatter":{"date":"June 30, 2020","updated_date":null,"title":"Self-Hosted MongoDB","tags":["MongoDB","Mongo","AWS","Atlas"],"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":2.0408163265306123,"src":"/static/504642ca3a1f7d78dea8509436faa4c6/14b42/cover.jpg","srcSet":"/static/504642ca3a1f7d78dea8509436faa4c6/f836f/cover.jpg 200w,\n/static/504642ca3a1f7d78dea8509436faa4c6/2244e/cover.jpg 400w,\n/static/504642ca3a1f7d78dea8509436faa4c6/14b42/cover.jpg 800w,\n/static/504642ca3a1f7d78dea8509436faa4c6/d8343/cover.jpg 925w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Chinmaya Pati","github":"cnp96","avatar":null}}}},{"node":{"fields":{"slug":"/engineering/failover-systems-and-loginradius-99-99-uptime/"},"html":"<p>Do you remember the Amazon outage that affected several high-profile customers back in 2011? On April 21st, widely-used sites such as Reddit and Quora were brought down, and many others experienced latency or were knocked offline, too. Early that morning, as part of normal scaling activities, Amazon staff performed a network change. However, the change was done incorrectly and, after the staff attempted to correct it through a rollback, the inner mechanisms of the service made it unavailable to serve read and write requests. The ‘inner mechanisms’ responsible for the service unavailability are out of the scope of this article, but they are described in the <a href=\"https://aws.amazon.com/message/65648/\">service disruption summary</a> that Amazon published. What interests us here is the strategies that companies can use to mitigate the negative effects on their products when a service they rely on fails. These strategies make up what is known as a <em>failover system</em>.</p>\n<p>A failover system is a set of mechanisms that perform <em>failover</em>. In computer networking, failover is the process of switching to a redundant or standby server or network upon the <strong><em>abnormal</em></strong> termination of a previously-active server or network. The benefit of a failover system is obvious: with one in place, you can ensure your product or service will be available even when adverse events take place. Uptime—time during which a service is operational—is crucial to the success of your business. If your services are unavailable, you are likely to lose customers and any revenue they would have generated. In an article entitled <a href=\"https://medium.com/netflix-techblog/lessons-netflix-learned-from-the-aws-outage-deefe5fd0c04\">‘Lessons Netflix Learned from the AWS Outage</a>,’ Netflix talks about the manual process they used to deal with the Amazon outage and acknowledges the importance of automating this process in the future so they can keep scaling their service. That is, the company acknowledges the importance of having an automated failover system in place instead of relying on a team of top engineers <strong><em>manually</em></strong> making changes every time there is an issue.</p>\n<p>How is an automated failover system set up? Let us consider the simplest scenario: setting a failover system for one server. By definition of a failover system, in addition to the main server, we need to have another redundant standby server that we can switch to whenever the main one fails. Since the redundant server must provide the same functionality as the first, it must be identical to it. Additionally, we need a tool that ensures client requests are routed to the redundant server in case of failure of the main one. We can achieve this by using a DNS failover tool. DNS is the internet protocol used to translate human-readable hostnames into IP addresses, and a DNS failover tool makes sure the “dictionary” (DNS tables) used for this translation are updated in the event of an outage. DNS failover tools know when to update the tables by periodically checking on the main server’s status. With these three tools—and some configuration—you can set up a simple, automated failover system. Of course, there are other considerations you must take when setting the failover system, such as ensuring the redundant standby server is hosted in a geographic area different from the main server’s location and using different companies to host your services. That way, your services will be less likely to go down simultaneously. </p>\n<p>At LoginRadius, we have set up automated failover systems in all layers of our architecture, which is why we can ensure 99.99% uptime on a monthly basis. With our services, you can be assured your customers will always be able to engage with your business, ensuring you will never lose these customers and any revenue they will generate. </p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n</style>","frontmatter":{"date":"June 24, 2019","updated_date":null,"title":"Failover Systems and LoginRadius' 99.99% Uptime","tags":["Engineering","AWS"],"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.0050251256281406,"src":"/static/b25cc95f0b8e5c745ef8652dfb386e3b/40823/tech.jpg","srcSet":"/static/b25cc95f0b8e5c745ef8652dfb386e3b/f836f/tech.jpg 200w,\n/static/b25cc95f0b8e5c745ef8652dfb386e3b/2244e/tech.jpg 400w,\n/static/b25cc95f0b8e5c745ef8652dfb386e3b/40823/tech.jpg 719w","sizes":"(max-width: 719px) 100vw, 719px"}}},"author":{"id":"Ruben Gonzalez","github":"rubenprograms","avatar":null}}}}]}},"pageContext":{"tag":"AWS"}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}