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

What are the minimal AWS permissions needed for faast to function properly? #542

Open
microsoftly opened this issue Oct 26, 2020 · 5 comments

Comments

@microsoftly
Copy link
Collaborator

No description provided.

@acchou
Copy link
Collaborator

acchou commented Oct 26, 2020

Ideally admin permissions to the entire account. The reason is that faast.js creates its own role and sets the permissions for that role, and in order to do that you need a high level of permissions.

However you can create the role yourself: https://faastjs.org/docs/api/faastjs.awsoptions.rolename, then specify the role you created as the RoleName property of AwsOptions: https://faastjs.org/docs/api/faastjs.awsoptions.

@microsoftly
Copy link
Collaborator Author

Ideally, there's a lesser set of permissions that would be needed in order for faast to function properly, no?

That seems insanely broad and a potential security risk otherwise

@acchou
Copy link
Collaborator

acchou commented Oct 27, 2020

It's a little complex because faast.js needs to do many things in order to orchestrate the work it does. Producing an absolute minimal configuration will be challenging, but a coarse approximation would probably require (untested):

  • Access to read IAM (assuming you create the role yourself and specify as the RoleName, otherwise write access is required)
  • Access to create, invoke, and delete Lambda functions
  • Read and write access to S3, using the buckets you specify - but also any buckets created by faast with the faast-* prefix
  • create, delete, and operation access to SQS and SNS.
  • probably some others that I've forgotten.

In general the best approach is probably to segregate the use cases and data for faast.js into a separate account, and use that for the production use. For developer use, you can use the standard AWS IAM keys you use, which probably gives you will access to your own account.

@acchou
Copy link
Collaborator

acchou commented Oct 27, 2020

A quick review of the code shows two more services you need permissions for:

  • STS
  • AWS Price List API

@microsoftly
Copy link
Collaborator Author

Thank you!

I'll be testing this soon and will report back if it works

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