title: Automating Opsworks: How do you execute recipes?
body: <p>I'm using the awscli to try to automate a deployment process (upload cookbook changes to s3, click stuff to update cookbooks, click stuff to run a recipie, type in the name of the recipe i want to execute).</p>
  
  <p>I'm really close, but I can't find anything about how to actually execute a given recipe in opsworks through the awscli.  I figure it must be awfully close to updating custom cookbooks:</p>
  
  <pre><code>$ aws opsworks create-deployment --command "{\"Name\":\"update_custom_cookbooks\"}"  --stack-id xxxxx --instance-ids xxxxxxxxx
  xxxxxxxx #deployment id
  </code></pre>
  
  <p>The documentation doesn't tell me what the format is for the 'execute_recipes' command: <a href="http://docs.aws.amazon.com/cli/latest/reference/opsworks/create-deployment.html" rel="nofollow">http://docs.aws.amazon.com/cli/latest/reference/opsworks/create-deployment.html</a></p>
  
  <p>After sending it a bunch of guesses and using the gloriously insightful "Invalid value", SerializationException, and ValidationExceptions I have deduced that the following is probably close to what I want:</p>
  
  <pre><code>$ aws opsworks create-deployment --command "{\"Name\":\"execute_recipes\", \"Args\":{\"Recipes\":[\"book::recipe\"]}}"  --stack-id xxxxxx --instance-ids xxxxxxxx                                                                                                                                 
  A client error (ValidationException) occurred
  </code></pre>
  
  <p>What is the correct JSON schema for getting Opsworks to execute a recipe on a given instance?</p>