// GetAwsSessWithDefaultCreds returns a pointer to session which has got aws creds from default methods.
// It also returns an error if there was any.
GetAwsSessWithDefaultCreds returns a pointer to session which has got aws creds from default methods.
It also returns an error if there was any.
// GetAwsSessWithDefaultCreds returns a pointer to session which has got aws creds from default methods . // It also returns an error if there was any .
func GetAwsSessWithDefaultCreds() (*session.Session, error) {
	sessPtr := createSession(session.Options{SharedConfigState: session.SharedConfigEnable})
	if _, err := sessPtr.Config.Credentials.Get(); err != nil {
		return nil, fmt.Errorf("NoDefaultCredProviderExist: No Default Credential Provider Exists")
	}
	svc := sts.New(sessPtr)
	if ok := IsCredsExpired(svc); ok {
		return nil, fmt.Errorf("CredsExpired: Default AWS Provider's Credentials Have Expired")
	}
	return sessPtr, nil
}
func GetAwsSessWithDefaultCreds ( ) ( * session . Session , error ) { sessPtr := createSession ( session . Options { SharedConfigState : session . SharedConfigEnable } ) if _ , err := sessPtr . Config . Credentials . Get ( ) ; err != nil { return nil , fmt . Errorf ( " " ) } svc := sts . New ( sessPtr ) if ok := IsCredsExpired ( svc ) ; ok { return nil , fmt . Errorf ( " " ) } return sessPtr , nil }
GetAwsSessWithDefaultCreds returns a pointer to session which has got aws creds from default methods.
GetAwsSessWithDefaultCreds returns a pointer to session which has got aws creds from default methods .