2 Answers
- Newest
- Most votes
- Most comments
3
try this one
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"iam:RemoveUserFromGroup",
"iam:DeleteSigningCertificate",
"iam:DeleteUserPolicy",
"iam:ListUserPolicies",
"iam:ListGroupsForUser",
"iam:DeleteAccessKey",
"iam:DeleteSSHPublicKey",
"iam:DeleteServiceSpecificCredential",
"iam:DeleteLoginProfile",
"iam:GetUser",
"iam:ListAttachedUserPolicies",
"iam:ListUserTags",
"iam:DetachUserPolicy",
"iam:DeleteUser",
"iam:ListUsers",
"iam:DeleteVirtualMFADevice"
],
"Resource": "*"
}
]
}
0
The above policy should work.
To ensure comprehensive user deletion, it's imperative to account for all associated resources and credentials. This includes Attached Managed Policies, Inline Policies, Access Keys, Group Associations, Tags, Signing Certificates, and CodeCommit SSH Credentials. Please refer to the updated policy guidelines as detailed in the AWS documentation here - https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_delegate-permissions_examples.html#creds-policies-users

please accept the answer if it was helpful