Service-linked roles for Amazon DMS Fleet Advisor - Amazon Database Migration 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 (PDF).

Service-linked roles for Amazon DMS Fleet Advisor

Amazon DMS Fleet Advisor uses the service-linked role named AWSServiceRoleForDMSFleetAdvisor – DMS Fleet Advisor uses this service-linked role to manage Amazon CloudWatch metrics. This service-linked role is attached to the following managed policy: AWSDMSFleetAdvisorServiceRolePolicy. For updates to this policy, see Amazon managed policies for Amazon Database Migration Service.

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

  • dms-fleet-advisor.amazonaws.com

The role permissions policy named AWSDMSFleetAdvisorServiceRolePolicy allows Amazon DMS Fleet Advisor to complete the following actions on the specified resources:

  • Action: cloudwatch:PutMetricData on all Amazon resources

    This permission allows principals to publish metric data points to Amazon CloudWatch. Amazon DMS Fleet Advisor requires this permission to display charts with database metrics from CloudWatch.

The following code example shows the AWSDMSFleetAdvisorServiceRolePolicy policy that you use to create the AWSDMSFleetAdvisorServiceRolePolicy role.

{ "Version": "2012-10-17", "Statement": { "Effect": "Allow", "Resource": "*", "Action": "cloudwatch:PutMetricData", "Condition": { "StringEquals": { "cloudwatch:namespace": "AWS/DMS/FleetAdvisor" } } } }

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 a service-linked role for Amazon DMS Fleet Advisor

You can use the IAM console to create a service-linked role with the DMS – Fleet Advisor use case. In the Amazon CLI or the Amazon API, create a service-linked role with the dms-fleet-advisor.amazonaws.com service name. For more information, see Creating a service-linked role in the IAM User Guide. If you delete this service-linked role, you can use this same process to create the role again.

Make sure that you create this role before you create a data collector. DMS Fleet Advisor uses this role to display charts with database metrics in the Amazon Web Services Management Console. For more information, see Creating a data collector.

Editing a service-linked role for Amazon DMS Fleet Advisor

Amazon DMS doesn't allow you to edit the AWSServiceRoleForDMSFleetAdvisor service-linked role. After you create a service-linked role, you can't 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 DMS Fleet Advisor

If you no longer need to use a feature or service that requires a service-linked role, we recommend that you delete that role. Thus, you don’t have an unused entity that isn't actively monitored or maintained. However, you must clean up the resources for your service-linked role before you can manually delete it.

Note

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

To delete Amazon DMS resources used by the AWSServiceRoleForDMSFleetAdvisor
  1. Sign in to the Amazon Web Services Management Console and open the Amazon DMS console at https://console.aws.amazon.com/dms/v2/.

  2. In the navigation pane, choose Data collectors under Discover. The Data collectors page opens.

  3. Choose your data collector and choose Delete.

  4. To confirm deletion, enter the data collector name in the text input field. Next, choose Delete.

Important

When you delete a DMS data collector, DMS Fleet Advisor deletes all databases from Inventory that you discovered using this collector.

After you delete all data collectors, you can 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 AWSServiceRoleForDMSFleetAdvisor service-linked role. For more information, see Deleting a service-linked role in the IAM User Guide.

Supported regions for Amazon DMS Fleet Advisor service-linked roles

Amazon DMS Fleet Advisor supports using service-linked roles in all of the regions where the service is available. For more information, see Supported Amazon Web Services Regions.