我想使用脚本删除 IAM 用户,该脚本的前缀为 "vault-" 并且超过 2 天
I want to delete IAM users with a script which have a prefix "vault-" to them and are older than 2 days
如何使用 aws cli 列出超过 2 天并附加前缀的 IAM 用户?
aws iam list-users | jq '.Users[] | select ( .CreateDate | contains("2019-10-10") ) | select ( .UserName | startswith("vault-") ) | .UserId'
然后您可以遍历结果以删除用户
如何使用 aws cli 列出超过 2 天并附加前缀的 IAM 用户?
aws iam list-users | jq '.Users[] | select ( .CreateDate | contains("2019-10-10") ) | select ( .UserName | startswith("vault-") ) | .UserId'
然后您可以遍历结果以删除用户