AWS CLI is not working

0

Hello Team,

AWS CLi is not working on my on-premises server. It return me tiomout error.

** aws ecr get-login-password --region ap-southeast-1 --debug ** 2022-06-06 08:55:48,440 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.2.12 Python/3.8.8 Linux/4.15.0-180-generic exe/x86_64.ubuntu.18 2022-06-06 08:55:48,441 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['ecr', 'get-login-password', '--region', 'ap-southeast-1', '--debug'] 2022-06-06 08:55:48,456 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_s3 at 0x7f1fda03a700> 2022-06-06 08:55:48,456 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_ddb at 0x7f1fda1f81f0> 2022-06-06 08:55:48,456 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.configure.configure.ConfigureCommand'>> 2022-06-06 08:55:48,456 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x7f1fda21fb80> 2022-06-06 08:55:48,456 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function change_name at 0x7f1fda2279d0> 2022-06-06 08:55:48,456 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function alias_opsworks_cm at 0x7f1fda04c160> 2022-06-06 08:55:48,456 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_history_commands at 0x7f1fda1be040> 2022-06-06 08:55:48,457 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <bound method BasicCommand.add_command of <class 'awscli.customizations.devcommands.CLIDevCommand'>> 2022-06-06 08:55:48,457 - MainThread - botocore.hooks - DEBUG - Event building-command-table.main: calling handler <function add_waiters at 0x7f1fda0423a0> 2022-06-06 08:55:48,457 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.2.12/dist/awscli/data/cli.json 2022-06-06 08:55:48,461 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_types at 0x7f1fda0f4280> 2022-06-06 08:55:48,461 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function no_sign_request at 0x7f1fda0f4dc0> 2022-06-06 08:55:48,461 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_verify_ssl at 0x7f1fda0f4d30> 2022-06-06 08:55:48,461 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_read_timeout at 0x7f1fda0f4ee0> 2022-06-06 08:55:48,461 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <function resolve_cli_connect_timeout at 0x7f1fda0f4e50> 2022-06-06 08:55:48,462 - MainThread - botocore.hooks - DEBUG - Event top-level-args-parsed: calling handler <built-in method update of dict object at 0x7f1fd9f62840> 2022-06-06 08:55:48,462 - MainThread - botocore.session - DEBUG - Setting config variable for region to 'ap-southeast-1' 2022-06-06 08:55:48,464 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.2.12 Python/3.8.8 Linux/4.15.0-180-generic exe/x86_64.ubuntu.18 prompt/off 2022-06-06 08:55:48,464 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['ecr', 'get-login-password', '--region', 'ap-southeast-1', '--debug'] 2022-06-06 08:55:48,465 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_timestamp_parser at 0x7f1fda03ad30> 2022-06-06 08:55:48,465 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x7f1fdaadcca0> 2022-06-06 08:55:48,465 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_binary_formatter at 0x7f1fd9fa8c10> 2022-06-06 08:55:48,465 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function no_pager_handler at 0x7f1fdaada160> 2022-06-06 08:55:48,465 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x7f1fdaa3d940> 2022-06-06 08:55:48,466 - MainThread - botocore.utils - DEBUG - IMDS ENDPOINT: http://169.254.169.254/ 2022-06-06 08:55:48,469 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function attach_history_handler at 0x7f1fda1c0ee0> 2022-06-06 08:55:48,469 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_json_file_cache at 0x7f1fda1f7040> 2022-06-06 08:55:48,483 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.2.12/dist/botocore/data/ecr/2015-09-21/service-2.json 2022-06-06 08:55:48,490 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ecr: calling handler <function _inject_commands at 0x7f1fda1d3670> 2022-06-06 08:55:48,490 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ecr: calling handler <function add_waiters at 0x7f1fda0423a0> 2022-06-06 08:55:48,503 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.2.12/dist/botocore/data/ecr/2015-09-21/waiters-2.json 2022-06-06 08:55:48,505 - MainThread - botocore.hooks - DEBUG - Event building-command-table.ecr_get-login-password: calling handler <function add_waiters at 0x7f1fda0423a0> 2022-06-06 08:55:48,506 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: env 2022-06-06 08:55:48,506 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: assume-role 2022-06-06 08:55:48,506 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: assume-role-with-web-identity 2022-06-06 08:55:48,506 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: sso 2022-06-06 08:55:48,506 - MainThread - botocore.credentials - DEBUG - Looking for credentials via: shared-credentials-file 2022-06-06 08:55:48,507 - MainThread - botocore.credentials - INFO - Found credentials in shared credentials file: ~/.aws/credentials 2022-06-06 08:55:48,508 - MainThread - botocore.loaders - DEBUG - Loading JSON file: /usr/local/aws-cli/v2/2.2.12/dist/botocore/data/endpoints.json 2022-06-06 08:55:48,519 - MainThread - botocore.hooks - DEBUG - Event choose-service-name: calling handler <function handle_service_name_alias at 0x7f1fdc3b1550> 2022-06-06 08:55:48,521 - MainThread - botocore.hooks - DEBUG - Event creating-client-class.ecr: calling handler <function add_generate_presigned_url at 0x7f1fdc3dc790> 2022-06-06 08:55:48,525 - MainThread - botocore.endpoint - DEBUG - Setting api.ecr timeout as (60, 60) 2022-06-06 08:55:48,526 - MainThread - botocore.hooks - DEBUG - Event provide-client-params.ecr.GetAuthorizationToken: calling handler <function base64_decode_input_blobs at 0x7f1fd9faa3a0> 2022-06-06 08:55:48,526 - MainThread - botocore.hooks - DEBUG - Event before-parameter-build.ecr.GetAuthorizationToken: calling handler <function generate_idempotent_uuid at 0x7f1fdc3d25e0> 2022-06-06 08:55:48,527 - MainThread - botocore.hooks - DEBUG - Event before-call.ecr.GetAuthorizationToken: calling handler <function inject_api_version_header_if_needed at 0x7f1fdc358e50> 2022-06-06 08:55:48,527 - MainThread - botocore.endpoint - DEBUG - Making request for OperationModel(name=GetAuthorizationToken) with params: {'url_path': '/', 'query_string': '', 'method': 'POST', 'headers': {'X-Amz-Target': 'AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken', 'Content-Type': 'application/x-amz-json-1.1', 'User-Agent': 'aws-cli/2.2.12 Python/3.8.8 Linux/4.15.0-180-generic exe/x86_64.ubuntu.18 prompt/off command/ecr.get-login-password'}, 'body': b'{}', 'url': 'https://api.ecr.ap-southeast-1.amazonaws.com/', 'context': {'client_region': 'ap-southeast-1', 'client_config': <botocore.config.Config object at 0x7f1fd93e8100>, 'has_streaming_input': False, 'auth_type': None}} 2022-06-06 08:55:48,527 - MainThread - botocore.hooks - DEBUG - Event request-created.ecr.GetAuthorizationToken: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f1fd93e80a0>> 2022-06-06 08:55:48,527 - MainThread - botocore.hooks - DEBUG - Event choose-signer.ecr.GetAuthorizationToken: calling handler <function set_operation_specific_signer at 0x7f1fdc3d24c0> 2022-06-06 08:55:48,528 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth. 2022-06-06 08:55:48,528 - MainThread - botocore.auth - DEBUG - CanonicalRequest: POST /

content-type:application/x-amz-json-1.1 host:api.ecr.ap-southeast-1.amazonaws.com x-amz-date:20220606T085548Z x-amz-target:AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken

content-type;host;x-amz-date;x-amz-target 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a 2022-06-06 08:55:48,528 - MainThread - botocore.auth - DEBUG - StringToSign: AWS4-HMAC-SHA256 20220606T085548Z 20220606/ap-southeast-1/ecr/aws4_request 1f2f49d5f7d087cac11cfef2086b4ed2ecf6e23c6c77f82bae38e1b614565742 2022-06-06 08:55:48,528 - MainThread - botocore.auth - DEBUG - Signature: a1505f59c0deda052fb1f3317ff3874f7a2e066e226c60d2cae67f25fb83b335 2022-06-06 08:55:48,529 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://api.ecr.ap-southeast-1.amazonaws.com/, headers={'X-Amz-Target': b'AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken', 'Content-Type': b'application/x-amz-json-1.1', 'User-Agent': b'aws-cli/2.2.12 Python/3.8.8 Linux/4.15.0-180-generic exe/x86_64.ubuntu.18 prompt/off command/ecr.get-login-password', 'X-Amz-Date': b'20220606T085548Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIA5GDQUDHCSVAVNPXV/20220606/ap-southeast-1/ecr/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=a1505f59c0deda052fb1f3317ff3874f7a2e066e226c60d2cae67f25fb83b335', 'Content-Length': '2'}> 2022-06-06 08:55:48,530 - MainThread - botocore.httpsession - DEBUG - Certificate path: /usr/local/aws-cli/v2/2.2.12/dist/botocore/cacert.pem 2022-06-06 08:55:48,530 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): api.ecr.ap-southeast-1.amazonaws.com:443 2022-06-06 08:56:48,601 - MainThread - botocore.hooks - DEBUG - Event needs-retry.ecr.GetAuthorizationToken: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x7f1fd93e8b50>> 2022-06-06 08:56:48,601 - MainThread - botocore.retries.standard - DEBUG - Retry needed, retrying request after delay of: 0.28902638812913395 2022-06-06 08:56:48,601 - MainThread - botocore.endpoint - DEBUG - Response received to retry, sleeping for 0.28902638812913395 seconds 2022-06-06 08:56:48,891 - MainThread - botocore.hooks - DEBUG - Event request-created.ecr.GetAuthorizationToken: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f1fd93e80a0>> 2022-06-06 08:56:48,891 - MainThread - botocore.hooks - DEBUG - Event choose-signer.ecr.GetAuthorizationToken: calling handler <function set_operation_specific_signer at 0x7f1fdc3d24c0> 2022-06-06 08:56:48,892 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth. 2022-06-06 08:56:48,892 - MainThread - botocore.auth - DEBUG - CanonicalRequest:

content-type:application/x-amz-json-1.1 host:api.ecr.ap-southeast-1.amazonaws.com x-amz-date:20220606T085648Z x-amz-target:AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken

content-type;host;x-amz-date;x-amz-target 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a 2022-06-06 08:56:48,892 - MainThread - botocore.auth - DEBUG - StringToSign: AWS4-HMAC-SHA256 20220606T085648Z 20220606/ap-southeast-1/ecr/aws4_request 0cab3afc3bb3cc3be88edab93ed85a3540cadaa6292cc6f507acc56ca5e2a408 2022-06-06 08:56:48,893 - MainThread - botocore.auth - DEBUG - Signature: 4530c08225e137c535551883cedac92992b95c6e613762df7b43bf588f782339 2022-06-06 08:56:48,893 - MainThread - botocore.endpoint - DEBUG - Sending http request: <AWSPreparedRequest stream_output=False, method=POST, url=https://api.ecr.ap-southeast-1.amazonaws.com/, headers={'X-Amz-Target': b'AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken', 'Content-Type': b'application/x-amz-json-1.1', 'User-Agent': b'aws-cli/2.2.12 Python/3.8.8 Linux/4.15.0-180-generic exe/x86_64.ubuntu.18 prompt/off command/ecr.get-login-password', 'X-Amz-Date': b'20220606T085648Z', 'Authorization': b'AWS4-HMAC-SHA256 Credential=AKIA5GDQUDHCSVAVNPXV/20220606/ap-southeast-1/ecr/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=4530c08225e137c535551883cedac92992b95c6e613762df7b43bf588f782339', 'Content-Length': '2'}> 2022-06-06 08:56:48,893 - MainThread - botocore.httpsession - DEBUG - Certificate path: /usr/local/aws-cli/v2/2.2.12/dist/botocore/cacert.pem 2022-06-06 08:56:48,893 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (2): api.ecr.ap-southeast-1.amazonaws.com:443

2022-06-06 08:57:48,986 - MainThread - botocore.hooks - DEBUG - Event needs-retry.ecr.GetAuthorizationToken: calling handler <bound method RetryHandler.needs_retry of <botocore.retries.standard.RetryHandler object at 0x7f1fd93e8b50>> 2022-06-06 08:57:48,987 - MainThread - botocore.retries.standard - DEBUG - Retry needed, retrying request after delay of: 0.7103189856020138 2022-06-06 08:57:48,987 - MainThread - botocore.endpoint - DEBUG - Response received to retry, sleeping for 0.7103189856020138 seconds 2022-06-06 08:57:49,698 - MainThread - botocore.hooks - DEBUG - Event request-created.ecr.GetAuthorizationToken: calling handler <bound method RequestSigner.handler of <botocore.signers.RequestSigner object at 0x7f1fd93e80a0>> 2022-06-06 08:57:49,698 - MainThread - botocore.hooks - DEBUG - Event choose-signer.ecr.GetAuthorizationToken: calling handler <function set_operation_specific_signer at 0x7f1fdc3d24c0> 2022-06-06 08:57:49,699 - MainThread - botocore.auth - DEBUG - Calculating signature using v4 auth. 2022-06-06 08:57:49,699 - MainThread - botocore.auth - DEBUG - CanonicalRequest: POST /

content-type:application/x-amz-json-1.1 host:api.ecr.ap-southeast-1.amazonaws.com x-amz-date:20220606T085749Z x-amz-target:AmazonEC2ContainerRegistry_V20150921.GetAuthorizationToken

content-type;host;x-amz-date;x-amz-target 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a 2022-06-06 08:57:49,699 - MainThread - botocore.auth - DEBUG - StringToSign: AWS4-HMAC-SHA256 20220606T085749Z 20220606/ap-southeast-1/ecr/aws4_request e2ad3c264cf4bfb6bfcdb527aa0b098785ee5dea45125abe58caef4704116648 2022-06-06 08:57:49,699 - MainThread - botocore.auth - DEBUG - Signature: ee528fda4b39c6419005854133

1 Risposta
0

Most timeout errors are caused by lack of permission.

Please check the permissions for ECR and other services you use.

joker
con risposta 2 anni fa
  • No Access is fine. with the same credentials i'm able to perform on other servers.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande