Skip to content

Commit

Permalink
Fixing issue #34
Browse files Browse the repository at this point in the history
  • Loading branch information
lucioveloso committed Jul 19, 2017
1 parent 5b3db1e commit 1093837
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lambda_toolkit/data/lambda-toolkit.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
"list-aws": [],
"list-all": [],
"undeploy": [ "projectname" ],
"deploy": [ "projectname", "rolename" ],
"deploy": [ "projectname" ],
"create": [ "projectname" ],
"list": [],
"import-all": [],
"undeploy-all": [],
"import": [ "projectname" ],
"deploy-all": [ "rolename" ],
"deploy-all": [],
"delete": [ "projectname" ],
"delete-all": [],
"check-regions-delay": [],
Expand Down
6 changes: 5 additions & 1 deletion lambda_toolkit/modules/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ def deploy_project(self):
)
self.log.info("Lambda project " + self.projectname + " was redeployed.")
else:
if 'rolename' not in self.kwargs:
self.log.warn("Project '" + self.project +
"' is new. The parameter --rolename is required. Skipping.")
return self.conf

self.conf.get_boto3("lambda", "client").create_function(
FunctionName=self.projectname,
Runtime=self.conf.projects[self.projectname]['runtime'],
Expand All @@ -175,7 +180,6 @@ def deploy_project(self):
self.log.error(str(e))
self.log.critical("Failed to deploy the lambda project.")

#os.remove(self.project_zip_file)
return self.conf

def undeploy_project(self):
Expand Down

0 comments on commit 1093837

Please sign in to comment.