Use a service-linked role (SLR) with ACM
AWS Certificate Manager uses an AWS Identity and Access Management (IAM) service-linked role to enable enable automatic renewals of private certificates issued from a private CA for another account shared by AWS Resource Access Manager. A service-linked role (SLR) is an IAM role that is linked directly to the ACM service. SLRs are predefined by ACM and include all the permissions that the service requires to call other AWS services on your behalf.
The SLR makes setting up ACM easier because you don’t have to manually add the necessary permissions for unattended certificate signing. ACM defines the permissions of its SLR, and unless defined otherwise, only ACM can assume the role. The defined permissions include the trust policy and the permissions policy, and that permissions policy cannot be attached to any other IAM entity.
Certificate inventory for organizations, which collects your organization's certificates and certificate authorities into a single inventory, and certificate actions for organizations, which manage certificates and certificate authorities across your organization, each use their own service-linked role. For more information, see Service-linked role for certificate inventory and Service-linked role for certificate actions.
For information about other services that support SLRs, see AWS 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 SLR documentation for that service.
SLR permissions for ACM
ACM uses an SLR named Amazon Certificate Manager Service Role Policy.
The AWSServiceRoleForCertificateManager SLR trusts the following services to assume the role:
-
acm.amazonaws.com
The role permissions policy allows ACM to complete the following actions on the specified resources:
-
Actions:
acm-pca:IssueCertificate,acm-pca:GetCertificateon "*"
You must configure permissions to allow an IAM entity (such as a user, group, or role) to create, edit, or delete an SLR. For more information, see Service-Linked Role Permissions in the IAM User Guide.
ACM might alert you that it cannot determine whether an SLR exists on your account. If the
required iam:GetRole permission has already been granted to the ACM SLR for your account,
then the alert will not recur after the SLR is created. If it does recur,
then you or your account administrator might need to grant the iam:GetRole
permission to ACM, or associate your account with the ACM-managed policy
AWSCertificateManagerFullAccess.
Creating the SLR for ACM
You don't need to manually create the SLR that ACM uses. When you issue an ACM certificate using the AWS Management Console, the AWS CLI, or the AWS API, ACM creates the SLR for you the first time that you a private CA for another account shared by AWS RAM to sign your certificate.
If you encounter messages stating that ACM cannot determine whether an SLR exists on your account, it may mean that your account has not granted a read permission that AWS Private CA requires. This will not prevent the SLR from being installed, and you can still issue certificates, but ACM will be unable to renew the certificates automatically until you resolve the problem. For more information, see Problems with the ACM service-linked role (SLR).
This SLR can appear in your account if you completed an action in another service that uses the features supported by this role. Also, if you were using the ACM service before January 1, 2017, when it began supporting SLRs, then ACM created the AWSServiceRoleForCertificateManager role in your account. To learn more, see A New Role Appeared in My IAM Account.
If you delete this SLR, and then need to create it again, you can use either of these methods:
-
In the IAM console, choose Role, Create role, Certificate Manager to create a new role with the CertificateManagerServiceRolePolicy use case.
-
Using the IAM API CreateServiceLinkedRole or the corresponding AWS CLI command create-service-linked-role, create an SLR with the
acm.amazonaws.comservice name.
For more information, see Creating a Service-Linked Role in the IAM User Guide.
Editing the SLR for ACM
ACM does not allow you to edit the AWSServiceRoleForCertificateManager service-linked role. After you create an SLR, 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 the SLR for ACM
You typically don't need to delete the AWSServiceRoleForCertificateManager SLR. However, you can delete the role manually using the IAM console, the AWS CLI or the AWS API. For more information, see Deleting a Service-Linked Role in the IAM User Guide.
Supported Regions for ACM SLRs
ACM supports using SLRs in all of the regions where both ACM and AWS Private CA are available. For more information, see AWS Regions and Endpoints.
| Region name | Region identity | Support in ACM |
|---|---|---|
| US East (N. Virginia) | eusc-de-east-1 | Yes |
| eusc-de-east-1 | Yes | |
| US West (N. California) | us-west-1 | Yes |
| US West (Oregon) | us-west-2 | Yes |
| Asia Pacific (Mumbai) | ap-south-1 | Yes |
| Asia Pacific (Osaka) | ap-northeast-3 | Yes |
| Asia Pacific (Seoul) | ap-northeast-2 | Yes |
| Asia Pacific (Singapore) | ap-southeast-1 | Yes |
| Asia Pacific (Sydney) | ap-southeast-2 | Yes |
| Asia Pacific (Tokyo) | ap-northeast-1 | Yes |
| Canada (Central) | ca-central-1 | Yes |
| Europe (Frankfurt) | eu-central-1 | Yes |
| Europe (Zurich) | eu-central-2 | Yes |
| Europe (Ireland) | eu-west-1 | Yes |
| Europe (London) | eu-west-2 | Yes |
| Europe (Paris) | eu-west-3 | Yes |
| South America (São Paulo) | sa-east-1 | Yes |
| AWS GovCloud (US-West) | us-gov-west-1 | Yes |
| AWS GovCloud (US-East) East | us-gov-east-1 | Yes |
Service-linked role for certificate inventory
AWS Certificate Manager (ACM) uses the service-linked role named
AWSServiceRoleForCertificateManagerInventory for certificate inventory.
With this role, ACM reads certificate and certificate authority records in each
account in your organization and collects them into your organization's inventory.
The role is read-only for ACM and AWS Private CA resources. It can't change a certificate or a certificate authority. Certificate actions, which change these resources, use a separate role that ACM creates only when you turn on certificate actions. For more information, see Service-linked role for certificate actions.
Service-linked role permissions for certificate inventory
The AWSServiceRoleForCertificateManagerInventory service-linked role
trusts the following service to assume the role:
-
inventory.acm.amazonaws.com
The role uses the AWS managed policy CertificateManagerInventoryServiceRolePolicy. The policy has the following description:
The policy groups its permissions by what ACM uses them for:
-
ACM certificates: List and search certificates and read a certificate and its details, so that the inventory records each certificate and the AWS resources that use it.
-
AWS Private CA: Read a certificate authority's details and its CA certificate, so that the inventory can identify the certificate authority that issued a certificate.
-
AWS Config: Create and delete the AWS Config service-linked configuration recorder that ACM owns. ACM uses this recorder to learn when certificates change. The permission applies only to a recorder whose service principal is
inventory.acm.amazonaws.com. When ACM creates the recorder, AWS Config can create its own service-linked role,AWSServiceRoleForConfig, if the account doesn't have it yet. -
AWS account: List the Regions that are enabled for the account, so that ACM collects only from Regions the account can use.
-
AWS Organizations: Read the organization, its roots, organizational units, accounts, delegated administrators, and the services that have trusted access, so that the inventory follows your account scope as accounts join, move, or leave.
Permissions for ACM certificates, including listing and searching them, AWS Private CA, AWS Config, and the account's Regions require the resource to be in the same account as the role. The AWS Organizations read operations don't support resource-level permissions, so the policy grants them on all resources. The policy grants no permission to export or issue certificates, change certificate authorities, change IAM resources, or change your organization.
For the full policy document and its version history, see CertificateManagerInventoryServiceRolePolicy in the AWS Managed Policy Reference Guide. For changes to this policy, see ACM updates to AWS managed policies.
You must configure permissions to allow an IAM entity, such as a user, group, or role, to create, edit, or delete a service-linked role. For more information, see Service-linked role permissions in the IAM User Guide.
Creating the service-linked role for certificate inventory
Creating this role works differently in the management account and in member accounts.
-
Member accounts: You don't create the role in member accounts. When you enable trusted access for
inventory.acm.amazonaws.comin AWS Organizations, Organizations creates the role in each member account. Organizations also creates the role in each account that joins the organization later, and in any member account where the role is missing. -
Management account: AWS Organizations doesn't create the role in the management account. When you set up certificate inventory in the ACM console, the console creates the role with your credentials before it enables trusted access. If you use the AWS CLI or the API, create the role with the IAM CreateServiceLinkedRole operation and the
inventory.acm.amazonaws.comservice name:aws iam create-service-linked-role --aws-service-name inventory.acm.amazonaws.com
For more information, see Set up and manage certificate inventory.
If you delete the role from a member account and then enable trusted access again, Organizations creates the role again. To create the role again in the management account, use the same IAM operation as before.
Editing the service-linked role for certificate inventory
ACM doesn't allow you to edit the
AWSServiceRoleForCertificateManagerInventory service-linked role. After
the role is created, you can't change its name, because various entities might
reference the role. You can edit the role description by using IAM. For more
information, see Editing a service-linked role in the
IAM User Guide.
AWS can add permissions to the attached managed policy in a new policy version. The new version applies to the role in every account that has it, and ACM records the change in ACM updates to AWS managed policies.
Deleting the service-linked role for certificate inventory
ACM doesn't delete this role. The role stays in each account until you delete it.
You can't delete the role while trusted access for certificate inventory is
enabled, or while ACM is still offboarding accounts in your organization.
Turning off certificate inventory with PutInventoryConfiguration
stops collection when your plan ends but leaves trusted access on, so it doesn't
make the role deletable. To delete the role:
-
In the management account, turn off certificate inventory, as described in Turn off certificate inventory.
-
Wait until your plan ends and
GetInventoryConfigurationreturnsProvisioningStatusasDISABLED. -
In the management account, disable trusted access for
inventory.acm.amazonaws.comin AWS Organizations. For more information, see Enabling trusted access with other AWS services in the AWS Organizations User Guide. Disabling trusted access doesn't delete the AWS Config service-linked configuration recorder that ACM created in each account. ACM deletes an account's recorder when the account offboards: after your plan ends, when the account leaves your organization, or when it falls out of your account scope. -
In each account, use the IAM console, the AWS CLI, or the IAM API to delete
AWSServiceRoleForCertificateManagerInventory. For instructions on deleting a service-linked role, see Deleting a service-linked role in the IAM User Guide.
Deleting this role doesn't delete AWSServiceRoleForConfig. That role
belongs to AWS Config. For more information, see Using
service-linked roles for AWS Config.
If ACM is still using the role when you try to delete it, the deletion might fail. If that happens, wait a few minutes and try again.
Certificate inventory service-linked role Region availability
ACM supports this service-linked role in every AWS Region where the inventory is available. For more information, see AWS Certificate Manager endpoints and quotas.
Service-linked role for certificate actions
AWS Certificate Manager (ACM) uses the service-linked role named
AWSServiceRoleForCertificateManagerOrganizationManagement for certificate actions. With this role, ACM changes certificates and certificate authorities in an
account when your organization's management account or delegated administrator calls
a certificate actions operation on a resource in that account. For more information
about the capability, see Manage certificates across your organization.
The role exists only in organizations that turn on certificate actions. Turning on certificate inventory doesn't create it. The inventory uses a separate,
read-only role, AWSServiceRoleForCertificateManagerInventory. For more
information, see Service-linked role for certificate inventory.
Service-linked role permissions for certificate actions
The AWSServiceRoleForCertificateManagerOrganizationManagement
service-linked role trusts the following service to assume the role:
-
management.acm.amazonaws.com
The role uses the AWS managed policy CertificateManagerOrganizationManagementServiceRolePolicy. The policy has the following description:
The policy groups its permissions by the type of resource that they change:
-
ACM certificates: Renew, revoke, and delete a certificate, and update its options. These permissions apply to resources that match
arn:aws:acm:*:*:certificate/*. -
AWS Private CA: Update, delete, and restore a certificate authority, and revoke a certificate that it issued. These permissions apply to resources that match
arn:aws:acm-pca:*:*:certificate-authority/*.
Every permission in the policy requires the resource to be in the same account as the role. The policy grants no permission to request, issue, import, or export certificates, create certificate authorities, change tags, or change IAM resources.
ACM acts with this role only to complete a certificate actions operation that your organization's administrator requested. For each operation, ACM limits its role session to the one action and the one resource ARN in the request.
For the full policy document and its version history, see CertificateManagerOrganizationManagementServiceRolePolicy in the AWS Managed Policy Reference Guide. For changes to this policy, see ACM updates to AWS managed policies.
You must configure permissions to allow an IAM entity, such as a user, group, or role, to create, edit, or delete a service-linked role. For more information, see Service-linked role permissions in the IAM User Guide.
Creating the service-linked role for certificate actions
Creating this role works differently in the management account and in member accounts.
-
Management account: You create the role yourself before you turn on certificate actions. When you turn on certificate actions in the ACM console, the console creates the role with your credentials. If you use the AWS CLI or the API, create the role with the IAM CreateServiceLinkedRole operation and the
management.acm.amazonaws.comservice name:aws iam create-service-linked-role --aws-service-name management.acm.amazonaws.comThe principal that creates the role needs
iam:CreateServiceLinkedRolepermission formanagement.acm.amazonaws.com. Until this role exists, certificate actions operations on resources in the management account fail withAccessDeniedException. If the delegated administrator turns on certificate actions, someone in the management account still creates this role there. -
Member accounts: You don't create the role in member accounts. When you turn on certificate actions with
PutInventoryConfiguration, ACM asks AWS Organizations to create the role in each member account, including the delegated administrator account. When an account joins the organization while certificate actions are on, ACM asks AWS Organizations to create the role in that account.GetInventoryConfigurationreports role creation progress inLifecycleManagement.ProvisioningStatus.
For more information, see Set up and manage certificate actions.
If you delete the role from a member account and then turn certificate actions back on, ACM asks AWS Organizations to create the role again. To create the role again in the management account, use the same IAM operation as before.
Editing the service-linked role for certificate actions
ACM doesn't allow you to edit the
AWSServiceRoleForCertificateManagerOrganizationManagement
service-linked role. After the role is created, you can't change its name, because
various entities might reference the role. You can edit the role description by
using IAM. For more information, see Editing a service-linked role in the
IAM User Guide.
AWS can add permissions to the attached managed policy in a new policy version. The new version applies to the role in every account that has it, and ACM records the change in ACM updates to AWS managed policies.
Deleting the service-linked role for certificate actions
You typically don't need to delete the certificate actions service-linked role. You might delete it when you want to remove ACM's permission to manage certificates and certificate authorities in an account, such as after an account leaves your organization.
ACM doesn't delete this role when you turn off certificate actions. The role stays in each account until you delete it. Deleting the role doesn't delete certificates, certificate authorities, or inventory records.
You can't delete the role from an account while certificate actions are on for that account's organization. To delete the role:
-
From the management account or the delegated administrator, in the inventory home Region, call
PutInventoryConfigurationwithLifecycleManagementset to{"Status": "DISABLED"}. For instructions on turning off certificate actions, see Turn off certificate actions. -
In each account, use the IAM console, the AWS CLI, or the IAM API to delete
AWSServiceRoleForCertificateManagerOrganizationManagement. For instructions on deleting a service-linked role, see Deleting a service-linked role in the IAM User Guide.
An account that leaves the organization can delete the role without any change to the organization's certificate actions setting. After the account leaves, ACM no longer accepts certificate actions operations for its resources.
If ACM is still using the role when you try to delete it, the deletion might fail. If that happens, wait a few minutes and try again.
Certificate actions service-linked role Region availability
Before you turn on certificate actions, confirm that they're available in your AWS Region. ACM supports this service-linked role in every AWS Region where certificate actions are available. For more information, see AWS Certificate Manager endpoints and quotas.