AWS Region Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Amazon Concepts =Overview= =Get the AWS Region= =Set the AWS Region=")
 
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:


* [[Amazon AWS Concepts#Region|Amazon Concepts]]
* [[Amazon AWS Concepts#Region|Amazon Concepts]]
* [[Amazon_EC2_Operations#Region_Operations|EC2 Operations]]


=Overview=
=Overview=


=Get the AWS Region=
=Get the AWS Region=
  aws configure get region
=Describe Regions=
All regions:
aws ec2 describe-regions
One region:
aws ec2 describe-regions --region-name eu-north-1


=Set the AWS Region=
=Set the AWS Region=
==Set Region for AWS CLI in .aws Configuration Files==
One possibility is to configure it manually in the [[AWS_CLI#Configuration|AWS CLI configuration file]].
<syntaxhighlight lang='text'>
...
[default]
region = us-west-2
...
</syntaxhighlight>
==Setting Region for EC2 CLI==
export EC2_URL=https://<service_endpoint> 
Example:
export EC2_URL=https://ec2.us-west-2.amazonaws.com
Note: For some reason, the console always shows by default "Oregon", which corresponds to <tt>https://ec2.us-west-2.amazonaws.com</tt>.
==Setting AWS Region for Spring Cloud==
[[Spring_Cloud#Organizatorium|Spring Cloud]] applications can have their AWS region set in [[application.yml]] as follows:
<syntaxhighlight lang='yaml'>
cloud.aws.region.static: us-west-2
</syntaxhighlight>
==Setting Region for AWS CLI==
aws --region us-west-2 ...

Latest revision as of 22:34, 10 April 2019

Internal

Overview

Get the AWS Region

 aws configure get region

Describe Regions

All regions:

aws ec2 describe-regions

One region:

aws ec2 describe-regions --region-name eu-north-1

Set the AWS Region

Set Region for AWS CLI in .aws Configuration Files

One possibility is to configure it manually in the AWS CLI configuration file.

...
[default]
region = us-west-2
...

Setting Region for EC2 CLI

export EC2_URL=https://<service_endpoint>  

Example:

export EC2_URL=https://ec2.us-west-2.amazonaws.com

Note: For some reason, the console always shows by default "Oregon", which corresponds to https://ec2.us-west-2.amazonaws.com.

Setting AWS Region for Spring Cloud

Spring Cloud applications can have their AWS region set in application.yml as follows:

cloud.aws.region.static: us-west-2

Setting Region for AWS CLI

aws --region us-west-2 ...