aws / aws/aws-toolkit-azure-devops

Tasks using shared Service Connection

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

Description

In the process to tidy up our projects in Azure DevOps, we decide to centralize our Service Connections. Using this approach will simplify our strategic to rotate those key. Doing that we create an AWS Service Connection and shared it with all projects. But when we try to use it, we got this error:

`Configuring credentials for task
...configuring AWS credentials from service endpoint 'a0ff852a-a166-4c1d-8998-baaab3dd03fa'
...endpoint defines standard access/secret key credentials
Configuring region for task
...configured to use region eu-west-2, defined in task.
/bin/bash /home/vsts/agent/_work/_temp/awsshellscript_8651.sh
2020-10-16 14:34:51,789 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/1.18.69 Python/3.6.9 Linux/4.15.0-121-generic exec-env/VSTS-AWSShellScript botocore/1.16.19
2020-10-16 14:34:51,790 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['ecr', 'get-login', '--region', 'eu-west-2', '--no-include-email', '--debug']
2020-10-16 14:34:51,790 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler
2020-10-16 14:34:51,790 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler
2020-10-16 14:34:51,790 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler
2020-10-16 14:34:51,794 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler
2020-10-16 14:34:51,794 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python3/dist-packages/botocore/data/ecr/2015-09-21/service-2.json
2020-10-16 14:34:51,797 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ecr: calling handler
2020-10-16 14:34:51,797 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ecr: calling handler
2020-10-16 14:34:51,812 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python3/dist-packages/botocore/data/ecr/2015-09-21/waiters-2.json
2020-10-16 14:34:51,813 - MainThread - botocore.hooks - DEBUG - Event building-command-table.get-login: calling handler
2020-10-16 14:34:51,814 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.get-login.registry-ids: calling handler
2020-10-16 14:34:51,814 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.get-login.include-email: calling handler
2020-10-16 14:34:51,814 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.get-login: calling handler
2020-10-16 14:34:51,814 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: env
2020-10-16 14:34:51,815 - MainThread - botocore.credentials - INFO - Found credentials in environment variables.
2020-10-16 14:34:51,815 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python3/dist-packages/botocore/data/endpoints.json
2020-10-16 14:34:51,825 - MainThread - botocore.hooks - DEBUG - Event choose-service-name: calling handler
2020-10-16 14:34:51,826 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.ecr: calling handler
2020-10-16 14:34:51,831 - MainThread - botocore.endpoint - DEBUG - Setting api.ecr timeout as (60, 60)
2020-10-16 14:34:51,832 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/lib/python3/dist-packages/botocore/data/_retry.json
2020-10-16 14:34:51,833 - MainThread - botocore.client - DEBUG - Registering retry handlers for service: ecr
`

**Expected behaviour**

The shared Service connection works in the same way that the Service Connection in the local project

**Your Environment**

- AWS Toolkit for Azure DevOps version:

Contributor guide

Open the contributing guide

Research direction

Start by reproducing an AWS Service Connection shared across Azure DevOps projects, then compare it with a connection created in the local project. Use the reported AWS Shell Script and ECR login output as the reproduction point; done means the shared connection configures credentials and behaves like the local connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, azure, typescript
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.