Configuration
Tip | ||
---|---|---|
| ||
The most frequent use case for the AWS Credentials Variables task is to address scenarios not (yet) covered by dedicated tasks, see How to work around limitations with the AWS Command Line Interface (AWS CLI) for details. |
To configure an AWS Credentials Variables task:
- Navigate to the Tasks configuration tab for the job (this will be the default job if creating a new plan).
- Click the name of an existing AWS Credentials Variables task, or click Add Task and then AWS Credentials Variables to create a new task.
Complete the following settings:
Task Description | (Optional) Identify the purpose of the task. |
Disable this task | Check, or clear, to selectively run this task. |
Source | Select the AWS Credentials Source (see below). Can be either Identity Federation for AWS or an IAM Role for EC2. |
Connector | (Conditional) Select the shared Identity Federation for AWS Connector. Alternatively, select [Use connector variable ...] to supply the connector dynamically via Bamboo variables (needs to be a connector id such as |
Role ARN | (Conditional | Optional) Specify the ARN of another role that the agent's IAM role for EC2 should assume. |
AWS Credentials Sources
Tip | |||||||
---|---|---|---|---|---|---|---|
| |||||||
The AWS Credentials Variables task requires IAM permissions to retrieve temporary security credentials via the AWS Security Token Service (STS) - an all-encompassing policy look as follows:
Refer to Granting Permissions to Create Temporary Security Credentials for details on how to create more granular/secure policies, for example:
|
You have the following options to provide AWS Security Credentials:
Include Page | ||||
---|---|---|---|---|
|
Include Page | ||||
---|---|---|---|---|
|
Usage
Bamboo variables
This task generates the following Bamboo variables for reuse in subsequent tasks without native integration with Identity Federation for AWS:
Code Block | ||||
---|---|---|---|---|
| ||||
${bamboo.custom.aws.accessKeyId} ${bamboo.custom.aws.secretAccessKey.password} ${bamboo.custom.aws.sessionToken.password} |
The '*.password' suffix ensures that these sensitive variables are masked with asterisks ('*******') in the Bamboo build log.
An alternative representation as a JSON object for automated processing with tools like jq is available too:
Code Block | ||||
---|---|---|---|---|
| ||||
${bamboo.custom.aws.credentials.json.password} |
Environment variables
Aforementioned variables will also be available as environment variables for use in Bamboo Script tasks. The syntax differs between shells, as illustrated in these examples for assigning them to the standardized variables used by tools like the AWS Command Line Interface (AWS CLI):
Code Block | ||||
---|---|---|---|---|
| ||||
export AWS_ACCESS_KEY_ID=$bamboo_custom_aws_accessKeyId export AWS_SECRET_ACCESS_KEY=$bamboo_custom_aws_secretAccessKey_password export AWS_SESSION_TOKEN=$bamboo_custom_aws_sessionToken_password |
Code Block | ||||
---|---|---|---|---|
| ||||
$AWS_ACCESS_KEY_ID = $bamboo_custom_aws_accessKeyId $AWS_SECRET_ACCESS_KEY = $bamboo_custom_aws_secretAccessKey_password $AWS_SESSION_TOKEN = $bamboo_custom_aws_sessionToken_password |
Code Block | ||||
---|---|---|---|---|
| ||||
set AWS_ACCESS_KEY_ID=%bamboo_custom_aws_accessKeyId% set AWS_SECRET_ACCESS_KEY=%bamboo_custom_aws_secretAccessKey_password% set AWS_SESSION_TOKEN=%bamboo_custom_aws_sessionToken_password% |
How-to Articles
Filter by label (Content by label) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Frequently Asked Questions (FAQ)
Questionslist macro | ||||||||
---|---|---|---|---|---|---|---|---|
|