{"id":395,"date":"2023-07-22T03:38:59","date_gmt":"2023-07-22T03:38:59","guid":{"rendered":"https:\/\/joseph-t-gordon.tech\/?p=395"},"modified":"2023-07-22T03:39:00","modified_gmt":"2023-07-22T03:39:00","slug":"post-74-aws-assigning-roles-to-ec2-instances","status":"publish","type":"post","link":"https:\/\/joseph-t-gordon.tech\/index.php\/2023\/07\/22\/post-74-aws-assigning-roles-to-ec2-instances\/","title":{"rendered":"Post #74 (AWS) &#8211; Assigning roles to EC2 instances"},"content":{"rendered":"\n<p>Let&#8217;s say you create a new EC2 instance and you want to be able to read users in IAM from there with <\/p>\n\n\n\n<p>aws iam list-users<\/p>\n\n\n\n<p>However this command will fair as the instance does not have the permission. All you need to do is create a role in IAM, assign the appropriate permission, in this case IAM Read Only and then attach the role to the instance. Just be sure to follow the principle of least privilege.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s say you create a new EC2 instance and you want to be able to read users in IAM from there with aws iam list-users However this command will fair as the instance does not have the permission. All you need to do is create a role in IAM, assign the appropriate permission, in this&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/joseph-t-gordon.tech\/index.php\/wp-json\/wp\/v2\/posts\/395"}],"collection":[{"href":"https:\/\/joseph-t-gordon.tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joseph-t-gordon.tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joseph-t-gordon.tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joseph-t-gordon.tech\/index.php\/wp-json\/wp\/v2\/comments?post=395"}],"version-history":[{"count":1,"href":"https:\/\/joseph-t-gordon.tech\/index.php\/wp-json\/wp\/v2\/posts\/395\/revisions"}],"predecessor-version":[{"id":396,"href":"https:\/\/joseph-t-gordon.tech\/index.php\/wp-json\/wp\/v2\/posts\/395\/revisions\/396"}],"wp:attachment":[{"href":"https:\/\/joseph-t-gordon.tech\/index.php\/wp-json\/wp\/v2\/media?parent=395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joseph-t-gordon.tech\/index.php\/wp-json\/wp\/v2\/categories?post=395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joseph-t-gordon.tech\/index.php\/wp-json\/wp\/v2\/tags?post=395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}