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

Replace sls lambda role with a new default one #54

Closed tptee closed 5 years ago

tptee commented 5 years ago

Creates a new, default Lambda execution IAM role to use in favor of the Serverless default role. This prevents the chicken-and-egg problem where terraform-aws-serverless tries to attach IAM policies to the Serverless role that doesn't exist yet.

Added comments in the example serverless.yml in the readme to explain the new role requirement in serverless.yml.

Verified full creation and deletion with both the new default role and a custom role from the reference app: https://github.com/FormidableLabs/aws-lambda-serverless-reference/pull/19