Merge pull request #890 from gene1wood/fix-connect_sqs-mismatch-with-esworker_cloudtrail

Change connect_sqs parameter names to match boto
This commit is contained in:
Brandon Myers 2018-10-26 17:34:12 -05:00 коммит произвёл GitHub
Родитель ff6070af6b 22398eab5d
Коммит e00a84a86c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -3,8 +3,8 @@ import boto
import boto.utils import boto.utils
def connect_sqs(region=None, access_key=None, secret_key=None, def connect_sqs(region=None, aws_access_key_id=None,
task_exchange=None): aws_secret_access_key=None, task_exchange=None):
if region is None: if region is None:
try: try:
# connect_sqs defaults to us-east-1 instead of the local region # connect_sqs defaults to us-east-1 instead of the local region
@ -16,10 +16,10 @@ def connect_sqs(region=None, access_key=None, secret_key=None,
"MozDef isn't running in AWS") "MozDef isn't running in AWS")
credentials = {} credentials = {}
if access_key is not None: if aws_access_key_id is not None:
credentials['aws_access_key_id'] = access_key credentials['aws_access_key_id'] = aws_access_key_id
if secret_key is not None: if aws_secret_access_key is not None:
credentials['aws_secret_access_key'] = secret_key credentials['aws_secret_access_key'] = aws_secret_access_key
conn = sqs.connect_to_region( conn = sqs.connect_to_region(
region_name=region, region_name=region,
**credentials **credentials