Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send email via SES VPCEndpoint #181

Closed
tim-finnigan opened this issue Jan 28, 2022 · 3 comments
Closed

Send email via SES VPCEndpoint #181

tim-finnigan opened this issue Jan 28, 2022 · 3 comments
Assignees
Labels
feature-request New feature or request ses

Comments

@tim-finnigan
Copy link

Original issue: boto/boto3#2432

VPC Endpoints for SES were announced recently.

However, if you try to send an email via boto3 SES, the client will use the default URL (email.eu-west-1.amazonaws.com), which > doesn't connect to the VPC Endpoint (it will time out because there is no route to it in the private subnet)

To connect to the VPC Endpoint, we have to use a URL like 'email-smtp.eu-west-1.amazonaws.com' (the private DNS name of the > endpoint)

However, if you specify this URL in the endpoint_url param to the Boto3 constructor, it will fail with:

Invalid endpoint: email-smtp.eu-west-1.amazonaws.com

Describe the solution you'd like

I would like to be able to send email via the VPC Endpoint, which I suspect will mean being able to override the endpoint_url.

If I have misunderstood anything regarding usage of boto3, then please do clarify.

@tim-finnigan tim-finnigan added feature-request New feature or request ses labels Jan 28, 2022
@tim-finnigan tim-finnigan self-assigned this Jan 28, 2022
@tim-finnigan
Copy link
Author

P59082819

@tim-finnigan
Copy link
Author

I just received an update from the SES team. They said there is currently a feature request being tracked to add API support for this. But they can’t provide a timeline for when it will be available. In the meantime you can use SMTP to send email with a VPC Endpoint as described here: https://docs.aws.amazon.com/ses/latest/dg/send-using-smtp-programmatically.html

(Although a Python example isn’t included there you could use smtplib to send the emails using SMTP credentials.)

@github-actions
Copy link

This issue is now closed.

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request ses
Projects
None yet
Development

No branches or pull requests

1 participant