For reference by any future novices who might stumble across this thread (and for the morbid curiosity of anyone on the list), here's the shell script I've generated to solve this challenge in an AWS EC2 environment:
David, thank you as well - that article is fantastic. I'll give this a whirl, but on its face it looks like exactly the solution we're after. That approach to embedded the env var for the service is new to me - addresses a complete blank in my knowledge.