Skip to content

Instantly share code, notes, and snippets.

@spensireli
Created November 7, 2023 14:58
Show Gist options
  • Save spensireli/9a0a15585e8a2711caa5088b7a4f3250 to your computer and use it in GitHub Desktop.
Save spensireli/9a0a15585e8a2711caa5088b7a4f3250 to your computer and use it in GitHub Desktop.
Loop through and Remove KMS Key Grants
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