Forráskód Böngészése

add py/IAM-Create.py.

xdc 5 éve
szülő
commit
d78f20c30a
1 módosított fájl, 11 hozzáadás és 0 törlés
  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')
+