my python code is not working on Lambda which actully works well when I run it from my local python environment. Whenever I try to create SES object on Lambda function, I get this error:
Response:
{
"errorMessage": "Unable to import module 'lambda_function'"
}
Here's my code:
def lambda_handler(event, context):
connection = boto.ses.connect_to_region('us-east-1')
return connection.send_email(
from_addr,
subject,
None,
to,
format= format,
text_body=text,
html_body=html
)
Is it something related to boto.ses
not being supported over lambda and I have to use boto3 instead??
This lambda function contains multiple part and at the end I have to create SES object to send mail to my client, but when I try to do that I'm getting this error