amazon-web-servicesamazon-ekspolicies

Where AWS stores the created AWSLoadBalancerControllerIAMPolicy policy and how can I see it


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


Solution

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