AWS Sign-In Service

2026/11/09 - AWS Sign-In Service - 1 new api methods

Changes  Adds the CreateBearerToken API, which exchanges your IAM credentials for a bearer token that can be used to access supported AWS services.

CreateBearerToken (new) Link ΒΆ

Creates a bearer token that represents your IAM credentials and can be used to access a supported AWS service. By default, the token is valid for 12 hours.

See also: AWS API Documentation

Request Syntax

client.create_bearer_token(
    grantType='string',
    resource='string',
    durationSeconds=123
)
type grantType:

string

param grantType:

[REQUIRED]

The grant type. Must be "client_credentials".

type resource:

string

param resource:

[REQUIRED]

The AWS service the bearer token is for. Example: "ecr.amazonaws.com".

type durationSeconds:

integer

param durationSeconds:

The requested token lifetime in seconds, from 300 (5 minutes) up to the maximum allowed for the service, currently 43200 (12 hours). If omitted, the token is valid for 12 hours.

rtype:

dict

returns:

Response Syntax

{
    'accessToken': 'string',
    'tokenType': 'string',
    'expiresIn': 123
}

Response Structure

  • (dict) --

    Output structure for CreateBearerToken operation

    Contains the bearer token, its type, and its lifetime.

    • accessToken (string) --

      The bearer token. Present it to the AWS service named in the request.

    • tokenType (string) --

      The token type. Always "Bearer".

    • expiresIn (integer) --

      Token lifetime in seconds.