Home > OS >  How to create inline policy with AWS API
How to create inline policy with AWS API

Time:12-08

I am writing code which requires IAM role to be created programmatically in Java. I would like an inline policy attached to the role instead of a managed policy. I can only find example and doc to create a role and a managed policy separately, then attach the managed policy to the existing IAM role.

How can I create an IAM role with inline policy?

CodePudding user response:

In Java there is putRolePolicy for that:

Adds or updates an inline policy document that is embedded in the specified IAM role.

  • Related