-
Notifications
You must be signed in to change notification settings - Fork 9
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
Error when invoking locally without credentials #8
Comments
Hey there- thanks for reporting. It's definitely an interesting edge case; I'll admit I don't actually use As you note - mixing in some credentials (either using the cli arguments, or you could have a default profile configured or enviornment variables) is a workaround. I'm not against a PR - although it's quite possible the error is being thrown from the aws-sdk itself - but I don't have the bandwidth to fix it myself. |
I'm going to close this as a bit of house keeping. Thanks again for reporting, though. |
Hey, I have the same problem. I use this plugin to try to deploy my app using aws SSO. But I develop using serverless-offline. Whith this plugin, it's not possible to use serverless-offline. I have an error on credentials or profile |
I am running into the same issues as @throrin19 @thomasmichaelwallace what are your thoughts on a PR that no-ops this plugin if the |
I don't have a problem with it, if it works. The interaction between plugins and credentials is weirdly complicated; especially now some plugins are based on v3 of the AWS-SDK. Something else to try is the workaround I've added to the troubleshooting stage, where you provide a credentials file: |
@thomasmichaelwallace PR for you here! #33 I plan to use this to enable everywhere except local, where I don't need AWS creds: params:
default:
better-credentials-enabled: true
local:
better-credentials-enabled: false
plugins:
- serverless-better-credentials
custom:
betterCredentials:
enabled: ${param:better-credentials-enabled} |
If I invoke locally without any AWS credentials, e.g.
sls invoke local --function foo
, an error is thrown:Error: ENOENT: no such file or directory, open '~/.aws/credentials'
A workaround for this is to just create invalid AWS credentials:
serverless config credentials --provider aws --key NA --secret NA
The obvious answer is that I should just have actual credentials, but I don't think the plugin should throw an error if no credentials are found when invoking locally.
The text was updated successfully, but these errors were encountered: