Closed
Description
issue in examples/aws-python-rest-api-with-dynamodb
POST - https://<my-endpoint-guid>.execute-api.us-east-1.amazonaws.com/dev/todos
returns Internal Server Error
in HTTP response.
Cloudwatch logs for the Lambda function indicate:
'datetime.datetime' object has no attribute 'timestamp': AttributeError
Traceback (most recent call last):
File "/var/task/todos/create.py", line 18, in create
timestamp = str(datetime.utcnow().timestamp())
AttributeError: 'datetime.datetime' object has no attribute 'timestamp'
Was able to reproduce locally on Python 2.7 (same as lambda runtime). Not sure if/how this code ever worked?
PR to follow...
Metadata
Metadata
Assignees
Labels
No labels