# @symbiotic/aws-tools

> Symbiotic Labs AWS tools

Latest version **1.0.0** (published 2019-10-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install @symbiotic/aws-tools
pnpm add @symbiotic/aws-tools
yarn add @symbiotic/aws-tools
bun add @symbiotic/aws-tools
```

Provides the command `assert-aws-account-id`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-10-03 |
| First published | 2019-10-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | charliebuildsalot, jeremybull, benglass, jhoguet |

## Links

- npm: https://www.npmjs.com/package/@symbiotic/aws-tools
- npm.io page: https://npm.io/package/@symbiotic/aws-tools

## Dependencies (4)

- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.532.0
- [camelize](https://npm.io/package/camelize.md) ^1.0.0
- [command-line-args](https://npm.io/package/command-line-args.md) ^5.1.1
- [command-line-usage](https://npm.io/package/command-line-usage.md) ^6.0.2

## Recent versions

- 1.0.0 (latest) — 2019-10-03

## README

# aws-tools

## assert-aws-account-id

Asserts that the account you are currently logged in to, is the account id you
  expect to be logged in to. This command will fail if you are logged in to
  another account so that it can be used in scripting and prevent future
  commands (like a deploy) from proceeding if you are logged in to the wrong
  account.

    npm install @symbiotic/aws-tools --save-dev
    assert-aws-account-id --account-id=111122223333

### Motivation
We log in to multiple accounts for different projects, and even different environments for a single project.

We find that for each repo, 99% of the time we're logged into one aws account (the dev environment for that project).

And so we wanted to reduce the risk that we accidentally make changes to the wrong aws account.

### Recommend Use
We recommend that for each repo, you set an environment variable with the repo name that is part of one time setup.
 eg MY_COOL_CATS_AWS_ACCOUNT_ID=111122223333
 > where do I put this? anywhere that will always be set when you're using the terminal with the project (eg ~/.bash_profile)

Then in the commands you want to protect, you add this command

    assert-aws-account-id --account-id=$MY_COOL_CATS_AWS_ACCOUNT_ID

So if you use package.json, it might look like this

```json
 "deploy": "assert-aws-account-id --account-id=$MY_COOL_CATS_AWS_ACCOUNT_ID && scripts/deploy.js"
```

---
_Source: https://npm.io/package/@symbiotic/aws-tools · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
