AWS, Docker compose, ecs, Cloud formation: !Ref or !GetAtt not working

When working with docker compose, some Cloud formation functions dont work. For example !Ref or !GetAtt.

Invalid XML ; cvc-maxLength-valid: Value ‘LoadBalancer.CanonicalHostedZoneID’ with length = ’34’ is not facet-valid with respect to maxLength ’32’ for type ‘ResourceId’. (Service: AmazonRoute53; Status Code: 400; Error Code: InvalidInput; Request ID: a6981e1e-5ae6-43e7-8d6b-4543ceaa5d0b; Proxy: null)

everywhere online I was being told to obtain attributes from a loadbalancer service like this

https://github.com/awsdocs/aws-cloudformation-user-guide/blob/main/doc_source/quickref-route53.md

but I kept getting the error above

Doing it this way ended up not giving me that error

Another example

this does not work
this works

Leave a Reply

Your email address will not be published.