Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: When using layer is noDeploy option respected? #577

Open
tgjorgoski opened this issue Dec 13, 2020 · 6 comments
Open

Question: When using layer is noDeploy option respected? #577

tgjorgoski opened this issue Dec 13, 2020 · 6 comments

Comments

@tgjorgoski
Copy link

tgjorgoski commented Dec 13, 2020

I ask because I have the following configuration, which works fine:

custom:
  pythonRequirements:
    useStaticCache: false # set to false, to force update
    noDeploy:
      - botocore
      - boto3
      - botostubs
      - typing # imorted from a specific library creates issues with python3.8 
    dockerizePip: true
    slim: true
    strip: false

And things work fine, however if I add
layer: true
It seems that I'm getting the error from the typing library.

Here is the error:

{"errorMessage": "type object 'Callable' has no attribute '_abc_registry'", "errorType": "AttributeError", "stackTrace": [" File "/var/lang/lib/python3.8/imp.py", line 234, in load_module\n return load_source(name, filename, file)\n", " File "/var/lang/lib/python3.8/imp.py", line 171, in load_source\n module = _load(spec)\n", " File "", line 702, in _load\n", " File "", line 671, in _load_unlocked\n", " File "", line 783, in exec_module\n", " File "", line 219, in _call_with_frames_removed\n", " File "/var/task/handler.py", line 5, in \n import rsa\n", " File "/opt/python/rsa/init.py", line 24, in \n from rsa.key import newkeys, PrivateKey, PublicKey\n", " File "/opt/python/rsa/key.py", line 35, in \n import typing\n", " File "/opt/python/typing.py", line 1359, in \n class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):\n", " File "/opt/python/typing.py", line 1007, in new\n self._abc_registry = extra._abc_registry\n"]}

(BTW, I also specify the required changes to the lambda, so it is using the layer:

layers:
      - { Ref: PythonRequirementsLambdaLayer }
@markkvdb
Copy link

+1 for visibility

@gregoryjose
Copy link

+1

2 similar comments
@ghost
Copy link

ghost commented Nov 17, 2021

+1

@haguirrear
Copy link

+1

@FMurray
Copy link

FMurray commented Jan 27, 2022

+1. My zipped layer is too big since it's not respecting the noDeploy option and including very large packages (botocore, etc.) that are already available on lambda

@emann
Copy link

emann commented Mar 29, 2023

I've also hit this wall - would be great if the above PR (#759) could be reviewed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants