AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

StdinTokenProvider

import "github.com/aws/aws-sdk-go/aws/credentials/stscreds"

func StdinTokenProvider() (string, error)

StdinTokenProvider will prompt on stdout and read from stdin for a string value. An error is returned if reading from stdin fails.

Use this function go read MFA tokens from stdin. The function makes no attempt to make atomic prompts from stdin across multiple gorouties.

Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will have undesirable results as the StdinTokenProvider will not be synchronized. A single Credentials with an AssumeRoleProvider can be shared safely

Will wait forever until something is provided on the stdin.

string

Type: string

error

Type: error

On this page: