diff --git a/django_q/brokers/aws_sqs.py b/django_q/brokers/aws_sqs.py index 111e631f..d33800f6 100644 --- a/django_q/brokers/aws_sqs.py +++ b/django_q/brokers/aws_sqs.py @@ -51,9 +51,12 @@ def info(self): @staticmethod def get_connection(list_key=Conf.PREFIX): - return Session(aws_access_key_id=Conf.SQS['aws_access_key_id'], - aws_secret_access_key=Conf.SQS['aws_secret_access_key'], - region_name=Conf.SQS['aws_region']) + config = Conf.SQS + if 'aws_region' in config: + config['region_name'] = config['aws_region'] + del(config['aws_region']) + return Session(**config) + def get_queue(self): self.sqs = self.connection.resource('sqs') diff --git a/docs/configure.rst b/docs/configure.rst index 66136f43..9dddc1e2 100644 --- a/docs/configure.rst +++ b/docs/configure.rst @@ -229,7 +229,7 @@ All connection keywords are supported. See the `iron-mq