Documentation
¶
Overview ¶
Package aws contains helpers for working with AWS in CLIs
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureValidCredentials ¶
func EnsureValidCredentials(ctx context.Context, copts *CredentialOptions) error
EnsureValidCredentials ensures that the current AWS credentials are valid and if they can expire it is attempted to rotate them when they are expired via saml2aws
Types ¶
type CredentialOptions ¶
type CredentialOptions struct {
// Log is a logger to be used for informational logging.
// if not supplied no output aside from prompting will be displayed
Log logrus.FieldLogger
// Role to assume for the user
Role string
// Profile to use
Profile string
// FileName is the name of the file to use for storing
// AWS credentials. Defaults to `~/.aws/credentials`.
FileName string
}
CredentialOptions configures what credentials are provided
func DefaultCredentialOptions ¶
func DefaultCredentialOptions() *CredentialOptions
DefaultCredentialOptions uses the default role and profile for accessing AWS.
Click to show internal directories.
Click to hide internal directories.