/aws-regions

AWS Regions and Availability Zones

Primary LanguageJavaScriptMIT LicenseMIT

AWS Regions

Region Code Region Name Availability Zones
1us-east-1 N. Virginia us-east-1a us-east-1b us-east-1c us-east-1d us-east-1e us-east-1f
us-east-2 Ohio us-east-2a us-east-2b us-east-2c
1us-west-1 N. California us-west-1a us-west-1b *us-west-1c
us-west-2 Oregon us-west-2a us-west-2b us-west-2c
2us-gov-west-1 US GovCloud West us-gov-west-1a us-gov-west-1b us-gov-west-1c
ca-central-1 Canada ca-central-1a ca-central-1b
eu-west-1 Ireland eu-west-1a eu-west-1b eu-west-1c
eu-west-2 London eu-west-2a eu-west-2b eu-west-2c
eu-west-3 Paris eu-west-3a eu-west-3b eu-west-3c
eu-central-1 Frankfurt eu-central-1a eu-central-1b eu-central-1c
1ap-northeast-1 Tokyo ap-northeast-1a ap-northeast-1b ap-northeast-1c *ap-northeast-1d
ap-northeast-2 Seoul ap-northeast-2a ap-northeast-2c
4ap-northeast-3 Osaka ap-northeast-3a
ap-southeast-1 Singapore ap-southeast-1a ap-southeast-1b ap-southeast-1c
ap-southeast-2 Sydney ap-southeast-2a ap-southeast-2b ap-southeast-2c
ap-south-1 Mumbai ap-south-1a ap-south-1b
1sa-east-1 Sao Paulo sa-east-1a sa-east-1b *sa-east-1c
3cn-north-1 Bejing cn-north-1a cn-north-1b
3cn-northwest-1 Ningxia cn-northwest-1a cn-northwest-1b cn-northwest-1c
coming soon Bahrain ...
coming soon Hong Kong SAR ...
coming soon Stockholm ...
coming soon US GovCloud East ...

1To ensure that resources are distributed across the Availability Zones for these regions, they may differ for each AWS account. You can run aws ec2 describe-availability-zones --region $REGION to be sure which ones are available to you.
2The US GovCloud region is only available to official U.S. government agencies and organizations.
3The China regions are only available to AWS in China accounts.
4Only available in the local region
*New accounts cannot access this region.

Javascript API

$ npm install aws-regions
const awsRegions = require('aws-regions')
.list(options: Object)

Returns all the regions in a list format.

awsRegions.list()
/* only the public regions */
awsRegions.list({ public: true })
[
  {
    name: 'n-virginia',
    code: 'us-east-1',
    public: true,
    zones: ['...']
  },
  // ...
]
  • options
    • public If true, will only return regions publicly available with a regular AWS account. Defaults to false.
.get(nameOrCode: String)

Finds a region by the name or the code.

awsRegions.get('n-virginia')
/* or */
awsRegions.get('us-east-1')
{
  name: 'n-virginia',
  code: 'us-east-1',
  public: true,
  zones: ['...']
}
.regions

The raw region data object.

{
  'n-virginia': {
    code: 'us-east-1',
    public: true,
    zones: ['us-east-1a', '...']
  },
  // ...
}

Raw Data

You can download a JSON file with all the region data here.

License

MIT © Jason Maurer