Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws codeartifact login fails in CircleCI pipeline #6197

Closed
2 tasks done
coherent-andyaaz opened this issue May 29, 2021 · 7 comments · Fixed by #7567
Closed
2 tasks done

aws codeartifact login fails in CircleCI pipeline #6197

coherent-andyaaz opened this issue May 29, 2021 · 7 comments · Fixed by #7567
Labels
bug This issue is a bug. codeartifact login customization Issues related to CLI customizations (located in /awscli/customizations) p3 This is a minor priority issue

Comments

@coherent-andyaaz
Copy link

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
running aws codeartifact login results in "list index out of range" error

SDK version number
2.2.6

Platform/OS/Hardware/Device
Linux/4.15.0-1102-aws exe/x86_64.ubuntu.20

To Reproduce (observed behavior)
run the following as after setting up aws credentials in circieci workflow
aws codeartifact login --tool dotnet --domain **** --domain-owner ******* --repository dotnet --debug

Expected behavior
successfully sign in

Logs/output

2021-05-27 03:03:25,145 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.2.6 Python/3.8.8 Linux/4.15.0-1102-aws exe/x86_64.ubuntu.20
2021-05-27 03:03:25,145 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['codeartifact', 'login', '--tool', 'dotnet', '--domain', '***', '--domain-owner', '******', '--repository', 'dotnet', '--debug']
2021-05-27 03:03:25,156 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_s3 at 0x7f2140d67b80>
2021-05-27 03:03:25,156 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_ddb at 0x7f2140f24940>
2021-05-27 03:03:25,157 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.configure.configure.ConfigureCommand'>>
2021-05-27 03:03:25,157 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x7f2140f4e160>
2021-05-27 03:03:25,157 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x7f2140f53280>
2021-05-27 03:03:25,157 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function alias_opsworks_cm at 0x7f2140d765e0>
2021-05-27 03:03:25,157 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_history_commands at 0x7f2140eed790>
2021-05-27 03:03:25,157 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.devcommands.CLIDevCommand'>>
2021-05-27 03:03:25,157 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_waiters at 0x7f2140dbb820>
2021-05-27 03:03:25,157 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.2.6/dist/awscli/data/cli.json
2021-05-27 03:03:25,159 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_types at 0x7f2140e1f790>
2021-05-27 03:03:25,159 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function no_sign_request at 0x7f2140e22310>
2021-05-27 03:03:25,159 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_verify_ssl at 0x7f2140e22280>
2021-05-27 03:03:25,159 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_read_timeout at 0x7f2140e22430>
2021-05-27 03:03:25,160 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_connect_timeout at 0x7f2140e223a0>
2021-05-27 03:03:25,160 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <built-in method update of dict object at 0x7f2140c8f8c0>
2021-05-27 03:03:25,160 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.2.6 Python/3.8.8 Linux/4.15.0-1102-aws exe/x86_64.ubuntu.20 prompt/off
2021-05-27 03:03:25,160 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['codeartifact', 'login', '--tool', 'dotnet', '--domain', '****', '--domain-owner', '*********', '--repository', 'dotnet', '--debug']
2021-05-27 03:03:25,160 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_timestamp_parser at 0x7f2140d691f0>
2021-05-27 03:03:25,160 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x7f21418074c0>
2021-05-27 03:03:25,160 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_binary_formatter at 0x7f2140cd6040>
2021-05-27 03:03:25,161 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function no_pager_handler at 0x7f21418038b0>
2021-05-27 03:03:25,161 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x7f2141766160>
2021-05-27 03:03:25,161 - MainThread - botocore.utils - DEBUG - IMDS ENDPOINT: http://169.254.169.254/
2021-05-27 03:03:25,163 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function attach_history_handler at 0x7f2140eed670>
2021-05-27 03:03:25,163 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_json_file_cache at 0x7f2140f1f820>
2021-05-27 03:03:25,174 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.2.6/dist/botocore/data/codeartifact/2018-09-22/service-2.json
2021-05-27 03:03:25,179 - MainThread - botocore.hooks - DEBUG - Event building-command-table.codeartifact: calling handler <function inject_commands at 0x7f2140f9db80>
2021-05-27 03:03:25,179 - MainThread - botocore.hooks - DEBUG - Event building-command-table.codeartifact: calling handler <function add_waiters at 0x7f2140dbb820>
2021-05-27 03:03:25,191 - MainThread - botocore.hooks - DEBUG - Event building-command-table.codeartifact_login: calling handler <function add_waiters at 0x7f2140dbb820>
2021-05-27 03:03:25,192 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.login.tool: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f214044c1f0>
2021-05-27 03:03:25,192 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.login: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f21417ada30>
2021-05-27 03:03:25,192 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.login.domain: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f214044c1f0>
2021-05-27 03:03:25,192 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.login: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f21417ada30>
2021-05-27 03:03:25,192 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.login.domain-owner: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f214044c1f0>
2021-05-27 03:03:25,192 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.login: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f21417ada30>
2021-05-27 03:03:25,192 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.login.namespace: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f214044c1f0>
2021-05-27 03:03:25,192 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.login.duration-seconds: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f214044c1f0>
2021-05-27 03:03:25,192 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.login.repository: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f214044c1f0>
2021-05-27 03:03:25,193 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.login: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f21417ada30>
2021-05-27 03:03:25,193 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.login.dry-run: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f214044c1f0>
2021-05-27 03:03:25,193 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.login: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f21417ada30>
2021-05-27 03:03:25,193 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: env
2021-05-27 03:03:25,193 - MainThread - botocore.credentials - INFO - Found credentials in environment variables.
2021-05-27 03:03:25,193 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.2.6/dist/botocore/data/endpoints.json
2021-05-27 03:03:25,200 - MainThread - botocore.hooks - DEBUG - Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f21430eb0d0>
2021-05-27 03:03:25,201 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.codeartifact: calling handler <function add_generate_presigned_url at 0x7f21431093a0>
2021-05-27 03:03:25,203 - MainThread - botocore.endpoint - DEBUG - Setting codeartifact timeout as (60, 60)
2021-05-27 03:03:25,204 - MainThread - botocore.hooks - DEBUG - Event provide-client-params.codeartifact.GetAuthorizationToken: calling handler <function base64_decode_input_blobs at 0x7f2140cd6790>
2021-05-27 03:03:25,204 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.codeartifact.GetAuthorizationToken: calling handler <function generate_idempotent_uuid at 0x7f2143102160>
2021-05-27 03:03:25,204 - MainThread - botocore.hooks - DEBUG - Event before-call.codeartifact.GetAuthorizationToken: calling handler <function inject_api_version_header_if_needed at 0x7f21430859d0>
2021-05-27 03:03:25,204 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=GetAuthorizationToken) with params: {'url_path': '/v1/authorization-token', 'query_string': {'domain': '****', 'domain-owner': '*********'}, 'method': 'POST', 'headers': {'User-Agent': 'aws-cli/2.2.6 Python/3.8.8 Linux/4.15.0-1102-aws exe/x86_64.ubuntu.20 prompt/off command/codeartifact.login'}, 'body': b'', 'url': 'https://codeartifact.**************.amazonaws.com/v1/authorization-token?domain=test&domain-owner=*', 'context': {'client_region': '**************', 'client_config': <botocore.config.Config object at 0x7f2140139490>, 'has_streaming_input': False, 'auth_type': None}}
2021-05-27 03:03:25,205 - MainThread - botocore.hooks - DEBUG - Event request-created.codeartifact.GetAuthorizationToken: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f2140139550>>
2021-05-27 03:03:25,205 - MainThread - botocore.hooks - DEBUG - Event choose-signer.codeartifact.GetAuthorizationToken: calling handler <function set_operation_specific_signer at 0x7f2143102040>
2021-05-27 03:03:25,205 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2021-05-27 03:03:25,205 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
POST
/v1/authorization-token
domain=test&domain-owner=****
host:codeartifact.**************.amazonaws.com
x-amz-date:20210527T030325Z

host;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2021-05-27 03:03:25,205 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20210527T030325Z
20210527/**************/codeartifact/aws4_request
d3b4d29845e306fe92afe4ccf77c67ef4dec958fc1f2f3e351d4084970e3a52e
2021-05-27 03:03:25,205 - MainThread - botocore.auth - DEBUG - Signature:
f3610804d0018be5a306ddbe228eb37667a9f2749c246ad6e294b7da3f544302
2021-05-27 03:03:25,205 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://codeartifact.**************.amazonaws.com/v1/authorization-token?domain=test&domain-owner=*******, headers={'User-Agent': b'aws-cli/2.2.6 Python/3.8.8 Linux/4.15.0-1102-aws exe/x86_64.ubuntu.20 prompt/off command/codeartifact.login', 'X-Amz-Date': b'20210527T030325Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=********************/20210527/**************/codeartifact/aws4_request, SignedHeaders=host;x-amz-date, Signature=f3610804d0018be5a306ddbe228eb37667a9f2749c246ad6e294b7da3f544302', 'Content-Length': '0'}>
2021-05-27 03:03:25,206 - MainThread - botocore.httpsession - DEBUG - Certificate path: /usr/local/aws-cli/v2/2.2.6/dist/botocore/cacert.pem
2021-05-27 03:03:25,206 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): codeartifact.**************.amazonaws.com:443
2021-05-27 03:03:26,145 - MainThread - urllib3.connectionpool - DEBUG - https://codeartifact.**************.amazonaws.com:443 "POST /v1/authorization-token?domain=test&domain-owner=**** HTTP/1.1" 200 1262
2021-05-27 03:03:26,146 - MainThread - botocore.parsers - DEBUG - Response headers: {'Date': 'Thu, 27 May 2021 03:03:26 GMT', 'Content-Type': 'application/json', 'Content-Length': '1262', 'Connection': 'keep-alive', 'x-amzn-RequestId': '5f114a70-6c65-4d0b-875d-94fa4b906fe4'}
2021-05-27 03:03:26,146 - MainThread - botocore.parsers - DEBUG - Response body:
b'{"authorizationToken":"eyJ2ZXIiOjEsImlzdSI6MTYyMjA4NDYwNiwiZW5jIjoiQTEyOEdDTSIsInRhZyI6ImhneUM0U3RWcndjazVVM2pEakNPd3ciLCJleHAiOjE2MjIxMjc4MDYsImFsZyI6IkExMjhHQ01LVyIsIml2Ijoic21aOGdDMk1aYkVQS29tMiJ9.416-9zq1ZSN_1b62GB9FMw.C-rB8hPiSKSKy38w.dWerZX-Nxd7uZUTA3CTVGz0BbMqhwXX-paE1F0cG_ypYn5h9OHFGBoR7yFBVvWMBzqL2t2rQwyEMgGi4ajsuiYP6JYnrKEDrzegM4QRelKZWlkLgEoLXnyzj_R9GngJf2R708DpywHEeDwWX_PpQDjRqQciEjrRsjngfcqJGtD62PNC6oI5CW2pnRAvjLj7k2p0SMZpZB0YLvPTyMyOG_aWHCGRUOjEOPk2TV7HOB1-drop1yilTiXIhobH1VQ5Fmeh9H0ilz4wb8TVbYKs0yx7TH0UE2uCzNCMEZY9KRqfXDroVkW-eYd8KzSewupdL1mRkqxFpl8qUMBuMiYfxzV6ovGsYbbq751_FHeI0tzIgR2SEaQ_8lX_POBYvY01Aer1lS9ENci8bc6YpWYggrSoX8ZdNXiht8LEc7ZhN3yoz2gYiXl7S98qZU1WBjkz7VtlHcBZWVlENXLOGOmZXqiQ28VoBAifDiwrXIcsD9zVoxXLoDgLe856bjKw4cqYXrfFfxlcYGP2h-hffbStmADAz3B65CjfeVy3RJAWQZH0TsXy4FrG7DlILMo4fmW1CbaS0Zc3_ebnXANQE8OU8NpnaANS1VLmfZm4E6UmmJ0rHt6J2ePjA_5-Slx29RmsBke1YuT25camS9ROLs4zSFhAqSKB0vzmvx-yAKYM8eYzYH0_yJg6tmIWP1ImnZaMjtDykUlCDfPPKd5EdYULNH7sMbChzZNCWsDuPjumgbDYeIwWgLK2nX5y0HLG--lolEHS_YWvb_qXpvk_WXyGEGq9x9Ym5VqHP7hkZVrQYOWG3VUMNu02aalpj2kt4S5-m0MT6ttHjE0TCluidnYt2v-cDisngW0Oxo0YJDZQ26_SgaQ8OYAN54WbcYKmVAwe4GT8kEaGEkEuIxpJM5fa8IvjmC2PWGQVpPXlADOCJ9Quhb1i5S6W12hJOhj5rlhSyvam2nYRhvQ.tGaSJNV7GjD7U9WWI7wghw","expiration":1.622127806E9}'
2021-05-27 03:03:26,148 - MainThread - botocore.hooks - DEBUG - Event needs-retry.codeartifact.GetAuthorizationToken: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x7f2140139fa0>>
2021-05-27 03:03:26,148 - MainThread - botocore.retries.standard - DEBUG - Not retrying request.
2021-05-27 03:03:26,148 - MainThread - botocore.hooks - DEBUG - Event after-call.codeartifact.GetAuthorizationToken: calling handler <bound method RetryQuotaChecker.release_retry_quota of <botocore.retries.standard.RetryQuotaChecker object at 0x7f2140139b20>>
2021-05-27 03:03:26,148 - MainThread - botocore.hooks - DEBUG - Event provide-client-params.codeartifact.GetRepositoryEndpoint: calling handler <function base64_decode_input_blobs at 0x7f2140cd6790>
2021-05-27 03:03:26,148 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.codeartifact.GetRepositoryEndpoint: calling handler <function generate_idempotent_uuid at 0x7f2143102160>
2021-05-27 03:03:26,148 - MainThread - botocore.hooks - DEBUG - Event before-call.codeartifact.GetRepositoryEndpoint: calling handler <function inject_api_version_header_if_needed at 0x7f21430859d0>
2021-05-27 03:03:26,149 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=GetRepositoryEndpoint) with params: {'url_path': '/v1/repository/endpoint', 'query_string': {'domain': '****', 'repository': 'dotnet', 'format': 'nuget', 'domain-owner': '******'}, 'method': 'GET', 'headers': {'User-Agent': 'aws-cli/2.2.6 Python/3.8.8 Linux/4.15.0-1102-aws exe/x86_64.ubuntu.20 prompt/off command/codeartifact.login'}, 'body': b'', 'url': 'https://codeartifact.**************.amazonaws.com/v1/repository/endpoint?domain=*&repository=dotnet&format=nuget&domain-owner=********', 'context': {'client_region': '**************', 'client_config': <botocore.config.Config object at 0x7f2140139490>, 'has_streaming_input': False, 'auth_type': None}}
2021-05-27 03:03:26,149 - MainThread - botocore.hooks - DEBUG - Event request-created.codeartifact.GetRepositoryEndpoint: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f2140139550>>
2021-05-27 03:03:26,149 - MainThread - botocore.hooks - DEBUG - Event choose-signer.codeartifact.GetRepositoryEndpoint: calling handler <function set_operation_specific_signer at 0x7f2143102040>
2021-05-27 03:03:26,149 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth.
2021-05-27 03:03:26,149 - MainThread - botocore.auth - DEBUG - CanonicalRequest:
GET
/v1/repository/endpoint
domain=*****&domain-owner=***********&format=nuget&repository=dotnet
host:codeartifact.**************.amazonaws.com
x-amz-date:20210527T030326Z

host;x-amz-date
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2021-05-27 03:03:26,149 - MainThread - botocore.auth - DEBUG - StringToSign:
AWS4-HMAC-SHA256
20210527T030326Z
20210527/**************/codeartifact/aws4_request
6391eccb49eeb4c009deb1dec05f319d84dd9517ceaafeabc14e9b17df887ad1
2021-05-27 03:03:26,149 - MainThread - botocore.auth - DEBUG - Signature:
01f49e15d304156eaba18ca2fe13d06f8865796a30470c573c2335bd02a648f9
2021-05-27 03:03:26,149 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=GET, url=https://codeartifact.**************.amazonaws.com/v1/repository/endpoint?domain=****&repository=dotnet&format=nuget&domain-owner=**********, headers={'User-Agent': b'aws-cli/2.2.6 Python/3.8.8 Linux/4.15.0-1102-aws exe/x86_64.ubuntu.20 prompt/off command/codeartifact.login', 'X-Amz-Date': b'20210527T030326Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=********************/20210527/**************/codeartifact/aws4_request, SignedHeaders=host;x-amz-date, Signature=01f49e15d304156eaba18ca2fe13d06f8865796a30470c573c2335bd02a648f9'}>
2021-05-27 03:03:26,150 - MainThread - botocore.httpsession - DEBUG - Certificate path: /usr/local/aws-cli/v2/2.2.6/dist/botocore/cacert.pem
2021-05-27 03:03:26,431 - MainThread - urllib3.connectionpool - DEBUG - https://codeartifact.**************.amazonaws.com:443 "GET /v1/repository/endpoint?domain=****&repository=dotnet&format=nuget&domain-owner=********* HTTP/1.1" 200 108
2021-05-27 03:03:26,432 - MainThread - botocore.parsers - DEBUG - Response headers: {'Date': 'Thu, 27 May 2021 03:03:26 GMT', 'Content-Type': 'application/json', 'Content-Length': '108', 'Connection': 'keep-alive', 'x-amzn-RequestId': '1638397d-b2ee-401a-aba6-8c169c9be5ac'}
2021-05-27 03:03:26,432 - MainThread - botocore.parsers - DEBUG - Response body:
b'{"repositoryEndpoint":"https://******.d.codeartifact.**************.amazonaws.com/nuget/dotnet/"}'
2021-05-27 03:03:26,432 - MainThread - botocore.hooks - DEBUG - Event needs-retry.codeartifact.GetRepositoryEndpoint: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x7f2140139fa0>>
2021-05-27 03:03:26,432 - MainThread - botocore.retries.standard - DEBUG - Not retrying request.
2021-05-27 03:03:26,432 - MainThread - botocore.hooks - DEBUG - Event after-call.codeartifact.GetRepositoryEndpoint: calling handler <bound method RetryQuotaChecker.release_retry_quota of <botocore.retries.standard.RetryQuotaChecker object at 0x7f2140139b20>>
2021-05-27 03:03:26,965 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()
Traceback (most recent call last):
  File "awscli/clidriver.py", line 459, in main
  File "awscli/clidriver.py", line 594, in __call__
  File "awscli/customizations/commands.py", line 191, in __call__
  File "awscli/customizations/codeartifact/login.py", line 663, in _run_main
  File "awscli/customizations/codeartifact/login.py", line 122, in login
  File "awscli/customizations/codeartifact/login.py", line 200, in _get_source_to_url_dict
  File "awscli/customizations/codeartifact/login.py", line 213, in _parse_source_name
IndexError: list index out of range

list index out of range

Exited with code exit status 255

Additional context
Add any other context about the problem here.

@coherent-andyaaz coherent-andyaaz added the needs-triage This issue or PR still needs to be triaged. label May 29, 2021
@stobrien89 stobrien89 self-assigned this Jun 1, 2021
@stobrien89 stobrien89 added investigating This issue is being investigated and/or work is in progress to resolve the issue. codeartifact login and removed needs-triage This issue or PR still needs to be triaged. labels Jun 1, 2021
@stobrien89
Copy link
Member

Hi @coherent-andyaaz,

Sorry to hear about the issues. Taking a further look!

@stobrien89
Copy link
Member

stobrien89 commented Jun 2, 2021

Hi again @coherent-andyaaz,

I was looking at the customization for this command (specifically parse_source_name) and it looks like the line argument is in a different format than expected. The codeartifact team wrote this customization, so I'll have to reach out to them for a fix— I'm not aware of any CLI workarounds you can use for the time being, but I'll get this submitted to the team right away!

@stobrien89
Copy link
Member

P48141609

@stobrien89 stobrien89 added bug This issue is a bug. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Jun 2, 2021
@stobrien89
Copy link
Member

Hi @coherent-andyaaz,

I heard back from the efs team and wanted to provide an update: They suspect that your sources may not have an enabled or disabled tag. Adding sources through the dotnet commands, or through our login command, should have added those tags, but you can list them by running the following:

dotnet nuget list source --format detailed

and remove (or enable) any source that doesn't have [Enabled] or [Disabled] tag with

dotnet nuget remove source <SOURCE_NAME>

or

dotnet nuget enable source <SOURCE_NAME>

Feel free to let us know if that happens to resolve this for you!

@stobrien89 stobrien89 added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 3, 2021
@coherent-andyaaz
Copy link
Author

Hey @stobrien89, thanks for your advise. I think I figured out what went wrong. The first time you run a dotnet command, it gives you a welcome message and aws cli probably isn't expecting it. That might be why every time I sshed into the CircleCI instance and tried to run aws codeartifact login again it succeeded. I added a dotnet nuget list source --format detailed(could be any random dotnet command probably) before aws codeartifact login command the error went away.
image

@kdaily kdaily added the customization Issues related to CLI customizations (located in /awscli/customizations) label Jun 4, 2021
@stobrien89 stobrien89 removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 4, 2021
@stobrien89
Copy link
Member

Hi @coherent-andyaaz,

Glad you were able to figure it out! I know the codeartifact team will want to improve the error handling here, so I'll leave this open for tracking purposes. I'll let you know as soon as I receive an update.

@github-actions
Copy link

github-actions bot commented Jan 9, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

mergify bot pushed a commit to aws/aws-cdk that referenced this issue Jan 16, 2023
…k/lambda-layer-awscli (#23700)

Bumps [awscli](https://github.com/aws/aws-cli) from 1.27.45 to 1.27.50.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/aws/aws-cli/blob/develop/CHANGELOG.rst">awscli's changelog</a>.</em></p>
<blockquote>
<h1>1.27.50</h1>
<ul>
<li>api-change:<code>connect</code>: This release updates the responses of UpdateContactFlowContent, UpdateContactFlowMetadata, UpdateContactFlowName and DeleteContactFlow API with empty responses.</li>
<li>api-change:<code>ec2</code>: Documentation updates for EC2.</li>
<li>api-change:<code>outposts</code>: This release adds POWER_30_KVA as an option for PowerDrawKva. PowerDrawKva is part of the RackPhysicalProperties structure in the CreateSite request.</li>
<li>api-change:<code>resource-groups</code>: AWS Resource Groups customers can now turn on Group Lifecycle Events in their AWS account. When you turn this on, Resource Groups monitors your groups for changes to group state or membership. Those changes are sent to Amazon EventBridge as events that you can respond to using rules you create.</li>
</ul>
<h1>1.27.49</h1>
<ul>
<li>api-change:<code>cleanrooms</code>: Initial release of AWS Clean Rooms</li>
<li>api-change:<code>lambda</code>: Add support for MaximumConcurrency parameter for SQS event source. Customers can now limit the maximum concurrent invocations for their SQS Event Source Mapping.</li>
<li>api-change:<code>logs</code>: Bug fix: logGroupName is now not a required field in GetLogEvents, FilterLogEvents, GetLogGroupFields, and DescribeLogStreams APIs as logGroupIdentifier can be provided instead</li>
<li>api-change:<code>mediaconvert</code>: The AWS Elemental MediaConvert SDK has added support for compact DASH manifest generation, audio normalization using TruePeak measurements, and the ability to clip the sample range in the color corrector.</li>
<li>api-change:<code>secretsmanager</code>: Update documentation for new ListSecrets and DescribeSecret parameters</li>
</ul>
<h1>1.27.48</h1>
<ul>
<li>api-change:<code>kendra</code>: This release adds support to new document types - RTF, XML, XSLT, MS_EXCEL, CSV, JSON, MD</li>
</ul>
<h1>1.27.47</h1>
<ul>
<li>api-change:<code>location</code>: This release adds support for two new route travel models, Bicycle and Motorcycle which can be used with Grab data source.</li>
<li>api-change:<code>rds</code>: This release adds support for configuring allocated storage on the CreateDBInstanceReadReplica, RestoreDBInstanceFromDBSnapshot, and RestoreDBInstanceToPointInTime APIs.</li>
</ul>
<h1>1.27.46</h1>
<ul>
<li>bugfix:<code>codeartifact login</code>: Fix parsing of dotnet output for aws codeartifact login command; fixes <code>[#6197](aws/aws-cli#6197) &lt;https://github.com/aws/aws-cli/issues/6197&gt;</code>__</li>
<li>api-change:<code>ecr-public</code>: This release for Amazon ECR Public makes several change to bring the SDK into sync with the API.</li>
<li>api-change:<code>kendra-ranking</code>: Introducing Amazon Kendra Intelligent Ranking, a new set of Kendra APIs that leverages Kendra semantic ranking capabilities to improve the quality of search results from other search services (i.e. OpenSearch, ElasticSearch, Solr).</li>
<li>api-change:<code>network-firewall</code>: Network Firewall now supports the Suricata rule action reject, in addition to the actions pass, drop, and alert.</li>
<li>api-change:<code>ram</code>: Enabled FIPS aws-us-gov endpoints in SDK.</li>
<li>api-change:<code>workspaces-web</code>: This release adds support for a new portal authentication type: AWS IAM Identity Center (successor to AWS Single Sign-On).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/aws/aws-cli/commit/8f288486271a6c312a8cb9e6c68551ddc400a1b6"><code>8f28848</code></a> Merge branch 'release-1.27.50'</li>
<li><a href="https://github.com/aws/aws-cli/commit/31258e8caf29ca7f1c1b3a86ef1457dfc58ee4cb"><code>31258e8</code></a> Bumping version to 1.27.50</li>
<li><a href="https://github.com/aws/aws-cli/commit/04240aafd0419c600a921c2196f36923871bc37c"><code>04240aa</code></a> Update changelog based on model updates</li>
<li><a href="https://github.com/aws/aws-cli/commit/f4f065c93b834684ceb3bccef646a51ea7c128cf"><code>f4f065c</code></a> Merge branch 'release-1.27.49'</li>
<li><a href="https://github.com/aws/aws-cli/commit/16f4c995189f4ff38133b098daded5a5cd827fa9"><code>16f4c99</code></a> Merge branch 'release-1.27.49' into develop</li>
<li><a href="https://github.com/aws/aws-cli/commit/d7afe3baf68b2019dab83bce3b2613dd750f8e67"><code>d7afe3b</code></a> Bumping version to 1.27.49</li>
<li><a href="https://github.com/aws/aws-cli/commit/fc389d4ec77b26d67e83d9d0bcc3ac7246a4bab9"><code>fc389d4</code></a> Update changelog based on model updates</li>
<li><a href="https://github.com/aws/aws-cli/commit/bf5c31b4c46ce2e656f16775c4f53507293ee6d2"><code>bf5c31b</code></a> Merge branch 'release-1.27.48'</li>
<li><a href="https://github.com/aws/aws-cli/commit/8474cafd9358e44ea29699e57ce2a4299a4a1348"><code>8474caf</code></a> Merge branch 'release-1.27.48' into develop</li>
<li><a href="https://github.com/aws/aws-cli/commit/44b32370f6aae87fa5acefedc2359f64b2cef4a0"><code>44b3237</code></a> Bumping version to 1.27.48</li>
<li>Additional commits viewable in <a href="https://github.com/aws/aws-cli/compare/1.27.45...1.27.50">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=awscli&package-manager=pip&previous-version=1.27.45&new-version=1.27.50)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
netbsd-srcmastr referenced this issue in NetBSD/pkgsrc Jan 18, 2023
1.27.51
=======

* api-change:``billingconductor``: This release adds support for SKU
  Scope for pricing plans.
* api-change:``cloud9``: Added minimum value to AutomaticStopTimeMinutes
  parameter.
* api-change:``imagebuilder``: Add support for AWS Marketplace product
  IDs as input during CreateImageRecipe for the parent-image parameter.
  Add support for listing third-party components.
* api-change:``network-firewall``: Network Firewall now allows creation
  of dual stack endpoints, enabling inspection of IPv6 traffic.


1.27.50
=======

* api-change:``connect``: This release updates the responses of
  UpdateContactFlowContent, UpdateContactFlowMetadata,
  UpdateContactFlowName and DeleteContactFlow API with empty responses.
* api-change:``ec2``: Documentation updates for EC2.
* api-change:``outposts``: This release adds POWER_30_KVA as an option
  for PowerDrawKva. PowerDrawKva is part of the RackPhysicalProperties
  structure in the CreateSite request.
* api-change:``resource-groups``: AWS Resource Groups customers can now
  turn on Group Lifecycle Events in their AWS account. When you turn
  this on, Resource Groups monitors your groups for changes to group
  state or membership. Those changes are sent to Amazon EventBridge as
  events that you can respond to using rules you create.


1.27.49
=======

* api-change:``cleanrooms``: Initial release of AWS Clean Rooms
* api-change:``lambda``: Add support for MaximumConcurrency parameter
  for SQS event source. Customers can now limit the maximum concurrent
  invocations for their SQS Event Source Mapping.
* api-change:``logs``: Bug fix: logGroupName is now not a required field
  in GetLogEvents, FilterLogEvents, GetLogGroupFields, and
  DescribeLogStreams APIs as logGroupIdentifier can be provided instead
* api-change:``mediaconvert``: The AWS Elemental MediaConvert SDK has
  added support for compact DASH manifest generation, audio
  normalization using TruePeak measurements, and the ability to clip the
  sample range in the color corrector.
* api-change:``secretsmanager``: Update documentation for new
  ListSecrets and DescribeSecret parameters


1.27.48
=======

* api-change:``kendra``: This release adds support to new document types
  - RTF, XML, XSLT, MS_EXCEL, CSV, JSON, MD


1.27.47
=======

* api-change:``location``: This release adds support for two new route
  travel models, Bicycle and Motorcycle which can be used with Grab
  data source.
* api-change:``rds``: This release adds support for configuring
  allocated storage on the CreateDBInstanceReadReplica,
  RestoreDBInstanceFromDBSnapshot, and
  RestoreDBInstanceToPointInTime APIs.


1.27.46
=======

* bugfix:``codeartifact login``: Fix parsing of dotnet output for aws
  codeartifact login command; fixes `#6197
  <https://github.com/aws/aws-cli/issues/6197>`__
* api-change:``ecr-public``: This release for Amazon ECR Public makes
  several change to bring the SDK into sync with the API.
* api-change:``kendra-ranking``: Introducing Amazon Kendra Intelligent
  Ranking, a new set of Kendra APIs that leverages Kendra semantic
  ranking capabilities to improve the quality of search results from
  other search services (i.e. OpenSearch, ElasticSearch, Solr).
* api-change:``network-firewall``: Network Firewall now supports the
  Suricata rule action reject, in addition to the actions pass, drop,
  and alert.
* api-change:``ram``: Enabled FIPS aws-us-gov endpoints in SDK.
* api-change:``workspaces-web``: This release adds support for a new
  portal authentication type: AWS IAM Identity Center (successor to AWS
  Single Sign-On).


1.27.45
=======

* api-change:``acm-pca``: Added revocation parameter validation: bucket
  names must match S3 bucket naming rules and CNAMEs conform to RFC2396
  restrictions on the use of special characters in URIs.
* api-change:``auditmanager``: This release introduces a new data
  retention option in your Audit Manager settings. You can now use the
  DeregistrationPolicy parameter to specify if you want to delete your
  data when you deregister Audit Manager.


1.27.44
=======

* api-change:``amplifybackend``: Updated GetBackendAPIModels response to
  include ModelIntrospectionSchema json string
* api-change:``apprunner``: This release adds support of securely
  referencing secrets and configuration data that are stored in Secrets
  Manager and SSM Parameter Store by adding them as environment secrets
  in your App Runner service.
* api-change:``connect``: Documentation update for a new Initiation
  Method value in DescribeContact API
* api-change:``emr-serverless``: Adds support for customized images. You
  can now provide runtime images when creating or updating EMR
  Serverless Applications.
* api-change:``lightsail``: Documentation updates for Amazon Lightsail.
* api-change:``mwaa``: MWAA supports Apache Airflow version 2.4.3.
* api-change:``rds``: This release adds support for specifying which
  certificate authority (CA) to use for a DB instance's server
  certificate during DB instance creation, as well as other CA
  enhancements.


1.27.43
=======

* api-change:``application-autoscaling``: Customers can now use the
  existing DescribeScalingActivities API to also see the detailed and
  machine-readable reasons for Application Auto Scaling not scaling
  their resources and, if needed, take the necessary corrective actions.
* api-change:``logs``: Update to remove sequenceToken as a required
  field in PutLogEvents calls.
* api-change:``ssm``: Adding support for QuickSetup Document Type in
  Systems Manager


1.27.42
=======

* api-change:``securitylake``: Allow CreateSubscriber API to take string
  input that allows setting more descriptive SubscriberDescription
  field. Make souceTypes field required in model level for
  UpdateSubscriberRequest as it is required for every API call on the
  backend. Allow ListSubscribers take any String as nextToken param.


1.27.41
=======

* api-change:``cloudfront``: Extend response headers policy to support
  removing headers from viewer responses
* api-change:``iotfleetwise``: Update documentation - correct the epoch
  constant value of default value for expiryTime field in
  CreateCampaign request.


1.27.40
=======

* api-change:``apigateway``: Documentation updates for Amazon API
  Gateway
* api-change:``emr``: Update emr command to latest version
* api-change:``secretsmanager``: Added owning service filter, include
  planned deletion flag, and next rotation date response parameter in
  ListSecrets.
* api-change:``wisdom``: This release extends Wisdom CreateContent and
  StartContentUpload APIs to support PDF and MicrosoftWord docx document
  uploading.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. codeartifact login customization Issues related to CLI customizations (located in /awscli/customizations) p3 This is a minor priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants