"Internal error running a block" when running a resource query

I found that the issue was with how I was populating the environment variables with !Ref and dropping a built parameter for the cloudmap namespace reference. I needed to use !Sub to reference the cloudmap namespace that it could be looked up properly.

Basically, if I make a parameter called TemporalHost and make it "temporal.retoolsvc-${PostfixTag}", when I use !Ref the ECS service sees this as a string and doesn’t try to make a DNS look up to the cloudmap resource. I was seeing things like https://temporal.retoolsvc-staging:7233 in the logs and knew something wasn’t right. So, instead I just made a parameter for PostfixTag and used !Sub to pass it that way instead and it worked.

Hope this helps someone one day.

1 Like