AWS::IAM::RoleCreates a new role for your AWS-account. For more information about roles, see [IAM roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) in the *IAM User Guide*. For information about quotas for role names and the number of roles you can create, see [IAM and quotas](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) in the *IAM User Guide*.
9 configurable properties. 1 required. Click a row to see details.
| Property | Type | Flags |
|---|---|---|
AssumeRolePolicyDocument | objectstring | Required |
Description | string | |
ManagedPolicyArns | Array<string> | |
MaxSessionDuration | integer | |
Path | string | Create-only |
PermissionsBoundary | string | |
Policies | Array<Policy> | |
RoleName | string | Create-only |
Tags | Array<Tag> |
Values returned after the resource is created. Access these with Fn::GetAtt.
| Attribute | Type | Description |
|---|---|---|
Arn | string | - |
RoleId | string | - |
A minimal template with required properties and common optional ones.
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::IAM::Role
Resources:
MyResource:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument: "value"
Tags:
- Key: Environment
Value: Production
Description: !Ref "AWS::StackName"Permissions CloudFormation needs in your IAM role to manage this resource.
iam:CreateRoleiam:PutRolePolicyiam:AttachRolePolicyiam:GetRolePolicyiam:TagRoleiam:UntagRoleiam:GetRoleiam:GetRoleiam:ListAttachedRolePoliciesiam:ListRolePoliciesiam:GetRolePolicyiam:UpdateRoleiam:UpdateRoleDescriptioniam:UpdateAssumeRolePolicyiam:DetachRolePolicyiam:AttachRolePolicyiam:DeleteRolePermissionsBoundaryiam:PutRolePermissionsBoundaryiam:DeleteRolePolicyiam:DeleteRoleiam:DetachRolePolicyiam:DeleteRolePolicyiam:GetRoleiam:ListAttachedRolePoliciesiam:ListRolePoliciesiam:TagRoleiam:UntagRoleiam:ListRolesEverything you need to know about IAM on one page. HD quality, print-friendly.
Download Free InfographicRoleNameThese properties cannot be changed after the resource is created. Updating them triggers a replacement.
PathRoleName