Closed lhenriks closed 1 year ago
I think the best fix here is to not use the stackname at all when naming the OAC resource. There are a few ways in CloudFormation to generate unique identifiers, e.g., we could split the arn of the stack by the /
chracter and use the unique stack identifier, like so:
!Select [2, !Split ['/', !Ref "AWS::StackId"]]
@svozza Yes of course that would be a better option.
We will be releasing a patch version (v2.1.1) in the near future and I will ensure this fix is included.
This has been fixed in v2.1.2, which was released on Tuesday.
Feature name Max. character limit for CloudFormation stack name.
Is your feature request related to a problem? Please describe. Example CloudFront origin access controls setting has a character limit of 64 characters. Now when you define e.g. "aws-workload-discovery-service" as your stack name it will exceed that 64 characters as it includes (appends) also the ${AWS::StackName} into your resource names. End result would be total of 68 characters e.g. "aws-workload-discovery-service-WebUiStack-1HWNXXXXW4UVX-WD-WebUI-OAC" and it will fail to deploy the section "
CloudFrontOac
".Resource handler returned message: "Invalid request provided: AWS::CloudFront::OriginAccessControl" (RequestToken: <uuid>, HandlerErrorCode: InvalidRequest)
Describe the feature you'd like to see implemented Disclaimer into documentation that you should NOT use more than 26 characters for the CF stack name.