c6fc / npk

A mostly-serverless distributed hash cracking platform
508 stars 59 forks source link

Deployment Error: Unable To Authenticate. Long Term Credentials For Profile Are Invalid. AWS Profile Credential Verification Error #85

Closed vv78acc closed 9 months ago

vv78acc commented 1 year ago

c6fc, I am attempting a manual deployment of npk with the step by step installation instructions listed under:

https://github.com/c6fc/npk/wiki/Step-by-step-Installation

I was able to do a verification log in check to AWS successfully. I am able to run "aws sts get-caller-identity" which shows the account that I want to use. I then run "npm run deploy", and I get the following authentication error:

[!] Credential validation failed with error: InvalidClientTokenId: The security token included in the request is invalid. [!] Unable to authenticate; [Error: Long term credentials for profile [xxx-xxxx] are invalid: Error: AWS profile credential verification error]

I have already tested that the AWS CLI works, so from the error above, it mentions "Error: Long term credentials for profile are invalid". The only place that where are expiration appears in is ~/.aws/credentials file under "aws_expiration="

This seems to only be an issue in the deployment process ("npm run deploy"). Since I was able to test my access to AWS successfully, AWS is not the issue. At this point, this error seems to be associated to NPM (not AWS) complaining that it does not like the AWS credentials (that it was able to find). NPM does not seem to be able to validate the long term credentials and throws an error saying that "AWS profile credential verification error".

I have not found much online to help with this error. Could this be due to how the deployment (with npm and/or nodejs) is attempting to authenticate? Is there anything in the deployment code that I can modify to fix the error referenced above?

Please advise.

vv78acc

c6fc commented 1 year ago

Are you actually defining an AWS Profile for it to use? the 'Long term credentials for profile [xxx-xxxx]' seems to indicate that you are.

Delete and re-create your cloudshell, and deploy without specifying a profile. The deployment inside Cloudshell will use your permissions automatically.

On Fri, Jun 23, 2023 at 1:10 PM vv78acc @.***> wrote:

c6fc, I am attempting a manual deployment of npk with the step by step installation instructions listed under:

https://github.com/c6fc/npk/wiki/Step-by-step-Installation

I was able to do a verification log in check to AWS successfully. I am able to run "aws sts get-caller-identity" which shows the account that I want to use. I then run "npm run deploy", and I get the following authentication error:

[!] Credential validation failed with error: InvalidClientTokenId: The security token included in the request is invalid. [!] Unable to authenticate; [Error: Long term credentials for profile [xxx-xxxx] are invalid: Error: AWS profile credential verification error]

I have already tested that the AWS CLI works, so from the error above, it mentions "Error: Long term credentials for profile are invalid". The only place that where are expiration appears in is ~/.aws/credentials file under "aws_expiration="

This seems to only be an issue in the deployment process ("npm run deploy"). Since I was able to test my access to AWS successfully, AWS is not the issue. At this point, this error seems to be associated to NPM (not AWS) complaining that it does not like the AWS credentials (that it was able to find). NPM does not seem to be able to validate the long term credentials and throws an error saying that "AWS profile credential verification error".

I have not found much online to help with this error. Could this be due to how the deployment (with npm and/or nodejs) is attempting to authenticate? Is there anything in the deployment code that I can modify to fix the error referenced above?

Please advise.

vv78acc

— Reply to this email directly, view it on GitHub https://github.com/c6fc/npk/issues/85, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABDAN73RRMS66ZK7QVOY7DXMXSY7ANCNFSM6AAAAAAZR52NQY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Brad Woodward AWS PSA+SCS, OSCP, OSCE, MCITP, MCSA, CISSP-ISSAP, CRISC, CPSA, CRT

@.*** @bradwoodward_io