From 549dc7cc5fd93020037238539f78c8670296c08b Mon Sep 17 00:00:00 2001 From: Ryan Deivert Date: Tue, 21 Aug 2018 15:56:54 -0700 Subject: [PATCH] [athena] fixing logger format string and using lambda alias for invocation --- stream_alert/athena_partition_refresh/main.py | 2 +- terraform/modules/tf_stream_alert_athena/main.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stream_alert/athena_partition_refresh/main.py b/stream_alert/athena_partition_refresh/main.py index d5b266301..7a5c1d7db 100644 --- a/stream_alert/athena_partition_refresh/main.py +++ b/stream_alert/athena_partition_refresh/main.py @@ -175,7 +175,7 @@ def run(self, event): ) for sqs_rec in event['Records']: - LOGGER.debug('Processing event with message ID \'%s\' and SentTimestamp %d', + LOGGER.debug('Processing event with message ID \'%s\' and SentTimestamp %s', sqs_rec['messageId'], sqs_rec['attributes']['SentTimestamp']) diff --git a/terraform/modules/tf_stream_alert_athena/main.tf b/terraform/modules/tf_stream_alert_athena/main.tf index bbc3f0c16..589db450e 100644 --- a/terraform/modules/tf_stream_alert_athena/main.tf +++ b/terraform/modules/tf_stream_alert_athena/main.tf @@ -99,7 +99,7 @@ resource "aws_sqs_queue_policy" "streamalert_athena_data_bucket_notifications" { resource "aws_lambda_event_source_mapping" "streamalert_athena_sqs_event_source" { event_source_arn = "${aws_sqs_queue.streamalert_athena_data_bucket_notifications.arn}" - function_name = "${aws_lambda_function.athena_partition_refresh.arn}" + function_name = "${aws_lambda_function.athena_partition_refresh.arn}:${aws_lambda_alias.athena_partition_refresh_production.name}" } // S3 Bucekt Notificaiton: Configure S3 to notify Lambda