View a markdown version of this page

Using Service-Linked Roles for AWS Config - AWS Config

Using Service-Linked Roles for AWS Config

Service-Linked Role Permissions for AWS Config

AWS Config uses the service-linked role named AwsServiceRoleForConfig – AWS Config uses this service-linked role to call other AWS services on your behalf. To view the latest updates, see AWS Config updates to AWS managed policies.

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

  • config.amazonaws.com

The role permissions policy named AWSConfigServiceRolePolicy allows AWS Config to complete the following actions on the specified resources:

  • Read-only and write-only permissions for AWS Config resources

  • Read-only permissions for resources in other services that AWS Config supports

To view the managed policy for AwsServiceRoleForConfig, see AWS managed policies for AWS Config.

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.

To use a service-linked role with AWS Config, you must configure permissions on your Amazon S3 bucket and Amazon SNS topic. For more information, see Required Permissions for the Amazon S3 Bucket When Using Service-Linked Roles, Required Permissions for the AWS KMS Key When Using Service-Linked Roles (S3 Bucket Delivery), and Required Permissions for the Amazon SNS Topic When Using Service-Linked Roles.

Creating a Service-Linked Role for AWS Config

In the IAM CLI or the IAM API, create a service-linked role with the config.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.

Editing a Service-Linked Role for AWS Config

AWS Config does not allow you to edit the AwsServiceRoleForConfig 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 AWS Config

If you no longer need to use a feature or service that requires a service-linked role, we recommend that you delete that role. That way you don't have an unused entity that is not 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 AWS Config 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 AWS Config resources used by the AwsServiceRoleForConfig

Ensure that you do not have ConfigurationRecorders using the service-linked role. You can use the AWS Config console to stop the configuration recorder. To stop recording, under Recording is on, choose Turn off.

You can delete the ConfigurationRecorder using the AWS Config API:

$ aws configservice delete-configuration-recorder --configuration-recorder-name default

To manually delete the service-linked role using IAM

Use the IAM console, the IAM CLI, or the IAM API to delete the AwsServiceRoleForConfig service-linked role. For more information, see Deleting a Service-Linked Role in the IAM User Guide.

Supported Regions for AWS Config Service-Linked Roles

AWS Config supports using the AwsServiceRoleForConfig role in all of the Regions where the service is available. For more information, see AWS Regions and Endpoints.