aws / aws/serverless-application-model

Feature request: optional parameters for sam policy templates

Open
#1,570 1 comment 0 reactions 0 assignees View on GitHub
area/policy-templates maintainer/need-response type/feature
Dominant language
Python
Stars
9.6k
Forks
2.5k
Avg merge
1d 11h
Merged PRs (30d)
7

Description

**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.

```yaml
Policies:
- S3ReadPolicy:
Bucket: foo
Key: foo/*/bar
```

**Example LambdaInvokePolicy:**

We would like to use it for cross region invoketion.

```yaml
Policies:
- LambdaInvokePolicy:
FunctionName: foo
Region: eu-central-1
```

**Example generic:**

```yaml
Policies:
- LambdaInvokePolicy:
Resource: arn:aws:lambda:eu-central-1:12345678:function:some-function*
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.