Documentation ¶
Index ¶
- Constants
- func GetProfile() string
- func GetProfiles(configFile ...string) []string
- func GetRegion() string
- func GetRegionFromConfigFile(configFile, profile string) (string, error)
- func GetRegionFromInstanceIdentityDocument() string
- func GetSharedConfigFile() string
- func GetSharedCredentialsFile() string
- func NewConfig(opt Option) (*aws.Config, error)
- func NewCredentials(opt Option) *credentials.Credentials
- func NewSession(arg ...interface{}) (*session.Session, error)
- type Option
Constants ¶
View Source
const (
// DefaultProfile is default profile name
DefaultProfile = "default"
)
Variables ¶
This section is empty.
Functions ¶
func GetProfiles ¶
GetProfiles returns the shared config file section names
func GetRegionFromConfigFile ¶
GetRegionFromConfigFile returns the region from the shared config file
func GetRegionFromInstanceIdentityDocument ¶
func GetRegionFromInstanceIdentityDocument() string
GetRegionFromInstanceIdentityDocument returns the region from the Instance Metadata
func GetSharedConfigFile ¶
func GetSharedConfigFile() string
GetSharedConfigFile returns the path to the shared config file
func GetSharedCredentialsFile ¶
func GetSharedCredentialsFile() string
GetSharedCredentialsFile returns the path to the shared credentials file
func NewCredentials ¶
func NewCredentials(opt Option) *credentials.Credentials
NewCredentials returns the *credentials.Credentials
Types ¶
type Option ¶
type Option struct { // AWS Access Key ID AccessKey string // AWS Access Secret Access Key SecretKey string // AWS Profile Profile string // Path to the shared config file Config string // Path to the shared credentials file Credentials string // AWS Session Token Token string // AWS Region Region string }
Option is AWS Config options
Click to show internal directories.
Click to hide internal directories.