Created
August 18, 2020 16:40
-
-
Save PGBI/d4f234afec41351c61ad8404b48b918b to your computer and use it in GitHub Desktop.
[AWS CLI] Delete all network interfaces in "available" status
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
aws ec2 describe-network-interfaces \ | |
--filters Name=status,Values=available \ | |
--query "NetworkInterfaces[*].NetworkInterfaceId" \ | |
| jq --raw-output '.[]' | xargs -I {} aws ec2 delete-network-interface --network-interface-id {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment