FormidableLabs / terraform-aws-serverless

Infrastructure support for Serverless framework apps, done the right way
https://registry.terraform.io/modules/FormidableLabs/serverless/aws
MIT License
144 stars 19 forks source link

Add `iam_stage` option for loosening IAM stage permissions #45

Closed tptee closed 5 years ago

tptee commented 5 years ago

This option allows redefinition how IAM protects each stage. This is particularly useful for the following scheme:

Wildcarding stage to be nonprod-* in the nonprod module invocation allows the CI role to create dynamic Serverless deployments without the elevated privileges needed to define and edit IAM. The nonprod prefix also prevents these dynamic environments from accessing production Serverless in any way.

Verified that logs, invocation, and X-Ray function as expected with the following updated branch in our AWS account: https://github.com/FormidableLabs/aws-lambda-serverless-reference/tree/feature/custom-lambda-role