Does the AWS Admin user have the eks:AccessKubernetesApi permission?



  • 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?



  • 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  --action-names eks:AccessKubernetesApi --query 'EvaluationResults[].EvalDecision'
    

    It will return the following if you have access :

    [ "allowed" ]

    From the console use the https://policysim.aws.amazon.com/
    Pick the Role/User/Group that you wish to test:

    enter image description here

    Then choose the service:

    enter image description here

    And the action(s):

    enter image description here

    Click Run Simulation and the results will be published:

    enter image description here

    References
    https://awscli.amazonaws.com/v2/documentation/api/latest/reference/iam/simulate-principal-policy.html
    https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_testing-policies.html



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2