Service-Linked Roles
What you'll learn: You'll understand how cloud services automatically create and manage special roles for their own operations without requiring you to configure them manually.
What Are Service-Linked Roles?
Service-linked roles are pre-configured IAM roles that cloud services create and manage on your behalf. Unlike the roles you learned about earlier where you define trust policies and permissions, these roles are designed by the cloud provider specifically for a service to operate correctly.
Think of them like backstage passes at a concert. The venue (cloud provider) creates these passes with specific access rights, and the crew members (cloud services) automatically receive them to do their jobs. You don't design the passes or decide who gets them—the venue handles that automatically.
Why They Exist
When you enable certain cloud services—like auto scaling groups, load balancers, or monitoring services—those services need permissions to interact with other resources on your behalf. For example:
- An auto scaling service needs to launch and terminate instances
- A load balancer needs to monitor instance health
- A database service needs to create snapshots
Service-linked roles give these services exactly the permissions they need, following the principle of least privilege you learned earlier.
Key Characteristics
- Automatically created: The service creates the role when you first use that service
- Pre-defined permissions: You cannot modify the policy attached to these roles
- Service-specific: Each role is tied to one service and includes that service in its name
- Protected deletion: You can only delete them when no resources are using the service
Key Takeaway: Service-linked roles are special, predefined IAM roles that cloud services automatically create and manage to perform operations on your behalf, eliminating manual role configuration for common service needs.