GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - youyo/awsprofile: awsprofile is library of parse to ~/.aws/credentials and ~/.aws/config .

BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
tests/.aws
tests/.aws
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
awsprofile.go
awsprofile.go
 
 
awsprofile_test.go
awsprofile_test.go
 
 
config.go
config.go
 
 
config_test.go
config_test.go
 
 
credentials.go
credentials.go
 
 
credentials_test.go
credentials_test.go
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

awsprofile

GitHubActionBadge

awsprofile is library of parse to ~/.aws/credentials and ~/.aws/config .

Basic usage

awsProfile := awsprofile.New()

// Parse AWS_SHARED_CREDENTIALS_FILE and AWS_CONFIG_FILE
if err := awsProfile.Parse(); err != nil {
    log.Fatal(err)
}

// Get profile names
profiles, err := awsProfile.ProfileNames()
if err != nil {
    log.Fatal(err)
}

fmt.Println(profiles)
// Output: [default foo bar]

// Get Configs
configs, err := awsProfile.GetConfigs()
if err != nil {
     log.Fatal(err)
}

// Get RoleArn
roleArn, err := configs.GetRoleArn("bar")
if err != nil {
      log.Fatal(err)
}

fmt.Println(roleArn)
// Output: arn:aws:iam::xxxxxxxxxxxx:role/bar

Document

See https://godoc.org/github.com/youyo/awsprofile

About

awsprofile is library of parse to ~/.aws/credentials and ~/.aws/config .

Topics

awsaws-cliaws-profile

Resources

Readme
Activity

Stars

4 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.