sample code for Amazon Simple Workflow Service