Generated AWS Credentials Variables

Variable names are using the default custom.aws namespace, which needs to be adjusted if overridden.

Bamboo variables

This task generates the following Bamboo variables:

${bamboo.custom.aws.accessKeyId} ${bamboo.custom.aws.secretAccessKey.password} ${bamboo.custom.aws.sessionToken.password} ${bamboo.custom.aws.connector.id} ${bamboo.custom.aws.connector.name}

An alternative representation as JSON objects for automated processing with tools like jq is available too:

${bamboo.custom.aws.credentials.json.password} ${bamboo.custom.aws.connector.json}

Environment variables

Aforementioned variables will also be available as environment variables 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):

Bash (Unix shell)
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
PowerShell
$Env:AWS_ACCESS_KEY_ID = $Env:bamboo_custom_aws_accessKeyId $Env:AWS_SECRET_ACCESS_KEY = $Env:bamboo_custom_aws_secretAccessKey_password $Env:AWS_SESSION_TOKEN = $Env:bamboo_custom_aws_sessionToken_password
Windows Command Prompt (cmd)
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%