serverless-application-model
serverless-application-model copied to clipboard
Feature request: optional parameters for sam policy templates
Description:
SAM policy templates are a very nice feature. But sometime we have use cases where they are unusable. This could be fixed if policy templates are able to deal with default parameters.
Example S3ReadPolicy:
We would like to specify the allowed key too.
Policies:
- S3ReadPolicy:
Bucket: foo
Key: foo/*/bar
Example LambdaInvokePolicy:
We would like to use it for cross region invoketion.
Policies:
- LambdaInvokePolicy:
FunctionName: foo
Region: eu-central-1
Example generic:
Policies:
- LambdaInvokePolicy:
Resource: arn:aws:lambda:eu-central-1:12345678:function:some-function*
Definitely agree with this!