Requirement:

Sending mail via SMTP(only via SMTP for specific reason) to the user which is read through event "RunInstances" from cloud-trail.
As SMTP code is not working with lambda I will have to kept inside EC2 and trigger it through lambda.
There are few options:

Use SQS: Use Lambda to send messages to SQS, add workers in your EC2s to consume the messages.
Create a server in EC2 that listens to traffic from a port, for example: 80. Use Lambda to send HTTP requests to the EC2 server.
(Not recommended for this case): Use Step Function Activity. Lambda to call step function, passes the input which is email content. The step function will run and create an activity. The EC2 instance will then have a worker implemented that keep polling activities from the Step function.
Is there any way to trigger code inside EC2 from Lambda?