Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to send email from Lambda to SES from within a VPC

I am trying to send email from Lambda to SES.

When I run Lambda in NO VPC mode then email is successfully sent.

But when I assign my VPC it doesn't work.

AWS has VPC endpoint to connect to S3. It same available for SES? Or it is not possible to do so?

like image 794
Lajpat Avatar asked Apr 08 '17 12:04

Lajpat


People also ask

Can Lambda be part of VPC?

By default, Lambda runs your functions in a secure VPC with access to AWS services and the internet. Lambda owns this VPC, which isn't connected to your account's default VPC. When you connect a function to a VPC in your account, the function can't access the internet unless your VPC provides access.

Can Lambda functions access within dedicated tenancy VPCs?

Lambda doesn't support running functions in dedicated tenancy VPCs. To connect a Lambda function to a dedicated VPC, first peer the dedicated VPC to a default tenancy VPC that contains the function. The solution requires using an Amazon Elastic Compute Cloud (Amazon EC2) Dedicated Instance.

Can API gateway connect to Lambda in VPC?

API Gateway provides tools for creating and documenting web APIs that route HTTP requests to Lambda functions. You can secure access to your API with authentication and authorization controls. Your APIs can serve traffic over the internet or can be accessible only within your VPC.


1 Answers

VPC Endpoint is only available for S3 currently, there is plans to roll it out to other services already in flight but not available yet.

As Mentioned the VPC your lambda attaches to must have a route to the internet to connect to SES, the security groups must also allow the traffic to the secure SMTP port.

like image 58
Brent Avatar answered Sep 22 '22 03:09

Brent