0

I'm trying to use Zappa to deploy a Django event-driven application that will process events based on SQS and Kinesis.

I have the following as part of my zappa.settings file:

"django_settings": "myproject.settings",
"events": [
      {
        "function": "myproject.processor.process_messages",
        "event_source": {
          "arn": "[ARN IS HERE]",
          "batch_size": 10,
          "enabled": true
        }
      }
    ]

When an item is queued via SQS, I am getting the following error from the Lambda: ModuleNotFoundError: No module named 'myproject' Traceback (I also tried dropping the "myproject" from the path and use just "processor", but that resulted in a similar error)

It appears as though the event-based code cannot be invoked if it is part of the Django project. Is this true?

Thanks!

Itay Bleier
  • 41
  • 1
  • 3
  • No, Django based tasks work just fine. Try starting a local django shell and see if you can import your module. Seems some sort of configuration error. – Edgar Apr 21 '20 at 14:49
  • Thanks, can you share an example that works for you? – Itay Bleier Apr 21 '20 at 17:06

0 Answers0