awssts

package
v0.154.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package awssts provides an identity-token source for workloads running on AWS (ECS, Lambda, EC2, EKS): it asks AWS STS for a web identity token of the workload's IAM role with GetWebIdentityToken.

Importing the package registers the source, so that KERNEL_IDENTITY_TOKEN_SOURCE=aws_sts works with a client built from the environment:

import _ "github.com/kernel/kernel-go-sdk/lib/credentials/awssts"

It is a separate package so that only programs that import it depend on the AWS SDK.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IdentityToken

func IdentityToken(audience string, optFns ...func(*config.LoadOptions) error) credentials.IdentityTokenFunc

IdentityToken returns an identity-token source that calls STS GetWebIdentityToken on every call. It uses the ambient AWS credentials and the region from AWS_REGION or AWS_DEFAULT_REGION, falling back to us-east-1. The credentials refresh themselves, so the source works for as long as the workload runs. optFns adjust how the AWS configuration is loaded.

audience is the aud claim to request; when empty, credentials.ResolveAudience decides.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL