Problem
I'm trying to split my python code for a lambda function across multiple files however any attempt to import the other relative modules throws an error for the top level module.
{
"errorMessage": "Unable to import module 'download_ga_data'"
}
What am I doing wrong? This feels like it should be super basic.
File structure layout (shown from root)
- download_ga_data.py
- [analytics]
- google.py (contains a single class)
- __init__.py
- [helpers]
- main.py (contains a single class)
- __init__.py
- {other libraries from site-packages}
Contents of download_ga_data.py
# import unicodecsv as csv
import os
# import path
from . import definitions
from analytics.google import GoogleAnalytics
from helpers.main import GoogleCloudStorageBucket
def lambda_handler(event, context):
print("test")
This as it stands will throw the error. If I comment out the three imports after os, then it will function correctly.
How should I correctly import these two modules, I feel like I'm missing something super basic.
Environment notes
This is all built on a the following lambda mimicking docker and uploaded straight into S3. All the files are 777 to bypass any permissions errors.

from helpers.main import GoogleCloudStorageBucket?