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

Executable breaks GitHub action - python version works #5262

Closed
2 tasks done
simonwep opened this issue Jun 4, 2020 · 14 comments
Closed
2 tasks done

Executable breaks GitHub action - python version works #5262

simonwep opened this issue Jun 4, 2020 · 14 comments
Labels
confusing-error guidance Question that needs advice or information.

Comments

@simonwep
Copy link

simonwep commented Jun 4, 2020

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

Describe the bug
It's related to actions/runner#503 - the problem is that the most recent executable (Taken from here) always causes builds to fail with

<botocore.awsrequest.AWSRequest object at 0x7f37ea551278>
##[error]Process completed with exit code 255.

Example builds (notice that the workflow config hasn't changed)
✅ Working: https://github.com/Simonwep/conway/runs/683296327?check_suite_focus=true
❎ Broken: https://github.com/Simonwep/conway/runs/703702976?check_suite_focus=true
✅ Fixed by using the python version: https://github.com/Simonwep/conway/runs/739054745?check_suite_focus=true

✅ Working: https://github.com/Simonwep/intl-demo/runs/531009403?check_suite_focus=true
❎ Broken: https://github.com/Simonwep/intl-demo/runs/703653450?check_suite_focus=true

It works if the python version is installed using

sudo apt-get install python3-setuptools
python3 -m pip install --user awscli

SDK version number

Platform/OS/Hardware/Device
To Reproduce (observed behavior)
See actions/runner#503

Expected behavior
The executable should work I guess.

Logs/output
Taken from this build:

Show Log
You can now run: /usr/local/bin/aws --version
2020-06-04 15:21:52,197 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.0.18 Python/3.7.3 Linux/5.3.0-1022-azure botocore/2.0.0dev22
2020-06-04 15:21:52,198 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['s3', 'sync', './conway/dist', 's3://conway.reinisch.io', '--debug']
2020-06-04 15:21:52,198 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler 
2020-06-04 15:21:52,198 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler 
2020-06-04 15:21:52,198 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler 
2020-06-04 15:21:52,198 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler 
2020-06-04 15:21:52,201 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler 
2020-06-04 15:21:52,201 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler 
2020-06-04 15:21:52,201 - MainThread - botocore.hooks - DEBUG - Event building-command-table.s3: calling handler 
2020-06-04 15:21:52,202 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.s3.anonymous: calling handler 
2020-06-04 15:21:52,202 - MainThread - botocore.hooks - DEBUG - Event building-command-table.sync: calling handler 
2020-06-04 15:21:52,202 - MainThread - botocore.hooks - DEBUG - Event building-command-table.sync: calling handler 
2020-06-04 15:21:52,202 - MainThread - botocore.hooks - DEBUG - Event building-arg-table.sync: calling handler >
2020-06-04 15:21:52,203 - MainThread - botocore.hooks - DEBUG - Event building-arg-table.sync: calling handler >
2020-06-04 15:21:52,203 - MainThread - botocore.hooks - DEBUG - Event building-arg-table.sync: calling handler >
2020-06-04 15:21:52,211 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.paths: calling handler 
2020-06-04 15:21:52,211 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.dryrun: calling handler 
2020-06-04 15:21:52,211 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler 
2020-06-04 15:21:52,211 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.quiet: calling handler 
2020-06-04 15:21:52,211 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler 
2020-06-04 15:21:52,211 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.anonymous: calling handler 
2020-06-04 15:21:52,211 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.acl: calling handler 
2020-06-04 15:21:52,212 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.follow-symlinks: calling handler 
2020-06-04 15:21:52,212 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler 
2020-06-04 15:21:52,212 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.anonymous: calling handler 
2020-06-04 15:21:52,212 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse: calling handler 
2020-06-04 15:21:52,212 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-c: calling handler 
2020-06-04 15:21:52,212 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-c-key: calling handler 
2020-06-04 15:21:52,212 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-kms-key-id: calling handler 
2020-06-04 15:21:52,212 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-c-copy-source: calling handler 
2020-06-04 15:21:52,212 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-c-copy-source-key: calling handler 
2020-06-04 15:21:52,212 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.storage-class: calling handler 
2020-06-04 15:21:52,212 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.grants: calling handler 
2020-06-04 15:21:52,212 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.website-redirect: calling handler 
2020-06-04 15:21:52,212 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-type: calling handler 
2020-06-04 15:21:52,213 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.cache-control: calling handler 
2020-06-04 15:21:52,213 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-disposition: calling handler 
2020-06-04 15:21:52,213 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-encoding: calling handler 
2020-06-04 15:21:52,213 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-language: calling handler 
2020-06-04 15:21:52,213 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.expires: calling handler 
2020-06-04 15:21:52,213 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.source-region: calling handler 
2020-06-04 15:21:52,213 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.only-show-errors: calling handler 
2020-06-04 15:21:52,213 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler 
2020-06-04 15:21:52,213 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.anonymous: calling handler 
2020-06-04 15:21:52,213 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.page-size: calling handler 
2020-06-04 15:21:52,213 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.ignore-glacier-warnings: calling handler 
2020-06-04 15:21:52,213 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler 
2020-06-04 15:21:52,213 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.force-glacier-transfer: calling handler 
2020-06-04 15:21:52,214 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler 
2020-06-04 15:21:52,214 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.request-payer: calling handler 
2020-06-04 15:21:52,214 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.metadata: calling handler 
2020-06-04 15:21:52,214 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.copy-props: calling handler 
2020-06-04 15:21:52,214 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler 
2020-06-04 15:21:52,214 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.metadata-directive: calling handler 
2020-06-04 15:21:52,214 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.size-only: calling handler 
2020-06-04 15:21:52,214 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler 
2020-06-04 15:21:52,214 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.exact-timestamps: calling handler 
2020-06-04 15:21:52,214 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler 
2020-06-04 15:21:52,214 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.delete: calling handler 
2020-06-04 15:21:52,214 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler 
2020-06-04 15:21:52,216 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 169.254.169.254:80
2020-06-04 15:21:52,220 - MainThread - urllib3.connectionpool - DEBUG - http://169.254.169.254:80 "PUT /latest/api/token HTTP/1.1" 400 11
2020-06-04 15:21:52,220 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()
Traceback (most recent call last):
  File "awscli/clidriver.py", line 335, in main
  File "awscli/customizations/commands.py", line 197, in __call__
  File "awscli/customizations/commands.py", line 190, in __call__
  File "awscli/customizations/s3/subcommands.py", line 709, in _run_main
  File "awscli/customizations/s3/subcommands.py", line 480, in _run_main
  File "awscli/customizations/s3/subcommands.py", line 473, in get_client
  File "botocore/session.py", line 775, in create_client
  File "botocore/session.py", line 824, in _resolve_region_name
  File "botocore/session.py", line 234, in get_config_variable
  File "botocore/configprovider.py", line 281, in get_config_variable
  File "botocore/configprovider.py", line 378, in provide
  File "awscli/utils.py", line 59, in provide
  File "awscli/utils.py", line 64, in _get_instance_metadata_region
  File "awscli/utils.py", line 104, in retrieve_region
  File "awscli/utils.py", line 113, in _get_region
  File "botocore/utils.py", line 227, in _fetch_metadata_token
botocore.utils.BadIMDSRequestError: 
2020-06-04 15:21:52,221 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255
@simonwep simonwep added the needs-triage This issue or PR still needs to be triaged. label Jun 4, 2020
@MeLlamoPablo
Copy link

I'm encountering the same issue using the amazon/aws-cli:2.0.19 docker image.

Here are my relevant debug logs:

2020-06-09T09:21:47.3350875Z 2020-06-09 09:21:47,334 - MainThread - awscli.clidriver - DEBUG - CLI version: aws-cli/2.0.19 Python/3.7.3 Linux/5.3.0-1020-azure botocore/2.0.0dev23
2020-06-09T09:21:47.3355415Z 2020-06-09 09:21:47,334 - MainThread - awscli.clidriver - DEBUG - Arguments entered to CLI: ['s3', 'sync', 'build/', 's3://branch-preview.c23f53c2a17c89e6ceed347a57fc55ee', '--delete', '--debug']
2020-06-09T09:21:47.3355890Z 2020-06-09 09:21:47,335 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_timestamp_parser at 0x7f68f4152730>
2020-06-09T09:21:47.3356294Z 2020-06-09 09:21:47,335 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function register_uri_param_handler at 0x7f68f4a852f0>
2020-06-09T09:21:47.3360303Z 2020-06-09 09:21:47,335 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function add_binary_formatter at 0x7f68f4116bf8>
2020-06-09T09:21:47.3360887Z 2020-06-09 09:21:47,335 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_assume_role_provider_cache at 0x7f68f4a5b840>
2020-06-09T09:21:47.3372724Z 2020-06-09 09:21:47,336 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function attach_history_handler at 0x7f68f42a21e0>
2020-06-09T09:21:47.3376700Z 2020-06-09 09:21:47,337 - MainThread - botocore.hooks - DEBUG - Event session-initialized: calling handler <function inject_json_file_cache at 0x7f68f42d2ae8>
2020-06-09T09:21:47.3377104Z 2020-06-09 09:21:47,337 - MainThread - botocore.hooks - DEBUG - Event building-command-table.s3: calling handler <function add_waiters at 0x7f68f415ab70>
2020-06-09T09:21:47.3380345Z 2020-06-09 09:21:47,337 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.s3.anonymous: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3403708Z 2020-06-09 09:21:47,337 - MainThread - botocore.hooks - DEBUG - Event building-command-table.sync: calling handler <function register_sync_strategies at 0x7f68f4152048>
2020-06-09T09:21:47.3413512Z 2020-06-09 09:21:47,338 - MainThread - botocore.hooks - DEBUG - Event building-command-table.sync: calling handler <function add_waiters at 0x7f68f415ab70>
2020-06-09T09:21:47.3414046Z 2020-06-09 09:21:47,338 - MainThread - botocore.hooks - DEBUG - Event building-arg-table.sync: calling handler <bound method BaseSync.add_sync_argument of <awscli.customizations.s3.syncstrategy.sizeonly.SizeOnlySync object at 0x7f68f4099978>>
2020-06-09T09:21:47.3414519Z 2020-06-09 09:21:47,338 - MainThread - botocore.hooks - DEBUG - Event building-arg-table.sync: calling handler <bound method BaseSync.add_sync_argument of <awscli.customizations.s3.syncstrategy.exacttimestamps.ExactTimestampsSync object at 0x7f68f40998d0>>
2020-06-09T09:21:47.3415284Z 2020-06-09 09:21:47,338 - MainThread - botocore.hooks - DEBUG - Event building-arg-table.sync: calling handler <bound method BaseSync.add_sync_argument of <awscli.customizations.s3.syncstrategy.delete.DeleteSync object at 0x7f68f4099710>>
2020-06-09T09:21:47.3415674Z 2020-06-09 09:21:47,339 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.paths: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3416045Z 2020-06-09 09:21:47,340 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.dryrun: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3416538Z 2020-06-09 09:21:47,340 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f68f4aaa5f8>
2020-06-09T09:21:47.3416947Z 2020-06-09 09:21:47,340 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.quiet: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3417326Z 2020-06-09 09:21:47,340 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f68f4aaa5f8>
2020-06-09T09:21:47.3417701Z 2020-06-09 09:21:47,340 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.anonymous: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3418065Z 2020-06-09 09:21:47,340 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.acl: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3418462Z 2020-06-09 09:21:47,340 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.follow-symlinks: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3418832Z 2020-06-09 09:21:47,340 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f68f4aaa5f8>
2020-06-09T09:21:47.3419203Z 2020-06-09 09:21:47,340 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.anonymous: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3419568Z 2020-06-09 09:21:47,340 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3419934Z 2020-06-09 09:21:47,340 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-c: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3420304Z 2020-06-09 09:21:47,340 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-c-key: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3420685Z 2020-06-09 09:21:47,340 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-kms-key-id: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3437929Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-c-copy-source: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3438360Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.sse-c-copy-source-key: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3438772Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.storage-class: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3439156Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.grants: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3440210Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.website-redirect: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3440599Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-type: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3441538Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.cache-control: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3442086Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-disposition: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3442696Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-encoding: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3443110Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.content-language: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3443499Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.expires: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3443899Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.source-region: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3444300Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.only-show-errors: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3444685Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f68f4aaa5f8>
2020-06-09T09:21:47.3445095Z 2020-06-09 09:21:47,341 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.anonymous: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3445481Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.page-size: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3446056Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.ignore-glacier-warnings: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3446439Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f68f4aaa5f8>
2020-06-09T09:21:47.3446828Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.force-glacier-transfer: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3450038Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f68f4aaa5f8>
2020-06-09T09:21:47.3450462Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.request-payer: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3450850Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.metadata: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3451222Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.copy-props: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3451746Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f68f4aaa5f8>
2020-06-09T09:21:47.3452122Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.metadata-directive: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3452877Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.size-only: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3453361Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f68f4aaa5f8>
2020-06-09T09:21:47.3453794Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.exact-timestamps: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3454189Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f68f4aaa5f8>
2020-06-09T09:21:47.3454576Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event load-cli-arg.custom.sync.delete: calling handler <awscli.paramfile.URIArgumentHandler object at 0x7f68f4094ba8>
2020-06-09T09:21:47.3454980Z 2020-06-09 09:21:47,342 - MainThread - botocore.hooks - DEBUG - Event process-cli-arg.custom.sync: calling handler <awscli.argprocess.ParamShorthandParser object at 0x7f68f4aaa5f8>
2020-06-09T09:21:47.3455378Z 2020-06-09 09:21:47,344 - MainThread - urllib3.connectionpool - DEBUG - Starting new HTTP connection (1): 169.254.169.254:80
2020-06-09T09:21:47.3474859Z 2020-06-09 09:21:47,347 - MainThread - urllib3.connectionpool - DEBUG - http://169.254.169.254:80 "PUT /latest/api/token HTTP/1.1" 400 11
2020-06-09T09:21:47.3485519Z 2020-06-09 09:21:47,347 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()
2020-06-09T09:21:47.3485665Z Traceback (most recent call last):
2020-06-09T09:21:47.3485777Z   File "awscli/clidriver.py", line 335, in main
2020-06-09T09:21:47.3485889Z   File "awscli/customizations/commands.py", line 197, in __call__
2020-06-09T09:21:47.3486005Z   File "awscli/customizations/commands.py", line 190, in __call__
2020-06-09T09:21:47.3486121Z   File "awscli/customizations/s3/subcommands.py", line 709, in _run_main
2020-06-09T09:21:47.3486240Z   File "awscli/customizations/s3/subcommands.py", line 480, in _run_main
2020-06-09T09:21:47.3486367Z   File "awscli/customizations/s3/subcommands.py", line 473, in get_client
2020-06-09T09:21:47.3486487Z   File "botocore/session.py", line 775, in create_client
2020-06-09T09:21:47.3486603Z   File "botocore/session.py", line 824, in _resolve_region_name
2020-06-09T09:21:47.3486719Z   File "botocore/session.py", line 234, in get_config_variable
2020-06-09T09:21:47.3486838Z   File "botocore/configprovider.py", line 281, in get_config_variable
2020-06-09T09:21:47.3486972Z   File "botocore/configprovider.py", line 378, in provide
2020-06-09T09:21:47.3487087Z   File "awscli/utils.py", line 59, in provide
2020-06-09T09:21:47.3487198Z   File "awscli/utils.py", line 64, in _get_instance_metadata_region
2020-06-09T09:21:47.3487313Z   File "awscli/utils.py", line 104, in retrieve_region
2020-06-09T09:21:47.3487425Z   File "awscli/utils.py", line 113, in _get_region
2020-06-09T09:21:47.3487535Z   File "botocore/utils.py", line 229, in _fetch_metadata_token
2020-06-09T09:21:47.3487666Z botocore.utils.BadIMDSRequestError: <botocore.awsrequest.AWSRequest object at 0x7f68f404a710>
2020-06-09T09:21:47.3487994Z 2020-06-09 09:21:47,347 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255
2020-06-09T09:21:47.3488064Z 
2020-06-09T09:21:47.3488173Z <botocore.awsrequest.AWSRequest object at 0x7f68f404a710>
2020-06-09T09:21:47.4079459Z ##[error]Process completed with exit code 255.

@vberlier
Copy link

Can confirm, the docker image is also affected. I'm using amazon/aws-cli:2.0.34.

@Tchangang
Copy link

Tchangang commented Jul 28, 2020

Also confirm. version i'm using:
aws-cli/2.0.34 Python/3.7.3 Linux/5.3.0-1032-azure botocore/2.0.0dev38

I got this error:

2020-07-28 06:46:53,725 - MainThread - urllib3.connectionpool - DEBUG - http://169.254.169.254:80 "PUT /latest/api/token HTTP/1.1" 400 11
2020-07-28 06:46:53,725 - MainThread - awscli.clidriver - DEBUG - Exception caught in main()
Traceback (most recent call last):
  File "awscli/clidriver.py", line 335, in main
  File "awscli/customizations/commands.py", line 197, in __call__
  File "awscli/customizations/commands.py", line 190, in __call__
  File "awscli/customizations/s3/subcommands.py", line 494, in _run_main
  File "awscli/customizations/s3/subcommands.py", line 480, in _run_main
  File "awscli/customizations/s3/subcommands.py", line 473, in get_client
  File "botocore/session.py", line 775, in create_client
  File "botocore/session.py", line 824, in _resolve_region_name
  File "botocore/session.py", line 234, in get_config_variable
  File "botocore/configprovider.py", line 281, in get_config_variable
  File "botocore/configprovider.py", line 378, in provide
  File "awscli/utils.py", line 59, in provide
  File "awscli/utils.py", line 64, in _get_instance_metadata_region
  File "awscli/utils.py", line 104, in retrieve_region
  File "awscli/utils.py", line 113, in _get_region
  File "botocore/utils.py", line 229, in _fetch_metadata_token
botocore.utils.BadIMDSRequestError: <botocore.awsrequest.AWSRequest object at 0x7f168a4d4240>
2020-07-28 06:46:53,726 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255

<botocore.awsrequest.AWSRequest object at 0x7f168a4d4240>
##[error]Process completed with exit code 255.

Reinstalling awscli from python3 works as @simonwep say.

@lucianolxp
Copy link

lucianolxp commented Aug 5, 2020

I was also having this issue but discovered that the ubuntu-latest image already has the awscli v2 installed (not the latest version though)

as a workaround I just removed the install from my script and it worked

@Tchangang
Copy link

@lucianolxp thanks I will try it. It will save us precious seconds 👍

@kdaily
Copy link
Member

kdaily commented Oct 7, 2020

Looks like this might be related when running in Azure Kubernetes Service: #5234

I think the issue is that Azure has it's own instance metadata service using the same non-routable IP address:

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service

@kdaily kdaily added bug This issue is a bug. and removed needs-triage This issue or PR still needs to be triaged. labels Oct 7, 2020
@kdaily
Copy link
Member

kdaily commented Oct 8, 2020

@simonwep I think this is due to a difference in behavior between the V1 and V2 clients. When you pip install, you're getting the v1 client. As of AWS CLI v2 2.0.15, if a region is not specified, the IMDS service is used to try and determine it.

#5207

You can set a region to avoid this request from being made. There is also an undocumented environment variable that can be set to disable this:

AWS_EC2_METADATA_DISABLED=true

I will open a separate documentation issue to make sure this is added to the list of AWS CLI environment variables.

@kdaily kdaily added confusing-error guidance Question that needs advice or information. closing-soon This issue will automatically close in 4 days unless further comments are made. and removed bug This issue is a bug. labels Oct 8, 2020
@kdaily
Copy link
Member

kdaily commented Oct 9, 2020

Opened the following documentation issue: #5623

@kdaily kdaily added closing-soon This issue will automatically close in 4 days unless further comments are made. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Oct 9, 2020
@kdaily kdaily closed this as completed Oct 22, 2020
@kdaily kdaily removed the closing-soon This issue will automatically close in 4 days unless further comments are made. label Oct 22, 2020
@github-actions
Copy link

⚠️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.

andyli added a commit to giffon/charleywong that referenced this issue Nov 26, 2020
@AleksandarTokarev
Copy link

Github upgrading ubuntu-latest from 18.04 default to 20.04 broke my pipeline
Here is the issue actions/runner-images#1816
I had to do

jobs:
  build:
    runs-on: ubuntu-18.04

in order to get it working. If i use latest this goes to 20.04 and i would need to use new cli commands

djbender added a commit to get-bridge/translation-sync that referenced this issue May 5, 2021
djbender added a commit to get-bridge/translation-sync that referenced this issue May 5, 2021
miensol added a commit to bright/new-www that referenced this issue May 17, 2021
miensol added a commit to bright/new-www that referenced this issue May 17, 2021
miensol added a commit to bright/new-www that referenced this issue May 17, 2021
miensol added a commit to bright/new-www that referenced this issue May 17, 2021
miensol added a commit to bright/new-www that referenced this issue May 17, 2021
raxod502 added a commit to radian-software/riju that referenced this issue Jul 10, 2021
@NathanielRN
Copy link

For me, the problem was that I had commented out my step to "Configure AWS credentials" on the GitHub action during testing 🤦‍♂️

- name: Configure AWS Credentials
  uses: aws-actions/configure-aws-credentials@v1
  with:
    aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
    aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    aws-region: us-west-2

That caused any aws <command> <subcommand> call to silently return <botocore.awsrequest.AWSRequest object at 0x7f37ea551278> without any error...

Adding the credentials back worked even with ubuntu-latest! No need to set the AWS_EC2_METADATA_DISABLED or AWS_DEFAULT_REGION for me.

@jones-chris
Copy link

For those who prefer to not use an action to upload a file to S3, I found that I had to do the following on ubuntu-latest (which as of today is Ubuntu 20.04.3):

- shell: bash
  env:
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    S3_BUCKET_NAME: ${{ secrets.THE_BUCKET }}
    AWS_DEFAULT_REGION: us-east-1
    AWS_DEFAULT_OUTPUT: json
  run: aws s3 cp "./target/myArtifact.jar" "s3://$S3_BUCKET_NAME/github-actions-builds/"

lorengordon added a commit to lorengordon/spel-repo-builder that referenced this issue Nov 22, 2021
lorengordon added a commit to lorengordon/spel-repo-builder that referenced this issue Nov 30, 2021
suzuki-shunsuke added a commit to suzuki-shunsuke/tfaction that referenced this issue Feb 6, 2022
aws/aws-cli#5262 (comment)

It failed to run `aws s3 cp` because the region isn't specified.
mnapoli added a commit to serverless/serverless that referenced this issue Apr 21, 2022
See aws/aws-cli#5262 (comment)

If we don't provide a region then the aws CLI v1 fails.
jyyi1 added a commit to Jigsaw-Code/outline-releases that referenced this issue Apr 26, 2022
Use the official way to configure AWS credentials instead of raw environment variables as recommended here: aws/aws-cli#5262 (comment). Because GitHub action cannot run `aws s3` successfully due to unknown `AWS_EC2_METADATA` or region issues.
RodEsp added a commit to salesforcecli/github-workflows that referenced this issue Nov 4, 2022
mshanemc pushed a commit to salesforcecli/github-workflows that referenced this issue Nov 9, 2022
* feat: rename intel mac pkg

* chore: add env var to avoid unnecessary aws API calls

more info here: aws/aws-cli#5262 (comment)

* fix: don't use docker since gha runners already have aws cli

* chore: change rename mac pkg job to a composite action

* chore: for testing

* fix: step ids

* Revert "chore: for testing"

This reverts commit cf409ca.

* fix: remove rename mac job from reusable workflow
mshanemc pushed a commit to salesforcecli/github-workflows that referenced this issue Nov 10, 2022
* feat: rename intel mac pkg

* chore: add env var to avoid unnecessary aws API calls

more info here: aws/aws-cli#5262 (comment)

* fix: don't use docker since gha runners already have aws cli

* chore: change rename mac pkg job to a composite action

* chore: for testing

* fix: step ids

* Revert "chore: for testing"

This reverts commit cf409ca.

* fix: remove rename mac job from reusable workflow

* fix: don't hardcode sfdx

* fix: add .pkg file extension
SaraMWillis added a commit to UA-ResearchComputing-HPC/hpc-documentation that referenced this issue Apr 3, 2024
AnyOldName3 added a commit to AnyOldName3/openmw-deps-build that referenced this issue Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confusing-error guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests