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

We welcome your feedback on this new version of the documentation. Send your comments to


import ""

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.


Type: string


Type: error

On this page: