Skip to content

Use GO AWS SDK connect to AWS and support different kind of credentials, e.g. profile, temporary session token and etc.

Notifications You must be signed in to change notification settings

calvinzhoufeng/go-aws-credentials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

go-aws-credentials

Use GO AWS SDK connect to AWS and support different kind of credentials, e.g. profile, temporary session token and etc.

Example

Go get

go get github.com/CyanZero/go-aws-credentials/sessionutil

In the code to import and create a new session

import (
	"github.com/CyanZero/go-aws-credentials/sessionutil"
)

// To get a temporary session via MFA token
func test() {
  sess := sessionutil.GetSession("", "SerialNumber of your MFA device", "Token Code from you MFA device")
  svc := s3.New(sess)
  input := &s3.ListBucketsInput{}
  
  fmt.Println(svc.ListBuckets(input))
}

** This is still in beta version **

About

Use GO AWS SDK connect to AWS and support different kind of credentials, e.g. profile, temporary session token and etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages