Toggle navigation
Toggle navigation
This project
Loading...
Sign in
서승완
/
kappa
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Mitch Garnaat
2014-11-30 05:58:01 -0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d8901fc1122d574e8c871ef771d35986f16e0af4
d8901fc1
1 parent
76ca1a2a
Updating the S3 example and fixing a bug in the way directories are zipped for upload to Lambda.
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
bin/kappa
kappa/__init__.py
samples/s3/config.yml
bin/kappa
View file @
d8901fc
...
...
@@ -69,6 +69,7 @@ def main(config=None, debug=False, command=None):
if
command
==
'deploy'
:
click
.
echo
(
'Deploying ...'
)
kappa
.
deploy
()
click
.
echo
(
'...done'
)
elif
command
==
'test'
:
click
.
echo
(
'Sending test data ...'
)
kappa
.
test
()
...
...
kappa/__init__.py
View file @
d8901fc
...
...
@@ -91,7 +91,7 @@ class Kappa(object):
def
_zip_lambda_dir
(
self
,
zipfile_name
,
lambda_dir
):
LOG
.
debug
(
'_zip_lambda_dir: lambda_dir=
%
s'
,
lambda_dir
)
LOG
.
debug
(
'zipfile_name=
%
s'
,
zipfile_name
)
relroot
=
os
.
path
.
abspath
(
os
.
path
.
join
(
lambda_dir
,
os
.
pardir
)
)
relroot
=
os
.
path
.
abspath
(
lambda_dir
)
with
zipfile
.
ZipFile
(
zipfile_name
,
'w'
)
as
zf
:
for
root
,
dirs
,
files
in
os
.
walk
(
lambda_dir
):
zf
.
write
(
root
,
os
.
path
.
relpath
(
root
,
relroot
))
...
...
samples/s3/config.yml
View file @
d8901fc
...
...
@@ -10,13 +10,13 @@ lambda:
name
:
S3Sample
zipfile_name
:
S3Sample.zip
description
:
Testing S3 Lambda handler
path
:
examplefolder
path
:
examplefolder
/
handler
:
CreateThumbnail.handler
runtime
:
nodejs
memory_size
:
128
timeout
:
3
mode
:
event
test_data
:
input.json
event_source
:
arn:aws:s3:::
garnaat_pub
event_source
:
arn:aws:s3:::
sourcebucket
s3_events
:
-
s3:ObjectCreated:*
\ No newline at end of file
...
...
Please
register
or
login
to post a comment