Skip to content

Commit

Permalink
fixing bug in default athena results bucket name, dry out code
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandeivert committed Apr 1, 2020
1 parent bde957f commit c98a66b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion streamalert/shared/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def athena_query_results_bucket(config):

return athena_config.get(
'results_bucket',
'{}.streamalert.athena-results'.format(prefix)
'{}-streamalert-athena-results'.format(prefix)
).strip()


Expand Down
7 changes: 2 additions & 5 deletions streamalert_cli/terraform/athena.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.
"""
from streamalert.shared import metrics
from streamalert.shared.config import athena_partition_buckets
from streamalert.shared.config import athena_partition_buckets, athena_query_results_bucket
from streamalert_cli.manage_lambda.package import AthenaPackage
from streamalert_cli.terraform.common import (
infinitedict,
Expand All @@ -40,10 +40,7 @@ def generate_athena(config):
prefix = config['global']['account']['prefix']
database = athena_config.get('database_name', '{}_streamalert'.format(prefix))

results_bucket_name = athena_config.get(
'results_bucket',
'{}-streamalert-athena-results'.format(prefix)
).strip()
results_bucket_name = athena_query_results_bucket(config)

queue_name = athena_config.get(
'queue_name',
Expand Down

0 comments on commit c98a66b

Please sign in to comment.