Course contentsShow
← Cloud and Infrastructure
Lesson 382 of 2,9897. Identity and Access ManagementFree lesson

AWS Service-Linked Roles

Understanding predefined service-linked roles that AWS services use to access resources on your behalf.

AWS Service-Linked Roles

What you'll learn: How AWS services use predefined, secure roles to act on your behalf without manual configuration.

What Are Service-Linked Roles?

A service-linked role is a special type of IAM role that AWS services create and manage automatically. Unlike regular IAM roles where you define all the permissions and trust policies, service-linked roles come pre-configured with everything a specific AWS service needs to operate securely on your behalf.

Think of it like giving a delivery service a special key to your building's loading dock. You didn't cut the key yourself or decide which doors it opens—the building management created it specifically for deliveries, with exactly the right access needed and nothing more.

Why They Exist

Many AWS services need to interact with other AWS resources to function properly. For example, Amazon RDS needs to manage EC2 instances and storage volumes, while AWS Auto Scaling needs to launch and terminate instances. Rather than forcing you to manually create roles with complex permissions for each service, AWS provides service-linked roles that:

  • Come with predefined, AWS-managed policies containing exactly the permissions needed
  • Include pre-configured trust policies so only the intended service can assume them
  • Update automatically when AWS enhances the service with new features
  • Cannot be accidentally deleted while the service is using them

How They Work

When you enable certain AWS services, they automatically create their service-linked role. You don't write policies or configure trust relationships—AWS handles it all. You might see roles named like AWSServiceRoleForAutoScaling or AWSServiceRoleForElasticLoadBalancing in your IAM console.

Key Takeaway: Service-linked roles are AWS-managed IAM roles that let services securely access other resources automatically, removing the burden of manual permission configuration while maintaining the principle of least privilege.