You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?