serverless-application-model icon indicating copy to clipboard operation
serverless-application-model copied to clipboard

Feature request: optional parameters for sam policy templates

Open timoschilling opened this issue 6 years ago • 1 comments

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*

timoschilling avatar Apr 23 '20 18:04 timoschilling

Definitely agree with this!

MLaunch avatar Sep 29 '22 15:09 MLaunch