Using service-linked roles for AWS Outposts - AWS Outposts

Using service-linked roles for AWS Outposts

AWS Outposts 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 AWS Outposts. Service-linked roles are predefined by AWS Outposts and include all the permissions that the service requires to call other AWS services on your behalf.

A service-linked role makes setting up your AWS Outposts more efficient because you don’t have to manually add the necessary permissions. AWS Outposts defines the permissions of its service-linked roles, and unless defined otherwise, only AWS Outposts can assume its roles. The defined permissions include the trust policy and the permissions policy, and that permissions policy cannot be attached to any other IAM entity.

You can delete a service-linked role only after first deleting the related resources. This protects your AWS Outposts resources because you can't inadvertently remove permission to access the resources.

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 AWS Outposts

AWS Outposts uses the service-linked role named AWSServiceRoleForOutposts_OutpostID – Allows Outposts to access AWS resources for private connectivity on your behalf. This service-linked role allows private connectivity configuration, creates network interfaces, and attaches them to service link endpoint instances.

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

  • outposts.amazonaws.com

The AWSServiceRoleForOutposts_OutpostID service-linked role includes the following policies:

  • AWSOutpostsServiceRolePolicy

  • AWSOutpostsPrivateConnectivityPolicy_OutpostID

The AWSOutpostsServiceRolePolicy policy is a service-linked role policy to enable access to AWS resources managed by AWS Outposts.

This policy allows AWS Outposts to complete the following actions on the specified resources:

  • Action: ec2:DescribeNetworkInterfaces on all AWS resources

  • Action: ec2:DescribeSecurityGroups on all AWS resources

  • Action: ec2:CreateSecurityGroup on all AWS resources

  • Action: ec2:CreateNetworkInterface on all AWS resources

The AWSOutpostsPrivateConnectivityPolicy_OutpostID policy allows AWS Outposts to complete the following actions on the specified resources:

  • Action: ec2:AuthorizeSecurityGroupIngress on all AWS resources that match the following Condition:

    { "StringLike" : { "ec2:ResourceTag/outposts:private-connectivity-resourceId" : "OutpostID" }} and { "StringEquals" : { "ec2:Vpc" : "vpcArn" }}
  • Action: ec2:AuthorizeSecurityGroupEgress on all AWS resources that match the following Condition:

    { "StringLike" : { "ec2:ResourceTag/outposts:private-connectivity-resourceId" : "OutpostID" }} and { "StringEquals" : { "ec2:Vpc" : "vpcArn" }}
  • Action: ec2:CreateNetworkInterfacePermission on all AWS resources that match the following Condition:

    { "StringLike" : { "ec2:ResourceTag/outposts:private-connectivity-resourceId" : "OutpostID" }} and { "StringEquals" : { "ec2:Vpc" : "vpcArn" }}
  • Action: ec2:CreateTags on all AWS resources that match the following Condition:

    { "StringLike" : { "aws:RequestTag/outposts:private-connectivity-resourceId" : "{{OutpostId}}*"}}

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 AWS Outposts

You don't need to manually create a service-linked role. When you configure private connectivity for your Outpost in the AWS Management Console, AWS Outposts creates the service-linked role for you.

Editing a service-linked role for AWS Outposts

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

If you no longer require a feature or service that requires a service-linked role, we recommend that you delete that role. That way you avoid having 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 Outposts 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.

Warning

You must delete your Outpost before you can delete the AWSServiceRoleForOutposts_OutpostID service-linked role. The following procedure deletes your Outpost.

Before you begin, make sure that your Outpost is not being shared using AWS Resource Access Manager (AWS RAM). For more information, see Unsharing a shared Outpost resource.

To delete AWS Outposts resources used by the AWSServiceRoleForOutposts_OutpostID
  • Contact AWS Enterprise Support to delete your Outpost.

To manually delete the service-linked role using IAM

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

Supported Regions for AWS Outposts service-linked roles

AWS Outposts supports using service-linked roles in all of the Regions where the service is available. For more information, see AWS Outposts endpoints and quotas.