Using Service-Linked Roles for User Notifications - AWS User Notifications

Using Service-Linked Roles for User Notifications

AWS User Notifications uses AWS Identity and Access Management (IAM) service-linked roles. A service-linked role is a unique type of IAM role that is linked directly to User Notifications. Service-linked roles are predefined by User Notifications and include all the permissions that the service requires to call other AWS services on your behalf.

A service-linked role streamlines setting up User Notifications because you don’t have to manually add the necessary permissions. User Notifications defines the permissions of its service-linked roles. Unless defined otherwise, only User Notifications can assume its roles. The defined permissions include the trust policy and the permissions policy. That permissions policy can't be attached to any other IAM entity.

For information about other services that support service-linked roles, 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 service-linked role documentation for that service.

Service-Linked Role Permissions for User Notifications

User Notifications uses the service-linked role named AWSServiceRoleForAWSUserNotifications. This role allows User Notifications to call AWS services on your behalf. It also allows the role to publish metrics in the AWS/Notifications namespace.

The AWSServiceRoleForAWSUserNotifications service-linked role trusts the following services to assume the role:

  • notifications.amazon.com

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.

When you create a notification hub or a notification configuration, it creates the AWSUserNotificationsServiceLinkedRolePolicy. For more information, see AWS managed policy: AWSUserNotificationsServiceLinkedRolePolicy

You don't need to take any action to support this role beyond using User Notifications.

Creating a Service-Linked Role for User Notifications

You don't need to manually create a service-linked role. When you create a notification hub or a notification configuration in the AWS Management Console, User Notifications creates the service-linked role for you.

If you delete this service-linked role and need to create it again later, you can use the same process to recreate the role in your account. When you create a notification hub or a notification configuration, User Notifications creates the service-linked role for you again.

Editing a Service-Linked Role for User Notifications

User Notifications doesn't allow you to edit the AWSServiceRoleForAWSUserNotifications service-linked role. After you create a service-linked role, you can't change the name of the role. This is 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.

Manually deleting a Service-Linked Role for User Notifications

Under specific circumstances, you can manually delete the AWSServiceRoleForAWSUserNotifications service-linked role. To delete the User Notifications service-linked role, you must first delete all notification configurations in the account. You can delete all User Notifications notification configurations using the User Notifications console. You then use the IAM console, the AWS CLI, or the AWS API to delete the AWSServiceRoleForAWSUserNotifications service-linked role. For more information, see Deleting a Service-Linked Role in the IAM User Guide.

Note

If the User Notifications service is using the role when you try to delete the resources, the deletion might fail. If that happens, wait for a few minutes and try the operation again.

To delete notification configurations
  1. Open User Notifications in the AWS Management Console.

    1. In the navigation pane, choose Notification configurations.

  2. Select the configuration you want to delete.

  3. Choose Delete.

Supported Regions for User Notifications Service-Linked Roles

User Notifications supports using service-linked roles in all of the Regions where the service is available. For more information, see AWS Regions and Endpoints.

User Notifications doesn't support using service-linked roles in every Region where the service is available. You can use the AWSServiceRoleForAWSUserNotifications role in the following Regions.

Region name Region identity Support in User Notifications
US East (N. Virginia) us-east-1 Yes
US East (Ohio) us-east-2 Yes
US West (N. California) us-west-1 Yes
US West (Oregon) us-west-2 Yes
Africa (Cape Town) af-south-1 Yes
Asia Pacific (Hong Kong) ap-east-1 Yes
Asia Pacific (Hyderabad) ap-south-2 Yes
Asia Pacific (Jakarta) ap-southeast-3 Yes
Asia Pacific (Melbourne) ap-southeast-4 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 (Ireland) eu-west-1 Yes
Europe (London) eu-west-2 Yes
Europe (Milan) eu-south-1 Yes
Europe (Paris) eu-west-3 Yes
Europe (Spain) eu-south-2 Yes
Europe (Stockholm) eu-north-1 Yes
Europe (Zurich) eu-central-2 Yes
Israel (Tel Aviv) il-central-1 Yes
Middle East (Bahrain) me-south-1 Yes
Middle East (UAE) me-central-1 Yes
South America (São Paulo) sa-east-1 Yes
AWS GovCloud (US) us-gov-west-1 No