IIUC, the python command python -c "import setup; setup.as_lambda_function()" doesn't run the lambda function, it just deploys it. The error seems to be at this part of the code:
So it seems the event doesn't contain the resources key? Has anyone else encoutered this? I ran it with the "-l" option to show the logs, so it seems like it is able to log in for me and search the dates,
I get the following error when I try to use serverless invoke --function main to run it
{ "errorMessage": "'resources'", "errorType": "KeyError", "requestId": "39a91904-4d5d-4ac8-853f-2a703e819462", "stackTrace": [ " File \"/var/task/handler.py\", line 17, in lambda_handler\n event_arn = event[\"resources\"][0]\n" ] }
IIUC, the python command python -c "import setup; setup.as_lambda_function()" doesn't run the lambda function, it just deploys it. The error seems to be at this part of the code:
https://github.com/dvalbuena1/visa_rescheduler_aws/blob/main/handler.py#L16
So it seems the event doesn't contain the resources key? Has anyone else encoutered this? I ran it with the "-l" option to show the logs, so it seems like it is able to log in for me and search the dates,