Skip to content

Commit 98d17ab

Browse files
committed
Merge branch 'quiqua-update_handler'
* quiqua-update_handler: bump version number from 0.1.11 to 0.2.1 to be compliant with PyPI Upgrade requirements Update function configuration after deploy
2 parents 6eb0cbf + 5338059 commit 98d17ab

File tree

6 files changed

+25
-9
lines changed

6 files changed

+25
-9
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ help:
44
@echo "release - package and upload a release"
55
@echo "install - install the package to the active Python's site-packages"
66

7-
clean: clean-build clean-pyc
7+
clean: clean-build clean-pyc clean-merge
88

99
clean-build:
1010
rm -fr build/
@@ -19,6 +19,9 @@ clean-pyc:
1919
find . -name '*~' -exec rm -f {} +
2020
find . -name '__pycache__' -exec rm -fr {} +
2121

22+
clean-merge:
23+
find . -name '*.orig' -exec rm -f {} +
24+
2225
lint:
2326
flake8 python-lambda tests
2427

aws_lambda/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# flake8: noqa
33
__author__ = 'Nick Ficano'
44
__email__ = '[email protected]'
5-
__version__ = '0.2.0'
5+
__version__ = '0.2.1'
66

77
from .aws_lambda import deploy, invoke, init, build
88

aws_lambda/aws_lambda.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ def update_function(cfg, path_to_zip_file):
273273
aws_access_key_id = cfg.get('aws_access_key_id')
274274
aws_secret_access_key = cfg.get('aws_secret_access_key')
275275

276+
account_id = get_account_id(aws_access_key_id, aws_secret_access_key)
277+
role = get_role_name(account_id, cfg.get('role', 'lambda_basic_execution'))
278+
276279
client = get_client('lambda', aws_access_key_id, aws_secret_access_key,
277280
cfg.get('region'))
278281

@@ -282,6 +285,15 @@ def update_function(cfg, path_to_zip_file):
282285
Publish=True
283286
)
284287

288+
client.update_function_configuration(
289+
FunctionName=cfg.get('function_name'),
290+
Role=role,
291+
Handler=cfg.get('handler'),
292+
Description=cfg.get('description'),
293+
Timeout=cfg.get('timeout', 15),
294+
MemorySize=cfg.get('memory_size', 512)
295+
)
296+
285297

286298
def function_exists(cfg, function_name):
287299
"""Check whether a function exists or not"""

requirements.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
boto3==1.3.0
2-
botocore==1.4.7
3-
click==6.4
1+
boto3==1.3.1
2+
botocore==1.4.32
3+
click==6.6
44
docutils==0.12
55
futures==3.0.5
66
jmespath==0.9.0
77
pyaml==15.8.2
8-
python-dateutil==2.5.1
8+
python-dateutil==2.5.3
9+
python-lambda==0.2.0
910
PyYAML==3.11
10-
six==1.10.0
11+
six==1.10.0

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.2.0
2+
current_version = 0.2.1
33
commit = True
44
tag = True
55

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
setup(
2323
name='python-lambda',
24-
version='0.2.0',
24+
version='0.2.1',
2525
description="The bare minimum for a Python app running on Amazon Lambda.",
2626
long_description=readme + '\n\n' + history,
2727
author="Nick Ficano",

0 commit comments

Comments
 (0)