title: AWS Policies explained?
body: <p>I am learning AWS and I have the following task in an online training course:</p>
  <blockquote>
  <p>Configure the MongoDB VM as highly privileged – configure an instance
  profile to the VM and add the permission “ec2:*” as a custom policy.</p>
  </blockquote>
  <p>I am trying to work out what that means. Is the task asking for a role that enables the VM instance to have full control over all EC2 resources?</p>
  <p>If I understand it correctly, then I think the following policy would implement it.</p>
  <pre><code>{
      &quot;Version&quot;: &quot;2012-10-17&quot;,
      &quot;Statement&quot;: [
          {
              &quot;Action&quot;: [
                  &quot;ec2:*&quot;
              ],
              &quot;Effect&quot;: &quot;Allow&quot;,
              &quot;Resource&quot;: &quot;arn:aws:ec2:*:*:instance&quot;
          }
      ]
  }
  </code></pre>
  <p>My understanding is that this policy is saying any EC2 instance can perform any EC2 action. Is that right?</p>