jorgebastida / jorgebastida/gordon
How to make use of common re-usable code with Gordon
- Dominant language
- Python
- Stars
- 2k
- Forks
- 132
- PR merge metrics
- No merged PRs in 30d
Description
See attached images below. I'm trying to make use of a common sibling directory, "group" for my 3 different lambda functions: post, get, get_detail. I'm just testing post now just trying to get simple example of importing of sibling directory references in Python. Looking at build of post by Gordon, it appears its not sucking in the relative references that would be needed to be part of build to make this code work in AWS Lambda. Error I get by AWS is "module initialization error: Attempted relative import in non-package". You can see in the screenshot that I unzipped the group_post.zip file and its missing the relative reference as it seems that Gordon only builds out one directory that encapsulates the code.py lambda file.

Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the top-level settings shown in the issue and reproduce the post Lambda build using the shared sibling directory named group. Inspect group_post.zip and the AWS Lambda import error; the work is done when the generated archive contains the required shared code and the relative import works in Lambda.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- build-system, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100