aws-regions
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/aws-regions package

2.3.1 • Public • Published

AWS Regions - Javascript

Usage

$ npm install aws-regions

.list(options: Object)

Returns all the regions.

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.

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

Package Sidebar

Install

npm i aws-regions

Weekly Downloads

944

Version

2.3.1

License

MIT

Unpacked Size

9.07 kB

Total Files

5

Last publish

Collaborators

  • jsonmaur