{"componentChunkName":"component---src-templates-tag-js","path":"/tags/ec-2/","result":{"data":{"site":{"siteMetadata":{"title":"LoginRadius Blog"}},"allMarkdownRemark":{"totalCount":1,"edges":[{"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><img src=\"/00b62bc651136276e300af2178f08b67/1_console.webp\" alt=\"AWS Management Console\"></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><img src=\"/cf995d68cacdb4e149eed6e98ca2437b/2_services.webp\" alt=\"AWS Services\"></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><img src=\"/a8f74d863955c6320c60c0d29a52a72b/3_dashboard.webp\" alt=\"EC2 Dashborad\"></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><img src=\"/c46efcd1445b2e70816a37ff5765b0dc/4_ami.webp\" alt=\"EC2 AMIs\"></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><img src=\"/5b219a8dd124e49014949a7934569eb9/5_type.webp\" alt=\"EC2 Types\"></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><img src=\"/c980178a2bf57114a79b80e1e697dc41/6_configuratio.webp\" alt=\"Configure Instance Details\"></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><img src=\"/af636c41fc75f3e9556d65f0900d2742/7_storage.webp\" alt=\"Storage\"></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><img src=\"/013bb6c580181166d7ee92a32211d45b/8_tags.webp\" alt=\"Tags\"></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><img src=\"/542385138ace677410dfae52bef06896/9_security.webp\" alt=\"Security Group\"></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><img src=\"/39083c0324aa6fe4c8bafab2ab1002ef/10_review.webp\" alt=\"Review\"></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><img src=\"/152f89066e3bcbe121bd4b29152a452b/11_key.webp\" alt=\"Security Key\"></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><img src=\"/693d0043ef65710f306cd757b94d6f4f/12_runnning_instace.webp\" alt=\"Running\"></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/d8663624ccdd85c88db0a127028ee564/58556/ec2cover.webp","srcSet":"/static/d8663624ccdd85c88db0a127028ee564/61e93/ec2cover.webp 200w,\n/static/d8663624ccdd85c88db0a127028ee564/1f5c5/ec2cover.webp 400w,\n/static/d8663624ccdd85c88db0a127028ee564/58556/ec2cover.webp 800w,\n/static/d8663624ccdd85c88db0a127028ee564/99238/ec2cover.webp 1200w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Puneet Singh","github":"puneetsingh24","avatar":null}}}}]}},"pageContext":{"tag":"EC2"}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}