Use the Stack ID for the OriginAccessControl.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.
OriginAccessControlConfigresources must have a unique name across all regions for an account. To ensure this, theName` 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.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available: Fixes #67 and #66
Description of changes:
OriginAccessControl.Name
propertyThe template fails to deploy when the stack name is longer than 64 characters. The
OriginAccessControlConfig
resource fails to create, with a genericInvalidRequest
error. TheName
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.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.