{"id":7341,"date":"2020-08-04T10:03:31","date_gmt":"2020-08-04T14:03:31","guid":{"rendered":"https:\/\/www.redline13.com\/blog\/?page_id=7341"},"modified":"2022-01-17T23:41:53","modified_gmt":"2022-01-18T04:41:53","slug":"attaching-aws-instance-profile-to-a-load-agent","status":"publish","type":"page","link":"https:\/\/www.redline13.com\/blog\/attaching-aws-instance-profile-to-a-load-agent\/","title":{"rendered":"Attaching an AWS Instance Profile to a load agent"},"content":{"rendered":"<p>The load agents which are spun in your AWS environment have no access to other AWS resources, by default they only have access to standard protocols limited to the VPC environment in which they are launched. Short version &#8211; your load agents are limited to making HTTP(s) requests to services. We will walk through attaching an AWS Instance Profile to a load agent.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7342 size-full\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/LoadAgentsWithNoAccess.png\" alt=\"\" width=\"923\" height=\"491\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/LoadAgentsWithNoAccess.png 923w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/LoadAgentsWithNoAccess-300x160.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/LoadAgentsWithNoAccess-768x409.png 768w\" sizes=\"auto, (max-width: 923px) 100vw, 923px\" \/><\/p>\n<p>There are times you might want your load agents to access other AWS resources directly<br \/>\n&#8211; S3 &#8211; To download or upload files or even access the test plan itself<br \/>\n&#8211; SQS &#8211; To send or read messages from a queue, a typical way to trigger load.<\/p>\n<p>To allow your load agent to access specific resources you can use an IAM Instance Profile, thus attaching an AWS Instance Profile to a load agent. You can read all the AWS documentation on this over <a href=\"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/id_roles_use_switch-role-ec2.html\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7343 size-full\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/LoadAgentsWithInstanceProfile.png\" alt=\"\" width=\"952\" height=\"513\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/LoadAgentsWithInstanceProfile.png 952w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/LoadAgentsWithInstanceProfile-300x162.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/LoadAgentsWithInstanceProfile-768x414.png 768w\" sizes=\"auto, (max-width: 952px) 100vw, 952px\" \/><\/p>\n<p><strong>Here are the steps to associate an IAM Instance Profile with your load test<\/strong><\/p>\n<p>1 &#8211; Create an IAM Instance Profile in your AWS Account<\/p>\n<p>&#8211; Here is a guide on &#8220;<a href=\"https:\/\/www.redline13.com\/blog\/2020\/08\/create-ec2-iam-instance-profile\/\">How-To create an instance profile role<\/a>&#8221;<\/p>\n<p>The final output to allow access to S3 buckets and an SQS queue might look like<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7357 size-full\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/FindInstanceProfileARN.jpg\" alt=\"\" width=\"908\" height=\"561\" 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\" \/><\/p>\n<p>2 &#8211; Your account must have IAM Pass Role on your AWS Key<\/p>\n<ul>\n<li>Go to <a href=\"https:\/\/www.redline13.com\/AWS\/Keys\">https:\/\/www.redline13.com\/AWS\/Keys<\/a><\/li>\n<li>Press &#8216;Validate Policy&#8217; on your AWS Key<\/li>\n<li>Confirm iam:PassRole is enabled<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7344 size-full\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/ShowIAMPassRoleAvailable.png\" alt=\"\" width=\"1035\" height=\"312\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/ShowIAMPassRoleAvailable.png 1035w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/ShowIAMPassRoleAvailable-300x90.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/ShowIAMPassRoleAvailable-1024x309.png 1024w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/ShowIAMPassRoleAvailable-768x232.png 768w\" sizes=\"auto, (max-width: 1035px) 100vw, 1035px\" \/><\/li>\n<\/ul>\n<p>3 &#8211; When launching load test specify your IAM Instance Profile<\/p>\n<ul>\n<li>Start Test<\/li>\n<li>Advanced Cloud Options<\/li>\n<li>Select EC2 Instance Profile<\/li>\n<li>Enter your Instance Profile ARN<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7345 size-full\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/SelectEC2InstanceProfile.png\" alt=\"\" width=\"963\" height=\"257\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/SelectEC2InstanceProfile.png 963w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/SelectEC2InstanceProfile-300x80.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/SelectEC2InstanceProfile-768x205.png 768w\" sizes=\"auto, (max-width: 963px) 100vw, 963px\" \/><\/li>\n<li>Launch your tests<\/li>\n<\/ul>\n<p>4 &#8211; If you want to have a default for all load agents or require it for all tests<\/p>\n<ul>\n<li>Go to account -&gt; settings [<a href=\"https:\/\/www.redline13.com\/Account\/settings\">https:\/\/www.redline13.com\/Account\/settings<\/a>]<\/li>\n<li>Select Instance Profile<\/li>\n<li>Enter the default instance profile to use<\/li>\n<li>Optional: Check to require this on every load test<\/li>\n<li><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-7346 size-full\" src=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/DefaultInstanceProfile.png\" alt=\"\" width=\"981\" height=\"186\" srcset=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/DefaultInstanceProfile.png 981w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/DefaultInstanceProfile-300x57.png 300w, https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/DefaultInstanceProfile-768x146.png 768w\" sizes=\"auto, (max-width: 981px) 100vw, 981px\" \/><\/li>\n<\/ul>\n<p>If everything is configured properly your load agents will have access to the AWS resources you specify.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The load agents which are spun in your AWS environment have no access to other AWS resources, by default they only have access to standard protocols limited to the VPC environment in which they are launched. Short version &#8211; your load agents are limited to making HTTP(s) requests to services. We will walk through attaching an AWS Instance Profile to a load agent. There are times you might want your load agents to access other AWS<a class=\"more-link\" href=\"https:\/\/www.redline13.com\/blog\/attaching-aws-instance-profile-to-a-load-agent\/\">Read More &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":40,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["entry","page","publish","author-user","post-7341"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.12 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Attaching an AWS Instance Profile to a load agent - RedLine13<\/title>\n<meta name=\"description\" content=\"The load agents in your AWS environment have no access to other AWS resources. We will walk through attaching an AWS Instance Profile to a load agent.\" \/>\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\/attaching-aws-instance-profile-to-a-load-agent\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Attaching an AWS Instance Profile to a load agent - RedLine13\" \/>\n<meta property=\"og:description\" content=\"The load agents in your AWS environment have no access to other AWS resources. We will walk through attaching an AWS Instance Profile to a load agent.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.redline13.com\/blog\/attaching-aws-instance-profile-to-a-load-agent\/\" \/>\n<meta property=\"og:site_name\" content=\"RedLine13\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-18T04:41:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/LoadAgentsWithNoAccess.png\" \/>\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\/attaching-aws-instance-profile-to-a-load-agent\/\",\"url\":\"https:\/\/www.redline13.com\/blog\/attaching-aws-instance-profile-to-a-load-agent\/\",\"name\":\"Attaching an AWS Instance Profile to a load agent - RedLine13\",\"isPartOf\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/#website\"},\"datePublished\":\"2020-08-04T14:03:31+00:00\",\"dateModified\":\"2022-01-18T04:41:53+00:00\",\"description\":\"The load agents in your AWS environment have no access to other AWS resources. We will walk through attaching an AWS Instance Profile to a load agent.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.redline13.com\/blog\/attaching-aws-instance-profile-to-a-load-agent\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.redline13.com\/blog\/attaching-aws-instance-profile-to-a-load-agent\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.redline13.com\/blog\/attaching-aws-instance-profile-to-a-load-agent\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.redline13.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Attaching an AWS Instance Profile to a load agent\"}]},{\"@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":"Attaching an AWS Instance Profile to a load agent - RedLine13","description":"The load agents in your AWS environment have no access to other AWS resources. We will walk through attaching an AWS Instance Profile to a load agent.","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\/attaching-aws-instance-profile-to-a-load-agent\/","og_locale":"en_US","og_type":"article","og_title":"Attaching an AWS Instance Profile to a load agent - RedLine13","og_description":"The load agents in your AWS environment have no access to other AWS resources. We will walk through attaching an AWS Instance Profile to a load agent.","og_url":"https:\/\/www.redline13.com\/blog\/attaching-aws-instance-profile-to-a-load-agent\/","og_site_name":"RedLine13","article_modified_time":"2022-01-18T04:41:53+00:00","og_image":[{"url":"https:\/\/www.redline13.com\/blog\/wp-content\/uploads\/2020\/08\/LoadAgentsWithNoAccess.png"}],"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\/attaching-aws-instance-profile-to-a-load-agent\/","url":"https:\/\/www.redline13.com\/blog\/attaching-aws-instance-profile-to-a-load-agent\/","name":"Attaching an AWS Instance Profile to a load agent - RedLine13","isPartOf":{"@id":"https:\/\/www.redline13.com\/blog\/#website"},"datePublished":"2020-08-04T14:03:31+00:00","dateModified":"2022-01-18T04:41:53+00:00","description":"The load agents in your AWS environment have no access to other AWS resources. We will walk through attaching an AWS Instance Profile to a load agent.","breadcrumb":{"@id":"https:\/\/www.redline13.com\/blog\/attaching-aws-instance-profile-to-a-load-agent\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.redline13.com\/blog\/attaching-aws-instance-profile-to-a-load-agent\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.redline13.com\/blog\/attaching-aws-instance-profile-to-a-load-agent\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.redline13.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Attaching an AWS Instance Profile to a load agent"}]},{"@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\/7341","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/comments?post=7341"}],"version-history":[{"count":1,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/pages\/7341\/revisions"}],"predecessor-version":[{"id":8893,"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/pages\/7341\/revisions\/8893"}],"wp:attachment":[{"href":"https:\/\/www.redline13.com\/blog\/wp-json\/wp\/v2\/media?parent=7341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}