Using Service-Linked Roles for Amazon RAM
Amazon Resource Access Manager uses Amazon Identity and Access Management (IAM) service-linked roles. A service-linked role is a unique type of IAM role that is linked directly to the Amazon RAM service. Service-linked roles are predefined by Amazon and include all the permissions that Amazon RAM needs to call other Amazon services on your behalf.
A service-linked role makes configuring Amazon RAM easier because you don’t have to manually add the necessary permissions. Amazon RAM defines the permissions of its service-linked roles, and unless defined otherwise, only Amazon RAM can assume its service-linked roles. The defined permissions include both a trust policy and a permissions policy, and that permissions policy cannot be attached to any other IAM entity.
For information about other services that support service-linked roles, see Amazon Services That Work with IAM and look for the services that have Yes in the Service-Linked Role column. Choose a Yes with a link to view the service-linked role documentation for that service.
Service-Linked Role Permissions for Amazon RAM
Amazon RAM uses the service-linked role named AWSServiceRoleForResourceAccessManager
when you
enable sharing with Amazon Organizations. This role grants permissions to the Amazon RAM service to
view organization details, such as the list of member accounts and which organizational
units each account is in.
This service-linked role trusts the following service to assume the role:
-
ram.amazonaws.com
The role permissions policy named AWSResourceAccessManagerServiceRolePolicy is attached to this service-linked role, and allows Amazon RAM to complete the following actions on the specified resources:
-
Actions: read-only actions that retrieve details about your organization's structure. For the complete list of actions, you can view the policy in the IAM console: AWSResourceAccessManagerServiceRolePolicy
.
For a principal to turn on Amazon RAM sharing within your organization, that principal (an IAM entity such as a user, group, or role), must have permission to create a service-linked role. For more information, see Service-Linked Role Permissions in the IAM User Guide.
Creating a Service-Linked Role for Amazon RAM
You don't need to manually create a service-linked role. When you turn on Amazon RAM sharing within your organization in the Amazon Web Services Management Console, or run the EnableSharingWithAwsOrganization in your account using the Amazon CLI or an Amazon API, Amazon RAM creates the service-linked role for you.
Call enable-sharing-with-aws-organizations
to
create the service linked role in your account.
If you delete this service-linked role, then Amazon RAM no longer has permissions to view the details of your organization's structure.
Editing a service-linked role for Amazon RAM
Amazon RAM does not allow you to edit the AWSResourceAccessManagerServiceRolePolicy service-linked role. After you create a service-linked role, you cannot change the name of the role because various entities might reference the role. However, you can edit the description of the role using IAM. For more information, see Editing a Service-Linked Role in the IAM User Guide.
Deleting a Service-Linked Role for Amazon RAM
You can use the IAM console, the Amazon CLI or the Amazon API to manually delete the service-linked role.
To manually delete the service-linked role using IAM
Use the IAM console, the Amazon CLI, or the Amazon API to delete the
AWSResourceAccessManagerServiceRolePolicy
service-linked role. For more information, see Deleting a Service-Linked Role in the
IAM User Guide.
Supported Regions for Amazon RAM Service-Linked Roles
Amazon RAM supports using service-linked roles in all of the Regions where the service is available. For more information, see Amazon Regions and Endpoints in the Amazon Web Services General Reference.