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

~/.aws/credentials created on npm install (even if we do not rely on AWS) #4506

Closed
medikoo opened this issue Nov 30, 2017 · 1 comment · Fixed by #6294
Closed

~/.aws/credentials created on npm install (even if we do not rely on AWS) #4506

medikoo opened this issue Nov 30, 2017 · 1 comment · Fixed by #6294
Labels

Comments

@medikoo
Copy link
Contributor

medikoo commented Nov 30, 2017

This is a Bug Report

After introduction of #3866 due to ensureFileSync run in plugin constructor, the ~/.aws/credentials file creation attempt is pursued on every SLS command, and also when serverless is installed due to serverless.init() invoked in scripts/postinstall.js

It also happens when serverless is not intended to be used with AWS, therefore I believe it's a bug.

  • Serverless Framework Version you're using: 1.24.1
  • Operating System: 10.12.6
  • Stack Trace:
  • Provider Error messages:
@HyperBrain
Copy link
Member

@medikoo , thanks for reporting this 👍 . The creation of AWS related files indeed should take place during the execution of an AWS plugin, but never in it's constructor, as that will affect all providers.

I see the location of the implementation as simply wrong. Plugin constructors should only establish hooks and commands, but never execute anything related to a specific provider. That makes sure that the provider dependent stuff is only done, when the provider that is targeted by the plugin is actually invoked and used.

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

Successfully merging a pull request may close this issue.

3 participants