jeudi 25 juin 2015

How do I run a command from within a python VirtualEnvt in my Cloudformation template's UserData section?

Below is the python UserData script for my host from my Cloudformation template.

I have a python virtual environment on this host: /home/myUser/myVirtualEnv. Suppose I need this UserData to run a command (/home/myUser/myCommand) from within that virtual environment. What do I insert into this UserData script to make that happen?

"UserData": {
  "Fn::Base64": {
    "Fn::Join": [
      "",
      [
        "#!/usr/bin/python\n",
        "print 'Hello World!'\n",
      ]
    ]
  }
}




Aucun commentaire:

Enregistrer un commentaire