JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19
  • Score
    100M100P100Q55871F
  • License MIT

Assume IAM roles between AWS accounts

Package Exports

  • assumer-cli

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (assumer-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

assumer-cli

Assume IAM roles between AWS accounts

NPM

NSP Status

Install

npm i -g assumer-cli

Usage

❯ assumer --help

  Assume IAM roles between AWS accounts

  Usage
    $ assumer
    $ assumer <flags>

  Required Flags
    -a, --target-account    Target Account Number
    -r, --target-role       Target Account Role
    -A, --control-account   Control Account Number
    -R, --control-role      Control Account Role

  Optional Flags
    -u, --username          An AWS IAM username (defaults to system user name)
    -g, --gui               Open a web browser to the AWS console with these credentials
    -t, --token             MFA Token (you will be interactively prompted)

  Example
    $ assumer # interactive mode
    $ assumer -a 111111111111 -r target/role -A 123456789012 -R control/role

Configuration

If you want to use the CLI in interactive mode, assumer expects a config file called .assumer.json in your home directory. Sample configuration:

{
  "control": {
    "accounts": [
      {
        "name": "Control Account",
        "value": "123456789012"
      }
    ],
    "roles": [
      {
        "name": "Deploy Admin",
        "value": "deployment/admin"
      },
      {
        "name": "Super Admin",
        "value": "security/admin"
      },
      {
        "name": "Read Only",
        "value": "read/only"
      }
    ]
  },
  "target": {
    "roles": [
      {
        "name": "Deploy Admin",
        "value": "deployment/admin"
      },
      {
        "name": "Super Admin",
        "value": "security/admin"
      },
      {
        "name": "Read Only",
        "value": "read/only"
      }
    ],
    "accounts": [
      {
        "name": "target-account-1",
        "value": "111111111111"
      },
      {
        "name": "target-account-2",
        "value": "222222222222"
      }
    ]
  }
}

See sample config file for reference.

License

MIT © Peter Benjamin