Skip to content

Commit

Permalink
Add config option for dead letter queue
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuck Logan Lim committed Mar 23, 2017
1 parent 9c2d06d commit 8981283
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions zappa/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ def deploy(self):
handler=self.lambda_handler,
description=self.lambda_description,
vpc_config=self.vpc_config,
dead_letter_config=self.dead_letter_config,
timeout=self.timeout_seconds,
memory_size=self.memory_size
)
Expand Down Expand Up @@ -1613,6 +1614,7 @@ def load_settings(self, settings_file=None, session=None):
# Load environment-specific settings
self.s3_bucket_name = self.stage_config.get('s3_bucket', "zappa-" + ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(9)))
self.vpc_config = self.stage_config.get('vpc_config', {})
self.dead_letter_config = self.stage_config.get('dead_letter_config', {})
self.memory_size = self.stage_config.get('memory_size', 512)
self.app_function = self.stage_config.get('app_function', None)
self.exception_handler = self.stage_config.get('exception_handler', None)
Expand Down
6 changes: 4 additions & 2 deletions zappa/zappa.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,8 @@ def create_lambda_function( self,
timeout=30,
memory_size=512,
publish=True,
vpc_config=None
vpc_config=None,
dead_letter_config=None
):
"""
Given a bucket and key of a valid Lambda-zip, a function name and a handler, register that Lambda function.
Expand All @@ -722,7 +723,8 @@ def create_lambda_function( self,
Timeout=timeout,
MemorySize=memory_size,
Publish=publish,
VpcConfig=vpc_config
VpcConfig=vpc_config,
DeadLetterConfig=dead_letter_config
)

return response['FunctionArn']
Expand Down

0 comments on commit 8981283

Please sign in to comment.