Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

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

@tgjorgoski

Description

@tgjorgoski

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 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions