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

AuthFailure: AWS was not able to validate the provided access credentials #6

Closed
apl-git opened this issue Jan 16, 2019 · 3 comments
Closed

Comments

@apl-git
Copy link

apl-git commented Jan 16, 2019

Steps to reproduce the bug:

  1. Create a role in IAM section of AWS console.
  2. Create a policy from the JSON document from the home page, attach a policy to a role.
  3. Assign a role to the AWS instance.
  4. Run awespottr on the instance.

Expected results:
awespottr should show the regions and prices (this was working in summer 2018).

Actual results:
awespottr prints access denied error. See the full text it prints below.

[18:52]:apl@adeaseweb::>awespottr c4.xlarge
Checking spot prices for c4.xlarge instance type.
{ AuthFailure: AWS was not able to validate the provided access credentials
at Request.extractError (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/services/ec2.js:50:35)
at Request.callListeners (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request. (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/request.js:38:9)
at Request. (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
message: 'AWS was not able to validate the provided access credentials',
code: 'AuthFailure',
time: 2019-01-16T23:53:05.198Z,
requestId: '3a4648cb-9b1c-4624-8fde-b4174359b09f',
statusCode: 401,
retryable: false,
retryDelay: 24.198964719436013 } 'AuthFailure: AWS was not able to validate the provided access credentials\n at Request.extractError (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/services/ec2.js:50:35)\n at Request.callListeners (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/sequential_executor.js:105:20)\n at Request.emit (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/sequential_executor.js:77:10)\n at Request.emit (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/request.js:683:14)\n at Request.transition (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/request.js:22:10)\n at AcceptorStateMachine.runTo (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/state_machine.js:14:12)\n at /usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/state_machine.js:26:10\n at Request. (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/request.js:38:9)\n at Request. (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/request.js:685:12)\n at Request.callListeners (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/sequential_executor.js:115:18)'
error { AuthFailure: AWS was not able to validate the provided access credentials
at Request.extractError (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/services/ec2.js:50:35)
at Request.callListeners (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request. (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/request.js:38:9)
at Request. (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/usr/lib/node_modules/awespottr/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
message: 'AWS was not able to validate the provided access credentials',
code: 'AuthFailure',
time: 2019-01-16T23:53:05.198Z,
requestId: '3a4648cb-9b1c-4624-8fde-b4174359b09f',
statusCode: 401,
retryable: false,
retryDelay: 24.198964719436013 }
[18:53]:apl@adeaseweb:
:>

@allenluce
Copy link

I've noticed this happening in certain regions (AP for instance). I've submitted a patch in #7 to address this.

@apl-git
Copy link
Author

apl-git commented Jul 12, 2019

Actually, I figured out the issue. It was caused by the system clock being off by several minutes. I am closing the issue.

@apl-git apl-git closed this as completed Jul 12, 2019
@allenluce
Copy link

I continue to run into this with the AP region not returning data when all the others will. That patch will address that situation by allowing data from everywhere else to be displayed even when one region errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants