Using SES in Glue Job and VPC

0

Hi,

I have a glue job and used SES to send email from glue job, and my python client = boto3.client('ses', region_name=<AWS region>)

VPC Endpoint Service Name : com.amazonaws.<AWS region>1.email-smtp

Getting Connect timeout on endpoint URL: "https://email.<AWS region>.amazonaws.com/"for ses.

<AWS region> is my region

Could you please help me to resolve the issue

Bharath
asked 8 days ago152 views
1 Answer
1

Hello.

Is your Glue Job connected to the same VPC as your VPC endpoint?
https://docs.aws.amazon.com/glue/latest/dg/start-connecting.html

Also, does the VPC endpoint's security group allow SMTPS connections from the security group used by Glue Job?
Specifically, the following inbound rules must be set in the security group of the VPC endpoint.
https://docs.aws.amazon.com/ses/latest/dg/send-email-set-up-vpc-endpoints.html
https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html#prerequisites-interface-endpoints

TypeProtocolPortSource
SMTPSSMTPSTCP465Glue Job Security Group
profile picture
EXPERT
answered 8 days ago
profile picture
EXPERT
reviewed 7 days ago
  • Thank you so much for the input. We already have the inbound rule with below details. Do we still need to add new rule with specific values - Type as HTTPS, Protocol as TCP and etc ? Type All traffic Protocol All Port range All

  • I see, there seems to be no problem with the security group settings. So, is Glue Job tied to VPC?

  • By the way, how do you send emails in the Glue Job code? Amazon SES's VPC endpoint can send mail using the SMTP endpoint, but it cannot send mail using the Amazon SES API (SDK, etc.). https://docs.aws.amazon.com/ses/latest/dg/send-email-set-up-vpc-endpoints.html
    If you are sending email using AWS SDK, you need to set up a NAT Gateway instead of a VPC endpoint.

  • As of July 2024, you cannot use boto3 to send emails using Amazon SES's VPC endpoint. The currently provided VPC endpoints are for SMTP endpoints. If you are using boto3 please set up a NAT Gateway.