How to parametrize the AWS region via a Bamboo variable

You want to parametrize the AWS region targeted by a task, for example within a parametrized plan build:

Step-by-step guide

This can be achieved by passing the input as a Bamboo variable:

1. Define a plan or global variable with an appropriate name like 'awsDefaultRegion' (ensure to skip the 'bamboo.' namespace prefix that is required when referencing the variable later on) and the target AWS region's code as variable value – at the time of this writing these are (refer to regional endpoints for details):

Partition

Code

Name

Partition

Code

Name

aws

af-south-1

Africa (Cape Town)

 

ap-east-1

Asia Pacific (Hong Kong)

 

ap-northeast-1

Asia Pacific (Tokyo)

 

ap-northeast-2

Asia Pacific (Seoul)

 

ap-south-1

Asia Pacific (Mumbai)

 

ap-southeast-1

Asia Pacific (Singapore)

 

ap-southeast-2

Asia Pacific (Sydney)

 

ap-northeast-3

Asia Pacific (Osaka)

 

ca-central-1

Canada (Central)

 

eu-central-1

Europe (Frankfurt)

 

eu-north-1

Europe (Stockholm)

 

eu-south-1

Europe (Milan)

 

eu-west-1

Europe (Ireland)

 

eu-west-2

Europe (London)

 

eu-west-3

Europe (Paris)

 

me-south-1

Middle East (Bahrain)

 

sa-east-1

South America (Sao Paulo)

 

us-east-1

US East (N. Virginia)

 

us-east-2

US East (Ohio)

 

us-west-1

US West (N. California)

 

us-west-2

US West (Oregon)

aws-cn

cn-north-1

China (Beijing)

 

cn-northwest-1

China (Ningxia)

aws-us-gov

us-gov-east-1

AWS GovCloud (US-East)

 

us-gov-west-1

AWS GovCloud (US)

 

2. Select '[Use region variable ...]' from the Regions widget and reference the Bamboo variable name that defines the target region as defined in step 1 in the Region Variable field, for example 'awsDefaultRegion' (ensure to add the 'bamboo.' namespace prefix before the variable name):