patternMinor
Does the AWS Admin user have the eks:AccessKubernetesApi permission?
Viewed 0 times
theadmineksuserpermissionaccesskubernetesapiawsdoeshave
Problem
I am logged in to AWS as the AWS Admin, with Administrator access.
How do I find out if this user has the
How do I find out if this user has the
eks:AccessKubernetesApi IAM permission?Solution
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:
It will return the following if you have access :
[ "allowed" ]
From the console use the IAM Simulator
Pick the Role/User/Group that you wish to test:
Then choose the service:
And the action(s):
Click
References
Simulate Principle Policy
Access Policies Testing Policies
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 IAM Simulator
Pick the Role/User/Group that you wish to test:
Then choose the service:
And the action(s):
Click
Run Simulation and the results will be published:References
Simulate Principle Policy
Access Policies Testing Policies
Code Snippets
aws iam simulate-principal-policy --policy-source-arn <arn of role or user> --action-names eks:AccessKubernetesApi --query 'EvaluationResults[].EvalDecision'Context
StackExchange DevOps Q#15749, answer score: 1
Revisions (0)
No revisions yet.