Skip to content

Instantly share code, notes, and snippets.

@bmwitcher
Created November 24, 2020 04:29
Show Gist options
  • Save bmwitcher/b9337e52b6001ddbdd7d1fcf7c94df51 to your computer and use it in GitHub Desktop.
Save bmwitcher/b9337e52b6001ddbdd7d1fcf7c94df51 to your computer and use it in GitHub Desktop.
deleting user in iam in aws
import boto3
iam = boto3.client('iam')
response = iam.detach_user_policy(
UserName='pythontestuser',
PolicyArn='arn:aws:iam::aws:policy/AmazonEC2FullAccess'
)
response = iam.delete_user(
UserName='pythontestuser'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment