awssession

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsSession added in v0.0.4

type AwsSession struct {
	Profile  string
	Duration string
	Token    string
	HomeDir  string
	Eval     bool
}

AwsSession is used to store AWS Session Config for generating STS token.

func New

func New() *AwsSession

New create new AwsSession object

func (*AwsSession) AssumeRoleFromConfig added in v0.0.4

func (sess *AwsSession) AssumeRoleFromConfig()

AssumeRoleFromConfig allows to assume IAM role with MFA that are defined in ~/.aws/config defined

func (*AwsSession) GetUserSession added in v0.0.4

func (sess *AwsSession) GetUserSession()

GetUserSession implements GetSessionToken with MFA for the AWS IAM User.

type CredentialResult added in v0.0.4

type CredentialResult struct {
	AccessKey    string `ini:"aws_access_key_id"`
	SecretKey    string `ini:"aws_secret_access_key"`
	SessionToken string `ini:"aws_session_token"`
}

CredentialResult is caching STS session credentials and then writing them to ~/.aws/credentials file

Jump to

Keyboard shortcuts

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