Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change aws_lambda hook handler to use proper parameters #297

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions stacker/hooks/aws_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def _upload_function(s3_conn, bucket, name, options):
return _upload_code(s3_conn, bucket, name, zip_contents)


def upload_lambda_functions(region, namespace, mappings, parameters, **kwargs):
def upload_lambda_functions(context, provider, **kwargs):
"""Builds Lambda payloads from user configuration and uploads them to S3.

Constructs ZIP archives containing files matching specified patterns for
Expand Down Expand Up @@ -409,13 +409,12 @@ def create_template(self):
"""
bucket = kwargs.get('bucket')
if not bucket:
context = kwargs['context']
bucket = context.bucket_name
logger.info('lambda: using default bucket from stacker: %s', bucket)
else:
logger.info('lambda: using custom bucket: %s', bucket)

session = boto3.Session(region_name=region)
session = boto3.Session(region_name=provider.region)
s3_conn = session.client('s3')

_ensure_bucket(s3_conn, bucket)
Expand Down