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?
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With