AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Returns the set of available AWS regions.

Syntax

PublicOnly (Default)

Get-AWSRegion
-SystemName <String>
-IncludeChina <SwitchParameter>

PublicAndGovCloud

Get-AWSRegion
-SystemName <String>
-IncludeChina <SwitchParameter>
-IncludeGovCloud <SwitchParameter>

GovCloudOnly

Get-AWSRegion
-GovCloudOnly <SwitchParameter>

Description

Returns the set of available AWS regions.

Note: The regions listed as output for this cmdlet are those known at the time this module was built. Regions launched subsequent to the build will not be listed in the output. The new regions can still be used with the -Region parameter for cmdlets in this module by simply entering the region system name (eg us-west-2, eu-west-3 etc).

Parameters

-GovCloudOnly <SwitchParameter>
If set the returned collection contains only the 'Gov Cloud' region(s).Default: off.
Required?False
Position?Named
Accept pipeline input?False
-IncludeChina <SwitchParameter>
Include the China (Beijing) region in the returned collection of AWSRegion instances. Note that use of this region requires an alternate set of credentials.This switch is ignored if the SystemName parameter is used to request a specific AWSRegion instance. To return the specific China (Beijing) region, specify a value of 'cn-north-1' for the SystemName parameter.Default: off.
Required?False
Position?Named
Accept pipeline input?False
-IncludeGovCloud <SwitchParameter>
If set the returned collection includes 'Gov Cloud' region(s).Default: off.
Required?False
Position?Named
Accept pipeline input?False
-SystemName <String>
If set returns an AWSRegion instance corresponding to the specified system name (e.g. us-west-2).This parameter can also be used to return AWSRegion instances for the US GovCloud and China (Beijing) regions by specifying the relevant system name.
Required?False
Position?1
Accept pipeline input?True (ByValue, )

Inputs

You can pipe a String object to this cmdlet for the SystemName parameter.

Outputs

AWSRegion
AWSRegion instance for each available region.

Examples

Example 1

PS C:\> Get-DefaultAWSRegion

Region Name IsShellDefault
------ ---- --------------
ap-northeast-1 Asia Pacific (Tokyo) False
ap-northeast-2 Asia Pacific (Seoul) False
ap-south-1 Asia Pacific (Mumbai) False
ap-southeast-1 Asia Pacific (Singapore) False
ap-southeast-2 Asia Pacific (Sydney) False
ca-central-1 Canada (Central) False
eu-central-1 EU Central (Frankfurt) False
eu-west-1 EU West (Ireland) False
eu-west-2 EU West (London) False
eu-west-3 EU West (Paris) False
sa-east-1 South America (Sao Paulo) False
us-east-1 US East (Virginia) False
us-east-2 US East (Ohio) False
us-west-1 US West (N. California) False
us-west-2 US West (Oregon) True
Returns the list of regions known at the time the the module was built and released. Regions launched after the build and release are not shown but can still be used with other cmdlets in the module by specifying the 'system name' to the cmdlet's -Region parameter on invocation.

Example 2

PS C:\> Get-DefaultAWSRegion

Region Name IsShellDefault
------ ---- --------------
ap-northeast-1 Asia Pacific (Tokyo) False
ap-northeast-2 Asia Pacific (Seoul) False
ap-south-1 Asia Pacific (Mumbai) False
...
us-west-1 US West (N. California) False
us-west-2 US West (Oregon) True

PS C:\> Get-EC2Instance -Region not-shown-above
This example shows how to use a region that is not listed in the output of the Get-AWSRegion cmdlet, likely as the region was launched after the installed version of the module was released. To use the unlisted region, simply pass the 'system name' (eg us-east-1, us-west-2) to the -Region parameter of the cmdlet you want to run (in this example, Get-EC2Instance). In this example 'not-shown-above' is the fictional system code of a new region.

Supported Version

AWS Tools for PowerShell: 2.x.y.z