jegesh / python-sqs-listener

A simple wrapper for boto3 for listening, and sending, to an AWS SQS queue
Other
154 stars 72 forks source link

Having difficulty listening to a queue. #28

Closed npsoni88 closed 5 years ago

npsoni88 commented 5 years ago

Hello,

As part of my POC, I am pushing /var/log/auth.log of a couple of servers to an SQS queue. Now, I want to be able to listen to them so that I know exactly what is being pushed. I am using the following code as a python script and it throws different errors, the latest one was "no logger found". Can you please advise?

from sqs_listener import SqsListener

class MyListener(SqsListener):
    def handle_message(self, body, attributes, messages_attributes):
        run_my_function(body['data'], body['SenderId'])

listener = MyListener('my-queue-name', region_name='us-east-1')
listener.listen()

Also, AWS_ACCOUNT_ID is exported and is not a part of the problem.

jegesh commented 5 years ago

Please post the entire stacktrace