Skip to content

Instantly share code, notes, and snippets.

@mafonso
Last active June 12, 2025 16:54
Show Gist options
  • Save mafonso/7ee51981581f544ed52c to your computer and use it in GitHub Desktop.
Save mafonso/7ee51981581f544ed52c to your computer and use it in GitHub Desktop.

Revisions

  1. mafonso revised this gist Sep 14, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions oneliner
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    for user in $(aws iam list-users --output text --no-cli-pager| awk '{print $NF}'); do aws iam list-access-keys --user $user --output json --no-cli-pager; done | jq
  2. mafonso revised this gist Sep 14, 2023. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions list-all-access-keys.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,4 @@
    #!/usr/bin/env bash
    for user in $(aws iam list-users --output text | awk '{print $NF}'); do
    aws iam list-access-keys --user $user --output text
    for user in $(aws iam list-users --output text --no-cli-pager | awk '{print $NF}'); do
    aws iam list-access-keys --user $user --output text --no-cli-pager
    test $? -gt 128 && exit
    done
  3. Miguel Afonso revised this gist Aug 13, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions list-all-access-keys.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    #!/usr/bin/env bash
    for user in $(aws iam list-users --output text | awk '{print $NF}'); do
    aws iam list-access-keys --user $user --output text
    test $? -gt 128 && exit
    done
  4. Miguel Afonso revised this gist Aug 13, 2015. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions list-all-access-keys.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    #!/usr/bin/env bash
    for user in $(aws iam list-users --output text | awk '{print $NF}'); do
    aws iam list-access-keys --user $user --output text
    done
  5. Miguel Afonso created this gist Aug 13, 2015.
    3 changes: 3 additions & 0 deletions list-all-access-keys.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    for user in $(aws iam list-users --output text | awk '{print $NF}'); do
    aws iam list-access-keys --user $user --output text
    done