awsconfig

package module
v0.0.0-...-b472c13 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2016 License: MIT Imports: 9 Imported by: 0

README

ushios/awsconfig

Get aws config from IAMRole or credentials file.

Build Status Coverage Status

Installation

$ go get github.com/ushios/awsconfig

Documentation

GoDoc

Samples

Get s3 client
import (
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/s3"
)

s3client := s3.New(session.New(awsconfig.Config(nil)))

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CredentialFilePath is path to credentials file
	// See also: http://docs.aws.amazon.com/ja_jp/cli/latest/userguide/cli-chap-getting-started.html
	CredentialFilePath string
	// CredentialName is name of credentials file setting
	CredentialName string
	// Timeout aws-sdk session timeout
	Timeout time.Duration
	// Region is region of AWS
	Region string
)

Functions

func Config

func Config(options *Options) *aws.Config

Config return aws config

func Credentials

func Credentials() *credentials.Credentials

Credentials return credential info

Types

type Options

type Options struct {
	Region string
}

Jump to

Keyboard shortcuts

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