> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IAM Attach Role Policy

Attaches the specified managed policy to the specified IAM role. When you attach a managed policy to a role, the managed policy becomes part of the role's permission (access) policy.

You cannot use a managed policy as the role's trust policy. The role's trust policy is created at the same time as the role, using CreateRole. You can update a role's trust policy using UpdateAssumeRolePolicy.

Use this operation to attach a *managed* policy to a role. To embed an inline policy in a role, use PutRolePolicy. For more information about policies, see [Managed policies and inline policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html) in the *IAM User Guide*.

As a best practice, you can validate your IAM policies. To learn more, see [Validating IAM policies](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_policy-validator.html) in the *IAM User Guide*.

<Note>
  External Documentation

  To learn more, visit the [AWS documentation](https://docs.aws.amazon.com/IAM/latest/APIReference/API_AttachRolePolicy.html).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter     | Description                                                                                                                                                                                                                                                                                                                              |
  | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | AWS Region(s) | Enter the desired AWS Region(s).<br /><br />To execute the action in multiple regions, provide a comma-separated list.<br />For example: `us-east-1,eu-west-2`.<br /><br />If you wish to run the action in all available regions, use the asterisk symbol (`*`) instead.                                                                |
  | Policy ARN    | The Amazon Resource Name (ARN). ARNs are unique identifiers for Amazon Web Services resources.<br /><br />For more information about ARNs, go to [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in the *Amazon Web Services General Reference*.                              |
  | Role Name     | The name (friendly name, not ARN) of the role to attach the policy to.<br /><br />This parameter allows (through its [regex pattern](http://wikipedia.org/wiki/regex)) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: \_+=,.\@-. |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter                        | Description                                                                   |
  | -------------------------------- | ----------------------------------------------------------------------------- |
  | Disable XML To JSON Auto Convert | When checked, XML responses are not automatically converted into JSON format. |
</div>

## Workflow Library Example

[Iam Attach Role Policy with Aws and Send Results Via Email](https://library.blinkops.com/workflows/iam-attach-role-policy-with-aws-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/iam-attach-role-policy-with-aws-and-send-results-via-email/canvas" />
</div>
