AWS has documentation for: Determining an Application’s Current Region.
Regarding their API "The new Regions.getCurrentRegion() method makes this a lot easier. For example, if you start an Amazon EC2 instance in us-west-1 and run your application on that instance, it would know it’s running in us-west-1 and you could use that information to easily configure your application to talk to other services in us-west-1."
.. そして、正しい方向に進むために探しているキーワードを含むコードスニペットを次に示します。
// When running on an Amazon EC2 instance, this method
// will tell you what region your application is in
Region region = Regions.getCurrentRegion();