Documentation
¶
Overview ¶
Package sessions provides functions that return AWS sessions to use in the AWS SDK.
Index ¶
- func AreCredsFromEnvVars(sess *session.Session) (bool, error)
- func Creds(sess *session.Session) (credentials.Value, error)
- type Provider
- func (p *Provider) Default() (*session.Session, error)
- func (p *Provider) DefaultWithRegion(region string) (*session.Session, error)
- func (p *Provider) FromProfile(name string) (*session.Session, error)
- func (p *Provider) FromRole(roleARN string, region string) (*session.Session, error)
- func (p *Provider) FromStaticCreds(accessKeyID, secretAccessKey, sessionToken string) (*session.Session, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AreCredsFromEnvVars ¶
AreCredsFromEnvVars returns true if the session's credentials provider is environment variables, false otherwise. An error is returned if the credentials are invalid or the request times out.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider provides methods to create sessions. Once a session is created, it's cached locally so that the same session is not re-created.
func (*Provider) DefaultWithRegion ¶
DefaultWithRegion returns a session configured against the "default" AWS profile and the input region.
func (*Provider) FromProfile ¶
FromProfile returns a session configured against the input profile name.
Click to show internal directories.
Click to hide internal directories.