I have a problem with deploying a code on AWS Lambda, the information in my environment is:
The name of my folder is TestCassandra
The name of my file is main.py
The name of my handler is main.handler
The Runtime of my code is Python 3.6
MY CODE:
#!/usr/bin/python
# -*- coding: latin-1 -*-
import os
import subprocess
def main.handler(event, context):
def rodando(processo):
try:
subprocess.check_output('ps ax | grep {}| grep -v grep \
'.format(processo),shell=True)
except Exception:
return 0
return 1
if rodando('+service'):
print ('up!')
else:
print ('down')
I'm taking the error:
Response:
{
"errorMessage": "Handler 'handler' missing on module 'main'"
}
Can someone help me or know how to solve it?
Regard,