Mitch Garnaat

Resolving merge conflict.

......@@ -40,6 +40,9 @@ Where ``command`` is one of:
The ``config file`` is a YAML format file containing all of the information
about your Lambda function.
If you use environment variables for your AWS credentials (as normally supported by boto),
simply exclude the ``profile`` element from the YAML file.
An example project based on a Kinesis stream can be found in
[samples/kinesis](https://github.com/garnaat/kappa/tree/develop/samples/kinesis).
......@@ -56,4 +59,4 @@ The basic workflow is:
* Run ``kappa --config <path-to-config> tail`` to see more output
If you have to make changes in your function or in your IAM roles, simply run
``kappa deploy`` again and the changes will be uploaded as necessary.
\ No newline at end of file
``kappa deploy`` again and the changes will be uploaded as necessary.
......
......@@ -22,6 +22,7 @@ LOG = logging.getLogger(__name__)
class Stack(object):
completed_states = ('CREATE_COMPLETE', 'UPDATE_COMPLETE')
failed_states = ('ROLLBACK_COMPLETE')
def __init__(self, context, config):
self._context = context
......@@ -91,6 +92,9 @@ class Stack(object):
LOG.debug('Stack status is: %s', status)
if status in self.completed_states:
done = True
if status in self.failed_states:
msg = 'Could not create stack %s: %s' % (self.name, status)
raise ValueError(msg)
def create(self):
LOG.debug('create_stack: stack_name=%s', self.name)
......