Skip to content

Commit

Permalink
fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jumic committed Oct 11, 2021
1 parent ad2520c commit 04b476b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -801,15 +801,15 @@ const regionTable = new CfnMapping(this, 'RegionTable', {
lazy: true,
});
regionTable.findInMap('us-east-2', 'regionName')
regionTable.findInMap('us-east-2', 'regionName');
```

On the other hand, the following code will produce the "Mappings" section shown above,
since the top-level key is an unresolved token. The call to `findInMap` will return a token that resolves to
`{ "Fn::FindInMap": [ "RegionTable", { "Ref": "AWS::Region" }, "regionName" ] }`.

```ts
regionTable.findInMap(Aws.REGION, 'regionName')
regionTable.findInMap(Aws.REGION, 'regionName');
```

[cfn-mappings]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/mappings-section-structure.html
Expand Down

0 comments on commit 04b476b

Please sign in to comment.