aws-toolkit-azure-devops icon indicating copy to clipboard operation
aws-toolkit-azure-devops copied to clipboard

Tasks using shared Service Connection

Open pjlorenzo opened this issue 3 years ago • 0 comments

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 <function add_scalar_parsers at 0x7fdc4027dea0> 2020-10-16 14:34:51,790 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x7fdc40d28158> 2020-10-16 14:34:51,790 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x7fdc40cd3510> 2020-10-16 14:34:51,794 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function attach_history_handler at 0x7fdc403bbf28> 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 <function _inject_commands at 0x7fdc403d1400> 2020-10-16 14:34:51,797 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ecr: calling handler <function add_waiters at 0x7fdc40287488> 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 <function add_waiters at 0x7fdc40287488> 2020-10-16 14:34:51,814 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.get-login.registry-ids: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7fdc401d8f98> 2020-10-16 14:34:51,814 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.get-login.include-email: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7fdc401d8f98> 2020-10-16 14:34:51,814 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.get-login: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7fdc40d1ab38> 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 <function handle_service_name_alias at 0x7fdc417e7e18> 2020-10-16 14:34:51,826 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.ecr: calling handler <function add_generate_presigned_url at 0x7fdc417b80d0> 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:

pjlorenzo avatar Oct 16 '20 15:10 pjlorenzo