Mitch Garnaat

Cleaning up a few small things.

The Config File
===============
The config file is at the heart of kappa. It is what describes your functions
and drives your deployments. This section provides a reference for all of the
elements of the kappa config file.
Example
-------
Here is a simple example config file from the sample/simple directory::
---
name: foobar
environments:
dev:
profile: fiebaz-dev
region: us-west-2
policy:
arn: arn:aws:iam::aws:policy/service-role/AWSLambdaRole
prod:
profile: fiebaz-prod
region: us-west-2
policy:
arn: arn:aws:iam::aws:policy/service-role/AWSLambdaRole
lambda:
description: A simple Python Lambda example
path: code/
handler: foobar.handler
runtime: python2.7
memory_size: 256
timeout: 3
test_data: input.json
This config file is defining
......@@ -189,7 +189,7 @@ class RestApi(object):
def create_methods(self):
resource_config = self._config['resource']
for method in resource_config.get('methods', dict()):
if not self.method_exists():
if not self.method_exists(method):
method_config = resource_config['methods'][method]
self.create_method(method, method_config)
......@@ -253,7 +253,7 @@ class RestApi(object):
resourceId=self.resource_id)
LOG.debug(response)
except ClientError:
LOG.exception('Unable to delete resource ', self.resource_name)
LOG.exception('Unable to delete resource %s', self.resource_name)
return response
def status(self):
......
......@@ -42,10 +42,10 @@ def _post(event, context):
def _put(event, context):
data = _get(event, context)
id = data.get('id')
id_ = data.get('id')
data.update(event['json_body'])
# don't allow the id to be changed
data['id'] = id
data['id'] = id_
table.put_item(Item=data)
return data
......