Skip to content

Commit

Permalink
Add Sub function example to Pseudo Parameters doc.
Browse files Browse the repository at this point in the history
This is documentation of change added in serverless#8279
  • Loading branch information
walery committed Feb 3, 2021
1 parent 61dd3bd commit cf0947d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/providers/aws/guide/variables.md
Expand Up @@ -675,6 +675,15 @@ Resources:
- 'log-group:/aws/lambda/*:*:*'
```

You can also directly use the [Sub] function:

```yml
Resources:
- !Sub arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/*:*:*'
```

[sub]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-sub.html

## Read String Variable Values as Boolean Values

In some cases, a parameter expect a `true` or `false` boolean value. If you are using a variable to define the value, it may return as a string (e.g. when using SSM variables) and thus return a `"true"` or `"false"` string value.
Expand Down

0 comments on commit cf0947d

Please sign in to comment.