Found some unused code when looking for throttling errors, added functionality to get code from SDK errors.
Added tests to cover functionality.
Fixed prefix to be serverless/{serviceName}/{stage}
Correct policy naming by doing it in code with appropriate variables - previous code was incorrectly assuming that the template would be rendered with variable names.
Add tests to verify that the CloudWatch LogGroup resources are being properly added into the Service's CFT.
Add minor comment about line length reasoning for extra code.
Remove the create log group permissions
Add CloudWatch LogGroup to the CFT
Reference the co-created CloudWatch LogGroup as one of the resources for the IamPolicyLambdaExecution's logging statement
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
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.
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.
Yeesh. Sorry for the noob moves. Resolves lint.
Note that the reduction in coverage is a result of the reduction of lines of code via removal of those lines without removal of uncovered lines.