Using service-linked roles for Amazon KMS - Amazon Key Management Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Using service-linked roles for Amazon KMS

Amazon Key Management Service 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 Amazon KMS. Service-linked roles are defined by Amazon KMS and include all the permissions that the service requires to call other Amazon services on your behalf.

A service-linked role makes setting up Amazon KMS easier because you don’t have to manually add the necessary permissions. Amazon KMS defines the permissions of its service-linked roles, and unless defined otherwise, only Amazon KMS can assume its roles. The defined permissions include the trust policy and the permissions policy, and that permissions policy cannot be attached to any other IAM entity.

You can delete a service-linked role only after first deleting the related resources. This protects your Amazon KMS resources because you can't inadvertently remove permission to access the resources.

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 KMS custom key stores

Amazon KMS uses a service-linked role named AWSServiceRoleForKeyManagementServiceCustomKeyStores to support custom key stores. This service-linked role gives Amazon KMS permission to view your Amazon CloudHSM clusters and create the network infrastructure to support a connection between your custom key store and its Amazon CloudHSM cluster. Amazon KMS creates this role only when you create a custom key store. You cannot create this service-linked role directly.

The AWSServiceRoleForKeyManagementServiceCustomKeyStores service-linked role trusts cks.kms.amazonaws.com to assume the role. As a result, only Amazon KMS can assume this service-linked role.

The permissions in the role are limited to the actions that Amazon KMS performs to connect a custom key store to an Amazon CloudHSM cluster. It does not give Amazon KMS any additional permissions. For example, Amazon KMS does not have permission to create, manage, or delete your Amazon CloudHSM clusters, HSMs, or backups.

For more information about the AWSServiceRoleForKeyManagementServiceCustomKeyStores role, including a list of permissions and instructions for how to view the role, edit the role description, delete the role, and have Amazon KMS recreate it for you, see Authorizing Amazon KMS to manage Amazon CloudHSM and Amazon EC2 resources.

Service-linked role permissions for Amazon KMS multi-Region keys

Amazon KMS uses a service-linked role named AWSServiceRoleForKeyManagementServiceMultiRegionKeys to support multi-Region keys. This service-linked role gives Amazon KMS permission to synchronize any changes to the key material of a multi-Region primary key to its replica keys. Amazon KMS creates this role only when you create a multi-Region primary key. You cannot create this service-linked role directly.

The AWSServiceRoleForKeyManagementServiceMultiRegionKeys service-linked role trusts mrk.kms.amazonaws.com to assume the role. As a result, only Amazon KMS can assume this service-linked role. The permissions in the role are limited to the actions that Amazon KMS performs to keep the key material in related multi-Region keys synchronized. It does not give Amazon KMS any additional permissions.

For more information about the AWSServiceRoleForKeyManagementServiceMultiRegionKeys role, including a list of permissions and instructions for how to view the role, edit the role description, delete the role, and have Amazon KMS recreate it for you, see Authorizing Amazon KMS to synchronize multi-Region keys.