hostName is not of type `string matching the pattern

I am deploying an Obsidian Obelisk project. If I understand correctly, this is really a nixops deployment, invoked by ob deploy push.

Now I get an error which doesn’t seem to relate to obelisk at all:

error: The option value `networking.hostName' in `<unknown-file>' is not of type `string matching the pattern ^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$'.

I found this topic where the validation is discussed:

I am still left in the dark what I should do. I am deploying to AWS and as far as I can see, my hostname parameter is the name of my AWS instance, e.g. something like this:

ec2-12-345-67-890.compute-1.amazonaws.com

Your networking.hostName should be ec2-12-345-67-890 and your networking.domain is compute-1.amazonaws.com so that your FQDN equals ec2-12-345-67-890.compute-1.amazonaws.com.