datetime.datetime is not JSON serializable when calling UpdateTokenFunction

Issue #5 resolved
Captain Crabby created an issue

I created a token and then immediately tried to update it and received an error message (note I omitted the access key id):

aws lambda invoke --function-name AddTokenFunction --payload '{"Location":"Test credentials", "Owner":"Jane Smith", "Notes":"Generated manually", "ExpiresAt":"2019-01-01 00:00:00" }' /tmp/out.txt { "ExecutedVersion": "$LATEST", "StatusCode": 200 }

cat /tmp/out.txt

aws lambda invoke --function-name UpdateTokenFunction --payload '{ "AccessKeyId":"...", "Location":"Test credentials", "Owner":"Jane Smith", "Notes":"Updated by Jane", "ExpiresAt":"2019-01-01 00:00:00" }' /tmp/out.txt { "ExecutedVersion": "$LATEST", "StatusCode": 200 }

cat /tmp/out.txt

Comments (2)

  1. danb

    I suspect, but can't prove anymore, because I've got a new stack, that the update was successfully completed, but the error occurred on json serialising the results. Anyway. It's fixed now!

  2. Log in to comment