aws / aws/aws-toolkit-azure-devops

AWSCLI - Interact with the AWSCLI - linux build host

Open
#569 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
258
Forks
114
PR merge metrics
No merged PRs in 30d

Description

In the documentation it mentions the following :

AWSCLI - Interact with the AWSCLI (Windows hosts only)

Im using linux build host and it works fine, i just want to know why this line has been included in the documentation:

Reference:
[https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.aws-vsts-tools ](https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.aws-vsts-tools)

[https://aws.amazon.com/blogs/devops/use-the-aws-toolkit-for-azure-devops-to-automate-your-deployments-to-aws/ ](https://aws.amazon.com/blogs/devops/use-the-aws-toolkit-for-azure-devops-to-automate-your-deployments-to-aws/)

I export the Credentials to use in later bash tasks

My task :

- task: AWSShellScript@1
displayName: "Assume AWS Role"
inputs:
awsCredentials: "ado-connection"
regionName: "eu-west-1"
failOnStderr: true
workingDirectory: "$(System.DefaultWorkingDirectory)"
scriptType: 'inline'
inlineScript: |
# Set AWS Credentials and Assume Role
echo "Current Identity"
aws sts get-caller-identity

role_arn="${{ parameters.assume_role }}"
echo "Assuming role $role_arn"

temp_role=$(aws sts assume-role --role-arn $role_arn --role-session-name Azure-Dev-Ops)

AWS_ACCESS_KEY_ID=$(echo $temp_role | jq -r .Credentials.AccessKeyId)
AWS_SECRET_ACCESS_KEY=$(echo $temp_role | jq -r .Credentials.SecretAccessKey)
AWS_SESSION_TOKEN=$(echo $temp_role | jq -r .Credentials.SessionToken)

echo "AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID"

# Set environment variables for future tasks
echo "##vso[task.setvariable variable=AWS_ACCESS_KEY_ID;isSecret=true]$AWS_ACCESS_KEY_ID"
echo "##vso[task.setvariable variable=AWS_SECRET_ACCESS_KEY;isSecret=true]$AWS_SECRET_ACCESS_KEY"
echo "##vso[task.setvariable variable=AWS_SESSION_TOKEN;isSecret=true]$AWS_SESSION_TOKEN"

Contributor guide

Open the contributing guide

Research direction

Start by locating the documentation entry for “AWSCLI - Interact with the AWSCLI (Windows hosts only)” and compare it with the AWSShellScript@1 example and the linked AWS references. Confirm whether the task supports Linux build hosts, then update the wording so the platform limitation is accurate and explain the expected behavior for Linux users.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, shell
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.