Mitch Garnaat

Adding a really simple python sample.

......@@ -154,6 +154,8 @@ class Function(object):
m.update(str(self.timeout))
config_md5 = m.hexdigest()
cached_md5 = self._context.get_cache_value('config_md5')
LOG.debug('config_md5: %s', config_md5)
LOG.debug('cached_md5: %s', cached_md5)
if config_md5 != cached_md5:
self._context.set_cache_value('config_md5', config_md5)
changed = True
......
.kappa/
kappa.yml
*.zip
The Code Is Here!
=================
Installing Dependencies
-----------------------
Put all dependencies in the `requirements.txt` file in this directory and then
run the following command to install them in this directory prior to uploading
the code.
$ pip install -r requirements.txt -t /full/path/to/this/code
This will install all of the dependencies inside the code directory so they can
be bundled with your own code and deployed to Lambda.
The ``setup.cfg`` file in this directory is required if you are running on
MacOS and are using brew. It may not be needed on other platforms.
import logging
LOG = logging.getLogger()
LOG.setLevel(logging.DEBUG)
def handler(event, context):
LOG.debug(event)
return {'status': 'success'}
{
"foo": "bar",
"fie": "baz"
}
---
name: kappa-simple
environments:
dev:
profile: <your profile here>
region: <your region here>
policy:
resources:
- arn: arn:aws:logs:*:*:*
actions:
- "*"
prod:
profile: <your profile here>
region: <your region here>
policy:
resources:
- arn: arn:aws:logs:*:*:*
actions:
- "*"
lambda:
description: A very simple Kappa example
handler: simple.handler
runtime: python2.7
memory_size: 128
timeout: 3
\ No newline at end of file