{"id":7364,"date":"2020-08-04T11:22:29","date_gmt":"2020-08-04T15:22:29","guid":{"rendered":"https:\/\/www.redline13.com\/blog\/?page_id=7364"},"modified":"2022-01-17T23:46:41","modified_gmt":"2022-01-18T04:46:41","slug":"create-ec2-iam-instance-profile","status":"publish","type":"page","link":"https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/","title":{"rendered":"Create EC2 IAM Instance Profile"},"content":{"rendered":"\n<p>EC2 IAM Instance Profile is the AWS way of giving limited access to EC2 instances to other AWS Resources.  We document the benefit of this and how to use it within RedLine13 Load agents <a href=\"https:\/\/www.redline13.com\/blog\/attaching-aws-instance-profile-to-a-load-agent\/\">here<\/a>.   This document is a how-to for creating the EC2 IAM Instance Profile in AWS Console connecting EC2 to an S3 bucket. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 1. Go to AWS IAM, Create Role <\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>AWS IAM Console <a href=\"https:\/\/console.aws.amazon.com\/iam\/home?region=us-east-1#\/roles$new?step=type\">Create Role<\/a><\/li><li>Select AWS Service<\/li><li>Choose Use Case -&gt; EC2<\/li><li>Click &#8216;Next:Permissions&#8217;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"726\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/CreateRoleSelectService-1-1024x726.jpg\" alt=\"\" class=\"wp-image-7350\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/CreateRoleSelectService-1-1024x726.jpg 1024w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/CreateRoleSelectService-1-300x213.jpg 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/CreateRoleSelectService-1-768x545.jpg 768w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/CreateRoleSelectService-1.jpg 1173w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 2.  Establish the Policy<\/strong> <\/h4>\n\n\n\n<p>Our use case is S3 access but this can be used for SQS or other resources.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Create Policy<\/li><li>We are going to skip the nuance here, you can use the wizard to generate the policy.  For S3 we will use the JSON editor<\/li><li>Once complete &#8211; Click &#8216;Review Policy&#8217;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"737\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/PolicyEditor-1024x737.jpg\" alt=\"\" class=\"wp-image-7351\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/PolicyEditor-1024x737.jpg 1024w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/PolicyEditor-300x216.jpg 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/PolicyEditor-768x553.jpg 768w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/PolicyEditor.jpg 1180w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Example JSON Policy<\/p>\n\n\n\n<p><code>{<br>     \"Version\": \"2012-10-17\",<br>     \"Statement\": [<br>         {<br>             \"Sid\": \"LoadAgentS3Access\",<br>             \"Effect\": \"Allow\",<br>             \"Action\": \"s3:GetObject\",<br>             \"Resource\": \"arn:aws:s3:::YOUR_BUCKET\/*\"<br>         }<br>     ]<br> }<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 3.  Save and Create Policy<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>Name your policy as you see fit.<\/li><li>The description is optional. <\/li><li>Review the access you are granting<\/li><li>Click &#8216;Create Policy&#8217;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"751\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/Createpolicy-1024x751.jpg\" alt=\"\" class=\"wp-image-7352\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/Createpolicy-1024x751.jpg 1024w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/Createpolicy-300x220.jpg 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/Createpolicy-768x563.jpg 768w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/Createpolicy.jpg 1177w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Step 4.  <\/strong>Attaching the policy to the role. <\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>After create policy is clicked you should get back (switch back) to creating your role.<\/li><li>You might have to hit refresh on the right side.<\/li><li>Find and select the Policy you just created<\/li><li>Click &#8216;Next: Tags&#8217;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"991\" height=\"694\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/AttacPolicyToRole.jpg\" alt=\"\" class=\"wp-image-7353\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/AttacPolicyToRole.jpg 991w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/AttacPolicyToRole-300x210.jpg 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/AttacPolicyToRole-768x538.jpg 768w\" sizes=\"auto, (max-width: 991px) 100vw, 991px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Step 5. Tags<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>We don&#8217;t use tags, but you can. <\/li><li>Click &#8216;Next: Review&#8217;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"982\" height=\"689\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/RoleTags.jpg\" alt=\"\" class=\"wp-image-7354\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/RoleTags.jpg 982w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/RoleTags-300x210.jpg 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/RoleTags-768x539.jpg 768w\" sizes=\"auto, (max-width: 982px) 100vw, 982px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Step 6.  The final step in creating the Role<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>Name your role <\/li><li>Optionally add a description<\/li><li>Click &#8216;Create Role&#8217;<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"643\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/CreateRoleFinal-1024x643.jpg\" alt=\"\" class=\"wp-image-7356\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/CreateRoleFinal-1024x643.jpg 1024w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/CreateRoleFinal-300x188.jpg 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/CreateRoleFinal-768x482.jpg 768w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/CreateRoleFinal.jpg 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Step 7.  What is your Instance Profile ARN<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>You will need the Instance Profile ARN to use for your load tests. <\/li><li>Find the role you just created and click on it. <\/li><li>Once selected you can see the Instance Profile ARN<\/li><li>Note: Change Maximum Session Duration if your load tests are greater than 1 hour.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"908\" height=\"561\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/FindInstanceProfileARN.jpg\" alt=\"\" class=\"wp-image-7357\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/FindInstanceProfileARN.jpg 908w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/FindInstanceProfileARN-300x185.jpg 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/FindInstanceProfileARN-768x475.jpg 768w\" sizes=\"auto, (max-width: 908px) 100vw, 908px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>EC2 IAM Instance Profile is the AWS way of giving limited access to EC2 instances to other AWS Resources. We document the benefit of this and how to use it within RedLine13 Load agents here. This document is a how-to for creating the EC2 IAM Instance Profile in AWS Console connecting EC2 to an S3 bucket. Step 1. Go to AWS IAM, Create Role AWS IAM Console Create Role Select AWS Service Choose Use Case -&gt;<a class=\"more-link\" href=\"https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/\">Read More &rarr;<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"parent":0,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["entry","page","publish","author-richardfriedman","post-7364"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create EC2 IAM Instance Profile - RedLine13<\/title>\n<meta name=\"description\" content=\"EC2 IAM Instance Profile is the AWS way of giving limited access to EC2 instances to other AWS Resources. Here&#039;s how to use it within RedLine13 Load agents.\" \/>\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.redline13.com\/blog\/create-ec2-iam-instance-profile\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create EC2 IAM Instance Profile - RedLine13\" \/>\n<meta property=\"og:description\" content=\"EC2 IAM Instance Profile is the AWS way of giving limited access to EC2 instances to other AWS Resources. Here&#039;s how to use it within RedLine13 Load agents.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/\" \/>\n<meta property=\"og:site_name\" content=\"RedLine13\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-18T04:46:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/CreateRoleSelectService-1-1024x726.jpg\" \/>\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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/\",\"name\":\"Create EC2 IAM Instance Profile - RedLine13\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\"},\"datePublished\":\"2020-08-04T15:22:29+00:00\",\"dateModified\":\"2022-01-18T04:46:41+00:00\",\"description\":\"EC2 IAM Instance Profile is the AWS way of giving limited access to EC2 instances to other AWS Resources. Here's how to use it within RedLine13 Load agents.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.redline13.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create EC2 IAM Instance Profile\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\",\"url\":\"https:\/\/www.redline13.com\/blog\/\",\"name\":\"RedLine13\",\"description\":\"(Almost) Free Load Testing in the Cloud\",\"publisher\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.redline13.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#organization\",\"name\":\"RedLine13\",\"url\":\"https:\/\/www.redline13.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg\",\"contentUrl\":\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg\",\"width\":300,\"height\":68,\"caption\":\"RedLine13\"},\"image\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create EC2 IAM Instance Profile - RedLine13","description":"EC2 IAM Instance Profile is the AWS way of giving limited access to EC2 instances to other AWS Resources. Here's how to use it within RedLine13 Load agents.","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.redline13.com\/blog\/create-ec2-iam-instance-profile\/","og_locale":"en_US","og_type":"article","og_title":"Create EC2 IAM Instance Profile - RedLine13","og_description":"EC2 IAM Instance Profile is the AWS way of giving limited access to EC2 instances to other AWS Resources. Here's how to use it within RedLine13 Load agents.","og_url":"https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/","og_site_name":"RedLine13","article_modified_time":"2022-01-18T04:46:41+00:00","og_image":[{"url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/CreateRoleSelectService-1-1024x726.jpg"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/","url":"https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/","name":"Create EC2 IAM Instance Profile - RedLine13","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/#website"},"datePublished":"2020-08-04T15:22:29+00:00","dateModified":"2022-01-18T04:46:41+00:00","description":"EC2 IAM Instance Profile is the AWS way of giving limited access to EC2 instances to other AWS Resources. Here's how to use it within RedLine13 Load agents.","breadcrumb":{"@id":"https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.redline13.com\/blog\/create-ec2-iam-instance-profile\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.redline13.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create EC2 IAM Instance Profile"}]},{"@type":"WebSite","@id":"https:\/\/www.redline13.com\/blog\/#website","url":"https:\/\/www.redline13.com\/blog\/","name":"RedLine13","description":"(Almost) Free Load Testing in the Cloud","publisher":{"@id":"https:\/\/www.redline13.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.redline13.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.redline13.com\/blog\/#organization","name":"RedLine13","url":"https:\/\/www.redline13.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg","contentUrl":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2013\/06\/cropped-rl13-header-logo.jpg","width":300,"height":68,"caption":"RedLine13"},"image":{"@id":"https:\/\/www.redline13.com\/blog\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/pages\/7364","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/comments?post=7364"}],"version-history":[{"count":1,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/pages\/7364\/revisions"}],"predecessor-version":[{"id":8895,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/pages\/7364\/revisions\/8895"}],"wp:attachment":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/media?parent=7364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}