Mitch Garnaat

Adding a really simple python sample.

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