Skip to content

Commit

Permalink
Merge c3ff60d into 8799cbb
Browse files Browse the repository at this point in the history
  • Loading branch information
walery committed Feb 4, 2021
2 parents 8799cbb + c3ff60d commit 39a26e2
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions docs/providers/aws/guide/variables.md
Expand Up @@ -666,15 +666,31 @@ You can reference [AWS Pseudo Parameters](http://docs.aws.amazon.com/AWSCloudFor
Here's an example:

```yml
Resources:
- 'Fn::Join':
- ':'
- - 'arn:aws:logs'
- Ref: 'AWS::Region'
- Ref: 'AWS::AccountId'
- 'log-group:/aws/lambda/*:*:*'
functions:
hello:
handler: my-function.handler
environment:
var:
Fn::Join:
- ':'
- - 'arn:aws:logs'
- Ref: 'AWS::Region'
- Ref: 'AWS::AccountId'
- 'log-group:/aws/lambda/*:*:*'
```

You can also directly use the [Sub] function:

```yml
functions:
hello:
handler: my-function.handler
environment:
var: !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 39a26e2

Please sign in to comment.