0

I'm studying AWS EKS and I'm following the ufficial AWS Documentation. As explained here I created the "AWSLoadBalancerControllerIAMPolicy" but I would like to check if it has been correctly created. How can I see the list of the created policies?

I'm asking because I already tried to create many of them with different names (like: AWSLoadBalancerControllerIAMPolicyTest, AWSLoadBalancerControllerIAMPolicyExperiment... etc) but, once created, I can't find them anywhere.

I tried to give a look here (the IAM policy manager) but as you can see from the following screenshot they are not listed. Is there a way? Also through a CLI command? To be honest it will be really usefull when I need to clean up the environment.

Thanks really appreciate your help! Ennio

enter image description here

brian enno
  • 400
  • 5
  • 16
  • 1
    When you run the command to create the policy (aws iam create-policy ...) do you get a success response? Also, maybe you are checking in a different account please validate your credentials – OARP Jan 02 '22 at 15:09
  • Yes you are right! They ended up in another account :-( If you want I can mark your answer as correct. Can you write it instead this simple comment? – brian enno Jan 02 '22 at 16:09
  • Great! I just have added as answer – OARP Jan 02 '22 at 17:09

1 Answers1

0

After run the command

aws iam create-policy --policy-name AWSLoadBalancerControllerIAMPolicyTest --policy-document file://iam_policy.json

you get a response like this:

{
    "Policy": {
        "PolicyName": "AWSLoadBalancerControllerIAMPolicyTest",
        "PolicyId": "ANPA2BMVX57HOOWXXXXXX",
        "Arn": "arn:aws:iam::<ACCOUNT_ID>:policy/AWSLoadBalancerControllerIAMPolicyTest",
        "Path": "/",
        "DefaultVersionId": "v1",
        "AttachmentCount": 0,
        "PermissionsBoundaryUsageCount": 0,
        "IsAttachable": true,
        "CreateDate": "2022-01-XXTXX:XX:XX+00:00",
        "UpdateDate": "2022-01-XXTXX:XX:XX+00:00"
    }
}

Make sure the account you are using when running the command is the same you are checking on the web console.

OARP
  • 3,429
  • 1
  • 11
  • 20