Commit 0982d8f
authored
Use Stack ID for OriginAccessControl.Name property (#69)
* Add link to repo in template description
* Derive OACConfig name from StackId
* Bump version
Use the Stack ID for the `OriginAccessControlConfig.Name` property.
The template fails to deploy when the stack name is longer than 64 characters. The `OriginAccessControlConfig` resource fails to create, with a generic `InvalidRequest` error. The `Name` property has. a max length of 64 characters.
The OriginAccessControlConfig.Name property was set to `!Sub 'oac-${AWS::StackName}-${AWS::Region}'`. For sufficiently long stack names (including the default stack name), this triggered the bug described above.
`OriginAccessControlConfig` resources must have a unique `Name` across all regions for an account. To ensure this, the `Name` property was derived from both the StackName and Region. The max length of a stack name is 128 characters. This is longer than the 64 characters allowed by the OACConfig Name property.1 parent dbf7334 commit 0982d8f
2 files changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
16 | | - | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
0 commit comments