Someone Else's Puzzle

The cloud is just someone else's computer. Part of that adage I find fascinating is understanding how that “computer” is set up. Sometimes it's not configured how you expect it to be.

I've been recently looking at AWS Systems Manager Run Command. It's supposed to work exactly as it sounds — letting you run commands on your managed instances. Well, sort of. I wanted to use Run Command to run a Python program. What appeared to be simple in execution turned into complications that turned into hours of troubleshooting.

The snag? AWS couldn't pick up on a configuration file on the instance that I needed for the Python program to work with Run Command. Turns out that the root user's Python configuration is different than the user I set up the program on. And what user does Run Command execute the script with? Root.

What to do? Thankfully M. Gleria on Stack Overflow led me to the wonderful command runuser utility which, well, let's you run a command as a particular user. This allowed me to get around how root configured Python since I was running the program as the user whose Python setup I wanted to use. That did the trick.

Such a workaround that I didn't expect to use in the first place. It's that part of the cloud being someone else's computer that I take as more of a puzzle than an inconvenience. Of course that puzzle aspect of using cloud providers can easily sway to inconvenience, but it's a balancing act I find intriguing.