sts:GetServiceBearerToken

Read

sts:GetServiceBearerToken is a Read access-level action in the sts service. Grants permission to obtain a STS bearer token for an AWS root user, IAM role, or an IAM user

Resource types

This action does not support resource-level permissions; use "Resource": "*" in your policy.

Condition keys

Keys you can use in the Condition block of a policy that grants sts:GetServiceBearerToken.

sts:AWSServiceName String

Filters access by the service that is obtaining a bearer token

sts:DurationSeconds Numeric

Filters access by the duration in seconds when getting a bearer token or a JSON Web Token (JWT) from the GetWebIdentityToken API

Example IAM policy

A minimal policy that allows sts:GetServiceBearerToken. Replace "Resource": "*" with a specific ARN to follow least privilege.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowStsGetServiceBearerToken",
      "Effect": "Allow",
      "Action": "sts:GetServiceBearerToken",
      "Resource": "*"
    }
  ]
}

Related actions in sts

View all sts actions →