awsmfa

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

README

awsmfa (AWS MFA Refresher)

Test Status Apache-2.0 license

awsmfa replaces the config(~/.aws/config) and credentials(~/.aws/credentials) for MFA in AWS.

Usage

$ awsmfa [options] [token-code]
Options
--profile string
	The name of the profile from which the session can be obtained (default `default`)

--mfa-profile-name string
	MFA profile name (default `mfa`)

--duration-seconds int64
	Session expiration duration secounds (default `43200`)

--serial-number string
	AWS serial number. `--serial-number` is required

--token-code string
	Device token codes issued by the MFA. `--token-code` option or `token-code` is required

--quiet bool
	if enabled, log is not printed in the console. (default `false`)
Example
$ awsmfa --serial-number arn:aws:iam::123456789012:mfa/d-tsuji --profile my-profile 123456

Installation

  • From binary
# binary
$ curl -sfL https://raw.githubusercontent.com/d-tsuji/awsmfa/master/install.sh | sudo sh -s -- -b /usr/local/bin
  • From source code
# go get
$ go get github.com/d-tsuji/awsmfa/cmd/awsmfa

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, c *Config) error

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(c *cli.Context) (*Config, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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