-
Notifications
You must be signed in to change notification settings - Fork 421
Document IAM requirements for lambda layer installation #203
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
Comments
Thanks for raising it @mwarkentin! @am29d could you help Michael when you get a chance? As it uses SAR for deployment it definitely needs more permissions than if it were a plain Lambda Layer ARN. |
Here's what we've got so far with more targetted wildcards, still working on the
|
Looks like that works, so I think that's enough for us to remove any wide open wildcards. Would still be nice to have this documented for the lambda install. Feel free to take what we've got here and modify it for the docs if it helps! |
Hi @mwarkentin, thank you for raising the issue. This is definitely something that needs to be documented and will save a lot of IAM pipeline debugging time for all of us. I will test your proposal and add it to the docs. Thank you. |
@mwarkentin I have checked your permissions and added them to the docs, with a small change to replace the region within the resource statement of the |
Awesome, thanks! |
Fixed in #204 |
What were you initially searching for in the docs?
We would like a well-defined, least-privilege IAM policy to enable installing powertools as a lambda layer. We had to bungle through a few sets of errors in our build pipeline in order to get something working, and even so we have granted more permissions than we'd like to (trying to figure out how to scope it down safely without breaking things again).
Is this related to an existing part of the documentation? Please share a link
https://awslabs.github.io/aws-lambda-powertools-python/#lambda-layer
Provide a working policy (or at least a template where you could insert your own account id, etc) for installation of lambda layer.
If you have a proposed update, please share it here
Here's our current (working, but too powerful) IAM policy (in HCL but should be readable to anyone familiar with IAM policy structure):
The text was updated successfully, but these errors were encountered: