Reputation: 1166
How can I create roles and policies with Boto 3? I've read the docs, but still cannot work out how to do this.
Upvotes: 1
Views: 3668
Reputation: 25687
I believe you're looking for IAM.Client.create_policy
and IAM.Client.create_role
. The examples from the docs to create a policy and a role, respectively:
response = client.create_policy(
PolicyName='string',
Path='string',
PolicyDocument='string',
Description='string'
)
and
response = client.create_role(
Path='string',
RoleName='string',
AssumeRolePolicyDocument='string'
)
If you've tried these and they don't work, please elaborate on what, exactly, you've tried.
Upvotes: 2