aws-cloudformation/cloudformation-cli-python-plugin

__init__() missing 1 required positional argument: 'responseEndpoint'

ggiallo28 opened this issue · 3 comments

Hi all,
I'm facing with this issue. Can anyone help me?

Invoking mug_lambda_pythonlayer.handlers.resource (python3.7)

Fetching lambci/lambda:python3.7 Docker container image......
Mounting /home/ec2-user/environment/mug-lambda-python/build as /var/task:ro,delegated inside runtime container
START RequestId: 4a9ecfe1-d657-1b94-42b8-7d2caf4b7da0 Version: $LATEST
[ERROR] 2020-10-10T20:22:31.213Z        4a9ecfe1-d657-1b94-42b8-7d2caf4b7da0    Invalid request
Traceback (most recent call last):
  File "/var/task/cloudformation_cli_python_lib/resource.py", line 142, in _parse_request
    event = HandlerRequest.deserialize(event_data)
  File "/var/task/cloudformation_cli_python_lib/utils.py", line 98, in deserialize
    event = HandlerRequest(**json_data)
TypeError: __init__() missing 1 required positional argument: 'responseEndpoint'
Handler error
Traceback (most recent call last):
  File "/var/task/cloudformation_cli_python_lib/resource.py", line 142, in _parse_request
    event = HandlerRequest.deserialize(event_data)
  File "/var/task/cloudformation_cli_python_lib/utils.py", line 98, in deserialize
    event = HandlerRequest(**json_data)
TypeError: __init__() missing 1 required positional argument: 'responseEndpoint'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/var/task/cloudformation_cli_python_lib/resource.py", line 187, in __call__
    sessions, action, callback, event = self._parse_request(event_data)
  File "/var/task/cloudformation_cli_python_lib/resource.py", line 150, in _parse_request
    raise InvalidRequest(f"{e} ({type(e).__name__})") from e
cloudformation_cli_python_lib.exceptions.InvalidRequest: __init__() missing 1 required positional argument: 'responseEndpoint' (TypeError)
END RequestId: 4a9ecfe1-d657-1b94-42b8-7d2caf4b7da0
REPORT RequestId: 4a9ecfe1-d657-1b94-42b8-7d2caf4b7da0  Init Duration: 493.50 ms        Duration: 8.63 ms       Billed Duration: 100 ms Memory Size: 256 MB   Max Memory Used: 40 MB

In the autogenerated requirements.txt, make sure that you are depending on the 2.1.2 library. We will have to update the code generation so that the version is not pinned.

@jotompki thank you a lot. It worked.