Created
November 7, 2023 14:58
-
-
Save spensireli/9a0a15585e8a2711caa5088b7a4f3250 to your computer and use it in GitHub Desktop.
Loop through and Remove KMS Key Grants
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for grant_id in $(aws kms list-grants --key-id <key-id> --query 'Grants[].GrantId' --output text); do aws kms revoke-grant --key-id <key-id> --grant-id $grant_id; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment