{"id":1787,"date":"2019-08-07T07:10:49","date_gmt":"2019-08-07T07:10:49","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=1787"},"modified":"2020-05-02T06:48:13","modified_gmt":"2020-05-02T06:48:13","slug":"deploy-an-ec2-instance","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/","title":{"rendered":"Deploy An EC2 Instance"},"content":{"rendered":"\n<p>Steps to deploy code to EC2<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Step 1: <\/strong>Create a Key Pair &#8211; If not present, create a key pair to access virtual machine with Amazon EC2.&nbsp; <\/li><li><strong>Step 2:<\/strong> Enter the CodeDeploy Console &#8211; In the AWS CodeDeploy Console, click Get Started Now. Select Sample Deployment and click Next Step.<\/li><li><strong>Step 3:<\/strong> Launch a Virtual Machine &#8211; AWS virtual machines or Amazon EC2 instances, or just &#8216;instances&#8217;, are launched as per available templates by selecting <ul><li>Operating System: OS of EC2 Instance<\/li><\/ul><ul><li>Instance Type:&nbsp; Select instance type as per varying combinations of CPU, memory, storage, and networking capacity. The t1.micro instance type is selected in this example.<\/li><\/ul><ul><li>Key Pair Name: Select key pair to connect to Amazon EC2 instances. <\/li><\/ul><ul><li>Tag Key and Value: AWS CodeDeploy will use tag key and value to locate the instances during deployments. <\/li><\/ul><\/li><li><strong>Step 4: <\/strong>Click Launch Instances. Name Application and Review Application Revision<\/li><li><strong>Step 5:<\/strong> Create a Deployment Group &#8211; set of individual EC2 instances that CodeDeploy deploys revisions to and has individually tagged instances, Amazon EC2 instances in Auto Scaling groups, or both. Following is to be done by specifying the Amazon EC2 instances to deploy by entering the key-value pair <\/li><li><strong>Step 6:<\/strong> Create a Service Role &#8211; Grant AWS CodeDeploy permission to deploy to instances by creating a role for it. <\/li><li><strong>Step 7:<\/strong> Deploy Application &#8211; select a deployment configuration and then initiate the deployment to EC2 instances. <\/li><li><strong>Step 8: <\/strong>Clean Up Instances &#8211; The deployed EC2 instances will be running till terminated. Delete if instance is not needed <\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Steps to deploy code to EC2 Step 1: Create a Key Pair &#8211; If not present, create a key pair to access virtual machine with Amazon EC2.&nbsp; Step 2: Enter the CodeDeploy Console &#8211; In the AWS CodeDeploy Console, click Get Started Now. Select Sample Deployment and click Next Step. Step 3: Launch a Virtual&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":383,"menu_order":45,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[309],"class_list":["post-1787","page","type-page","status-publish","hentry","category-amazon-aws","tag-deploy-an-ec2"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Deploy An EC2 Instance - Testprep Training Tutorials<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Deploy An EC2 Instance - Testprep Training Tutorials\" \/>\n<meta property=\"og:description\" content=\"Steps to deploy code to EC2 Step 1: Create a Key Pair &#8211; If not present, create a key pair to access virtual machine with Amazon EC2.&nbsp; Step 2: Enter the CodeDeploy Console &#8211; In the AWS CodeDeploy Console, click Get Started Now. Select Sample Deployment and click Next Step. Step 3: Launch a Virtual...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-02T06:48:13+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/\",\"name\":\"Deploy An EC2 Instance - Testprep Training Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2019-08-07T07:10:49+00:00\",\"dateModified\":\"2020-05-02T06:48:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AWS Certified SysOps Administrator &#8211; Associate (SOA-C01)\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Deploy An EC2 Instance\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Deploy An EC2 Instance - Testprep Training Tutorials","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/","og_locale":"en_US","og_type":"article","og_title":"Deploy An EC2 Instance - Testprep Training Tutorials","og_description":"Steps to deploy code to EC2 Step 1: Create a Key Pair &#8211; If not present, create a key pair to access virtual machine with Amazon EC2.&nbsp; Step 2: Enter the CodeDeploy Console &#8211; In the AWS CodeDeploy Console, click Get Started Now. Select Sample Deployment and click Next Step. Step 3: Launch a Virtual...","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/","og_site_name":"Testprep Training Tutorials","article_modified_time":"2020-05-02T06:48:13+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/","name":"Deploy An EC2 Instance - Testprep Training Tutorials","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2019-08-07T07:10:49+00:00","dateModified":"2020-05-02T06:48:13+00:00","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/deploy-an-ec2-instance\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"AWS Certified SysOps Administrator &#8211; Associate (SOA-C01)","item":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-sysops-administrator-associate\/"},{"@type":"ListItem","position":3,"name":"Deploy An EC2 Instance"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/1787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=1787"}],"version-history":[{"count":3,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/1787\/revisions"}],"predecessor-version":[{"id":5244,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/1787\/revisions\/5244"}],"up":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/383"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=1787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=1787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=1787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}