Enum Region
- All Implemented Interfaces:
Serializable
,Comparable<Region>
,java.lang.constant.Constable
Amazon S3 Regions allow the user to choose the geographical region where Amazon S3 will store the buckets the user creates. Choose a Amazon S3 Region to optimize latency, minimize costs, or address regulatory requirements.
Objects stored in a Amazon S3 Region never leave that region unless explicitly transferred to another region.
In Amazon S3, all the regions provides read-after-write consistency for PUTS of new objects in Amazon S3 buckets and eventual consistency for overwrite PUTS and DELETES.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe Asia Pacific (Seoul) Region.The Asia Pacific (Singapore) Region.The Asia Pacific (Sydney) Region.The Asia Pacific (Tokyo) Region.The China (Beijing) Region.The EU (Frankfurt) Amazon S3 Region.The EU (Ireland) Amazon S3 Region.The South America (Sao Paulo) Region.The US GovCloud Region.The US Standard Amazon S3 Region.The US-West (Northern California) Amazon S3 Region.The US-West-2 (Oregon) Region. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Pattern
Used to extract the S3 regional id from an S3 end point. -
Method Summary
Modifier and TypeMethodDescriptionstatic Region
Returns the Amazon S3 Region enumeration value representing the specified Amazon S3 Region ID string.Returns the first region id or null forUS_Standard
.Returns the respective AWS region.toString()
static Region
Returns the enum constant of this type with the specified name.static Region[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
US_Standard
The US Standard Amazon S3 Region. This region uses Amazon S3 servers located in the United States.This is the default Amazon S3 Region. All requests sent to
s3.amazonaws.com
go to this region unless a location constraint is specified when creating a bucket. The US Standard Region automatically places data in either Amazon's east or west coast data centers depending on which one provides the lowest latency. -
US_West
The US-West (Northern California) Amazon S3 Region. This region uses Amazon S3 servers located in Northern California.When using buckets in this region, set the client endpoint to
s3-us-west-1.amazonaws.com
on all requests to these buckets to reduce any latency experienced after the first hour of creating a bucket in this region. -
US_West_2
The US-West-2 (Oregon) Region. This region uses Amazon S3 servers located in Oregon.When using buckets in this region, set the client endpoint to
s3-us-west-2.amazonaws.com
on all requests to these buckets to reduce any latency experienced after the first hour of creating a bucket in this region. -
US_GovCloud
The US GovCloud Region. This region uses Amazon S3 servers located in the Northwestern region of the United States. -
EU_Ireland
The EU (Ireland) Amazon S3 Region. This region uses Amazon S3 servers located in Ireland. -
EU_Frankfurt
The EU (Frankfurt) Amazon S3 Region. This region uses Amazon S3 servers located in Frankfurt.The EU (Frankfurt) Region requires AWS V4 authentication, therefore when accessing buckets inside this region, you need to explicitly configure the "eu-central-1" endpoint for the AmazonS3Client in order to enable V4 signing:
AmazonS3Client s3 = new AmazonS3Client(); s3.setRegion(RegionUtils.getRegion("eu-central-1"));
- See Also:
-
AP_Singapore
The Asia Pacific (Singapore) Region. This region uses Amazon S3 servers located in Singapore.When using buckets in this region, set the client endpoint to
s3-ap-southeast-1.amazonaws.com
on all requests to these buckets to reduce any latency experienced after the first hour of creating a bucket in this region. -
AP_Sydney
The Asia Pacific (Sydney) Region. This region uses Amazon S3 servers located in Sydney, Australia.When using buckets in this region, set the client endpoint to
s3-ap-southeast-2.amazonaws.com
on all requests to these buckets to reduce any latency experienced after the first hour of creating a bucket in this region. -
AP_Tokyo
The Asia Pacific (Tokyo) Region. This region uses Amazon S3 servers located in Tokyo.When using buckets in this region, set the client endpoint to
s3-ap-northeast-1.amazonaws.com
on all requests to these buckets to reduce any latency experienced after the first hour of creating a bucket in this region. -
AP_Seoul
The Asia Pacific (Seoul) Region. This region uses Amazon S3 servers located in Seoul.When using buckets in this region, set the client endpoint to
s3.ap-northeast-2.amazonaws.com
on all requests to these buckets to reduce any latency experienced after the first hour of creating a bucket in this region. -
SA_SaoPaulo
The South America (Sao Paulo) Region. This region uses Amazon S3 servers located in Sao Paulo.When using buckets in this region, set the client endpoint to
s3-sa-east-1.amazonaws.com
on all requests to these buckets to reduce any latency experienced after the first hour of creating a bucket in this region. -
CN_Beijing
The China (Beijing) Region. This region uses Amazon S3 servers located in Beijing.When using buckets in this region, you must set the client endpoint to
s3.cn-north-1.amazonaws.com.cn
.
-
-
Field Details
-
S3_REGIONAL_ENDPOINT_PATTERN
Used to extract the S3 regional id from an S3 end point. Note this pattern will not match the S3 US standard endpoint by intent. Exampless:s3-eu-west-1.amazonaws.com s3.cn-north-1.amazonaws.com.cn
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
-
getFirstRegionId
Returns the first region id or null forUS_Standard
. -
fromValue
Returns the Amazon S3 Region enumeration value representing the specified Amazon S3 Region ID string. If specified string doesn't map to a known Amazon S3 Region, then anIllegalArgumentException
is thrown.- Parameters:
s3RegionId
- The Amazon S3 region ID string.- Returns:
- The Amazon S3 Region enumeration value representing the specified Amazon S3 Region ID.
- Throws:
IllegalArgumentException
- If the specified value does not map to one of the known Amazon S3 regions.
-
toAWSRegion
Returns the respective AWS region.
-