Parcourir la source

add py/IAM-Create.py.

xdc il y a 5 ans
Parent
commit
d78f20c30a
1 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. 11 0
      py/IAM-Create.py

+ 11 - 0
py/IAM-Create.py

@@ -0,0 +1,11 @@
+import boto3
+client  = boto3.client('iam')
+
+client.create_user(UserName='heheda')
+
+response = client.attach_user_policy(
+    UserName='heheda',
+    PolicyArn='arn:aws-cn:iam::aws:policy/AdministratorAccess')
+
+client.create_login_profile(UserName='heheda',Password='heheda')
+