1. fix docs that would lead to an error for users via copy-paste
2. add tests about adding roleArn to functions given role declared on provider and/or function
3. fix bug discovered due to lack of tests
4. add test to ensure preference for function declared roleArn over provider declared roleArn
The stack is now set up in one place.
The S3 bucket isn't created on create if a bucket is already specified.
Working on configurability for the developer.
There is still the possibility of failing to deploy the stack
if the iamRoleArn is set, and a deploymentBucket is specified
Switch from an all lambdas logging resource IAM policy to one that targets specifically and only those CloudWatch logs produces by the lambdas declared by the service.
Modify tests to ensure this is properly done.
Introduce a `role` property that specifies a role defined within the service.
Update tests to ensure this is properly used
Update documentation to describe this
Replace `iamRoleARN` with `roleArn`
Update tests and documentation to reflect this
Add Decision Trees describing the decision points and considerations between individual function rights and shared rights models
Resolves matter 1 of https://github.com/serverless/serverless/issues/1895
Allow each function to declare the ARN of the role that it is to execute within. If any function has no role ARN but provider role ARN is defined then use that role for such functions. If any function does not have a specified role (even by falling back to a provider-wide role) then add the default policy and role so that it can be used for such functions.
Break out the portions of the logic into their discrete units so that the plugin code is a readable summary. Add comments to the discrete units.
Add tests that check that the default role and policy are not added if every function has a role.
Add tests that check that every function that has a declared role gets it assigned.
Add tests that check that every function that has no declared role but where a provider role is declared gets the provider role assigned.