title: Why does my Lambda function timeout connecting to SES VPC Endpoint?
body: <p><a href="https://aws.amazon.com/blogs/aws/new-amazon-simple-email-service-ses-for-vpc-endpoints/" rel="noreferrer">Since April 2020</a>, AWS supports VPC endpoints for SES (Simple Email Service.)  Despite this,  I cannot get a Lambda to communicate with SES using the endpoint.  It always times out.  Perhaps this is because the SES VPC Endpoints are only supported for EC2 instances in the VPC and not for Lambdas?</p>
  <p>I have my infrastructure describe using Terraform, as described in <a href="https://gist.github.com/carlgieringer/b4ccca1e5f1c6a7b91cc4215b78595f2" rel="noreferrer">this gist</a>.  <a href="https://gist.github.com/carlgieringer/b4ccca1e5f1c6a7b91cc4215b78595f2#file-ses_lambda-tf" rel="noreferrer"><code>ses_lambda.tf</code></a> defines the infrastructure and basically implements <a href="https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-set-up-vpc-endpoints.html" rel="noreferrer">this guide</a>.  <a href="https://gist.github.com/carlgieringer/b4ccca1e5f1c6a7b91cc4215b78595f2#file-sestest-js" rel="noreferrer"><code>sesTest.js</code></a> is my Lambda function. <a href="https://gist.github.com/carlgieringer/b4ccca1e5f1c6a7b91cc4215b78595f2#file-terraform-show-out" rel="noreferrer"><code>terraform-show.out</code></a> shows the result of <code>terraform show</code> limited just to the resources defined by <code>ses_lambda.tf</code>.</p>
  <p>As you can see in <code>ses_lambda.tf</code>, the SES Endpoint's security group allows all traffic on any SMTP port (25, 465, 587, 2465, or 2587) from any IP in the VPC's CIDR block.  So I'm confused about why this doesn't work...</p>