Skip to main content

Region management

RegionEndpoint instance is required to create DynamoDbContextConfig and start making calls to the DynamoDB. There are two main ways to create an instance of RegionEndpoint in EfficientDynamoDb:

  1. Use one of static properties declared in RegionEndpoint.
  2. Use RegionEndpoint constructor to dynamically create an instance.

Using static properties

Static properties should be your default way to get an instance of RegionEndpoint. It suits most of the production cases and makes sure that there is no mistake in the region name:

var region = RegionEndpoint.USEast1;

We regularly update the list of available AWS regions when new ones are launched.

Create regions dynamically

You might want to create regions dynamically in following cases:

  1. You don't know region to access at the compile time.
  2. Region you want to access is not available as a static property.
  3. You need to set custom request URI, e.g. for local DynamoDB.

Use RegionEndpoint.Create(string region) to dynamically create a region:

var region = RegionEndpoint.Create("us-east-1");

Use RegionEndpoint.Create(string region, string requestUri) to create a region with custom service URL:

var region = RegionEndpoint.Create("local", "http://localhost:8000");

Predefined AWS regions

AWS Region CodeAWS Region NameC# Region Property
us-east-1US East (N. Virginia)RegionEndpoint.USEast1
us-east-2US East (Ohio)RegionEndpoint.USEast2
us-west-1US West (N. California)RegionEndpoint.USWest1
us-west-2US West (Oregon)RegionEndpoint.USWest2
af-south-1Africa (Cape Town)RegionEndpoint.AFSouth1
ap-east-1Asia Pacific (Hong Kong)RegionEndpoint.APEast1
ap-south-1Asia Pacific (Mumbai)RegionEndpoint.APSouth1
ap-south-2Asia Pacific (Hyderabad)RegionEndpoint.APSouth2
ap-northeast-1Asia Pacific (Tokyo)RegionEndpoint.APNorthEast1
ap-northeast-2Asia Pacific (Seoul)RegionEndpoint.APNorthEast2
ap-northeast-3Asia Pacific (Osaka-Local)RegionEndpoint.APNorthEast3
ap-southeast-1Asia Pacific (Singapore)RegionEndpoint.APSouthEast1
ap-southeast-2Asia Pacific (Sydney)RegionEndpoint.APSouthEast2
ap-southeast-3Asia Pacific (Jakarta)RegionEndpoint.APSouthEast3
ap-southeast-4Asia Pacific (Melbourne)RegionEndpoint.APSouthEast4
ca-central-1Canada (Central)RegionEndpoint.CACentral1
cn-north-1China (Beijing)RegionEndpoint.CNNorth1
cn-northwest-1China (Ningxia)RegionEndpoint.CNNorthWest1
eu-central-1Europe (Frankfurt)RegionEndpoint.EUCenteral1
eu-central-2Europe (Zurich)RegionEndpoint.EUCenteral2
eu-west-1Europe (Ireland)RegionEndpoint.EUWest1
eu-west-2Europe (London)RegionEndpoint.EUWest2
eu-west-3Europe (Paris)RegionEndpoint.EUWest3
eu-south-1Europe (Milan)RegionEndpoint.EUSouth1
eu-south-2Europe (Spain)RegionEndpoint.EUSouth2
eu-north-1Europe (Stockholm)RegionEndpoint.EUNorth1
me-south-1Middle East (Bahrain)RegionEndpoint.MESouth1
me-central-1Middle East (UAE)RegionEndpoint.MECentral1
il-central-1Israel (Tel Aviv)RegionEndpoint.ILCentral1
sa-east-1South America (São Paulo)RegionEndpoint.SAEast1
us-gov-east-1AWS GovCloud (US-East)RegionEndpoint.USGovEast1
us-gov-west-1AWS GovCloud (US)RegionEndpoint.USGovWest1