Answers: <p>There are a few ways to perform the action you're looking for.  I'll demonstrate how to accomplish this task from the command line and the console.  Using the SDK's (e.g. boto3) are an option too.</p>
  <p>From the command line you can use:</p>
  <pre><code>aws iam simulate-principal-policy --policy-source-arn &lt;arn of role or user&gt; --action-names eks:AccessKubernetesApi --query 'EvaluationResults[].EvalDecision'
  </code></pre>
  <p>It will return the following if you have access :</p>
  <blockquote>
  <p>[ &quot;allowed&quot; ]</p>
  </blockquote>
  <p>From the console use the <a href="https://policysim.aws.amazon.com/" rel="nofollow noreferrer">IAM Simulator</a><br />
  Pick the Role/User/Group that you wish to test:</p>
  <p><a href="https://i.sstatic.net/evT9M.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/evT9M.png" alt="enter image description here" /></a></p>
  <p>Then choose the service:</p>
  <p><a href="https://i.sstatic.net/AgZwx.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/AgZwx.png" alt="enter image description here" /></a></p>
  <p>And the action(s):</p>
  <p><a href="https://i.sstatic.net/hQJna.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hQJna.png" alt="enter image description here" /></a></p>
  <p>Click <code>Run Simulation</code> and the results will be published:</p>
  <p><a href="https://i.sstatic.net/hTy0w.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/hTy0w.png" alt="enter image description here" /></a></p>
  <p><strong>References</strong><br />
  <a href="https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/simulate-principal-policy.html" rel="nofollow noreferrer">Simulate Principle Policy</a><br />
  <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html" rel="nofollow noreferrer">Access Policies Testing Policies</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2022-04-06T15:36:19.593Z
Answers: 2022-04-06T15:36:19.593Z
Answers: kenlukas
Body: <p>I am logged in to AWS as the AWS Admin, with Administrator access.</p>
  <p>How do I find out if this user has the <code>eks:AccessKubernetesApi</code> IAM permission?</p>
  
Tags: <amazon-web-services><aws-iam><eks>
Title: Does the AWS Admin user have the eks:AccessKubernetesApi permission?
UserDisplayName: Snowcrash
ThreadText: # Does the AWS Admin user have the eks:AccessKubernetesApi permission?
  
  (Asked by: username_0 on 2022-04-06)
  
  I am logged in to AWS as the AWS Admin, with Administrator access.
  
  How do I find out if this user has the `eks:AccessKubernetesApi` IAM permission?
  
  **Tags:** amazon-web-services, aws-iam, eks
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-04-06. Score: 1 | Accepted answer
  
  There are a few ways to perform the action you're looking for. I'll demonstrate how to accomplish this task from the command line and the console. Using the SDK's (e.g. boto3) are an option too.
  
  From the command line you can use:
  
  ```
  aws iam simulate-principal-policy --policy-source-arn <arn of role or user> --action-names eks:AccessKubernetesApi --query 'EvaluationResults[].EvalDecision'
  
  ```
  
  It will return the following if you have access :
  
  > [ "allowed" ]
  
  From the console use the [IAM Simulator](https://policysim.aws.amazon.com/)  
  Pick the Role/User/Group that you wish to test:
  
  [![enter image description here](https://i.sstatic.net/evT9M.png)](https://i.sstatic.net/evT9M.png)
  
  Then choose the service:
  
  [![enter image description here](https://i.sstatic.net/AgZwx.png)](https://i.sstatic.net/AgZwx.png)
  
  And the action(s):
  
  [![enter image description here](https://i.sstatic.net/hQJna.png)](https://i.sstatic.net/hQJna.png)
  
  Click `Run Simulation` and the results will be published:
  
  [![enter image description here](https://i.sstatic.net/hTy0w.png)](https://i.sstatic.net/hTy0w.png)
  
  **References**  
  [Simulate Principle Policy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/simulate-principal-policy.html)  
  [Access Policies Testing Policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html)
  
  
  ---
  
  