# aws-regions

> List of AWS Regions and Availability Zones

Latest version **2.3.1** (published 2021-12-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install aws-regions
pnpm add aws-regions
yarn add aws-regions
bun add aws-regions
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.3.1 |
| Published | 2021-12-24 |
| First published | 2017-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/aws-regions) |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 0 |
| Unpacked size | 8.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 128 |
| Author | Jason Maurer |
| Maintainers | jsonmaur |
| Keywords | aws, amazon, regions, availability, zones, azs, global, infrastructure |

## Links

- npm: https://www.npmjs.com/package/aws-regions
- Repository: https://github.com/jsonmaur/aws-regions
- Homepage: https://github.com/jsonmaur/aws-regions#readme
- Issues: https://github.com/jsonmaur/aws-regions/issues
- npm.io page: https://npm.io/package/aws-regions

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 2.3.1 (latest) — 2021-12-24
- 2.3.0 — 2021-12-24
- 2.2.0 — 2020-05-21
- 2.1.0 — 2019-09-29
- 2.0.1 — 2019-07-05
- 2.0.0 — 2019-02-28
- 1.5.0 — 2019-02-28
- 1.4.1 — 2018-08-01
- 1.4.0 — 2018-07-28
- 1.3.1 — 2017-12-28
- 1.3.0 — 2017-07-20
- 1.2.0 — 2017-07-15
- 1.1.0 — 2017-07-14
- 1.0.0 — 2017-07-14

## README

# AWS Regions - Javascript

## Usage

```bash
$ npm install aws-regions
```

### .list(options: Object)

Returns all the regions.

```javascript
const awsRegions = require('aws-regions')

awsRegions.list() ===
	[
		{
			name: 'N. Virginia',
			full_name: 'US East (N. Virginia)',
			code: 'us-east-1',
			public: true,
			zones: [
				'us-east-1a',
				// ...
			],
		},
		// ...
	]
```

- `options`
	- `public` If true, will only return regions publicly available with a regular AWS account. Defaults to `false`.

### .lookup(options: Object)

Finds a region by the name or the code.

```javascript
const awsRegions = require('aws-regions')

awsRegions.lookup({ code: 'us-east-1' }) ===
	{
		name: 'N. Virginia',
		full_name: 'US East (N. Virginia)',
		code: 'us-east-1',
		public: true,
		zones: [
			'us-east-1a',
			// ...
		],
	}
```

- `options`
	- `code` Lookup a region by its code (e.g. `us-east-1`).
	- `name` Lookup a region by its name (e.g. `N. Virginia`).


## Zone Limit

If a region's data object includes `zone_limit: int`, that means AWS accounts are limited to this number of availability zones (which will differ based on when your account was created.) You'll need to get your specific availability zones for this region with the AWS API or CLI.

## [Regions List](../readme.md)

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