Skip to content

feat: add SES Global Endpoint (Multi-Region Endpoint) support#367

Merged
pcraciunoiu merged 3 commits intodjango-ses:mainfrom
tomoyasu-sasaki:feature/global-endpoint-support
Feb 3, 2026
Merged

feat: add SES Global Endpoint (Multi-Region Endpoint) support#367
pcraciunoiu merged 3 commits intodjango-ses:mainfrom
tomoyasu-sasaki:feature/global-endpoint-support

Conversation

@tomoyasu-sasaki
Copy link
Copy Markdown
Contributor

@tomoyasu-sasaki tomoyasu-sasaki commented Feb 2, 2026

Add support for AWS SES Global Endpoints (Multi-Region Endpoints) which provide multi-region high availability and automatic failover between two AWS regions.

Changes:

  • Add AWS_SES_GLOBAL_ENDPOINT_ID setting to configure endpoint ID
  • Implement EndpointId parameter in send_email API calls (SESv2 only)
  • Add validation to ensure SESv2 is enabled when using global endpoints
  • Add comprehensive test coverage for global endpoint functionality
  • Update documentation with setup instructions and usage examples

The implementation:

  • Maintains full backward compatibility (default: None)
  • Requires USE_SES_V2=True (validated at runtime)
  • Follows existing code patterns and project conventions
  • Includes 4 new test classes covering all scenarios

Add support for AWS SES Global Endpoints (Multi-Region Endpoints) which
provide multi-region high availability and automatic failover between
two AWS regions.

Changes:
- Add AWS_SES_GLOBAL_ENDPOINT_ID setting to configure endpoint ID
- Implement EndpointId parameter in send_email API calls (SESv2 only)
- Add validation to ensure SESv2 is enabled when using global endpoints
- Add comprehensive test coverage for global endpoint functionality
- Update documentation with setup instructions and usage examples

The implementation:
- Maintains full backward compatibility (default: None)
- Requires USE_SES_V2=True (validated at runtime)
- Follows existing code patterns and project conventions
- Includes 4 new test classes covering all scenarios

Closes #XXX
Copy link
Copy Markdown
Contributor

@pcraciunoiu pcraciunoiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

This seems like an easy feature to add.

I've approved the tests to run and just one small comment came to mind.

Comment thread tests/test_settings.py Outdated
Comment on lines +46 to +54

@override_settings(AWS_SES_GLOBAL_ENDPOINT_ID='test123.g3h')
def test_global_endpoint_id_given(self):
"""Test that global endpoint ID is set when AWS_SES_GLOBAL_ENDPOINT_ID is provided"""
self.assertEqual(settings.AWS_SES_GLOBAL_ENDPOINT_ID, 'test123.g3h')

def test_global_endpoint_id_default(self):
"""Test that global endpoint ID defaults to None"""
self.assertIsNone(settings.AWS_SES_GLOBAL_ENDPOINT_ID)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first test is not worth adding IMO.

I'm inclined to remove the second as well, just because testing default values doesn't seem interesting.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your review. I have removed the unnecessary tests.

@pcraciunoiu
Copy link
Copy Markdown
Contributor

This looks good but GitHub CI is down, so I'll wait to approve and merge until it's back.

@pcraciunoiu
Copy link
Copy Markdown
Contributor

@tomoyasu-sasaki all good except some lint issue, would you fix?

@tomoyasu-sasaki
Copy link
Copy Markdown
Contributor Author

tomoyasu-sasaki commented Feb 3, 2026

Sure, I've fixed it.

@pcraciunoiu pcraciunoiu merged commit f711e89 into django-ses:main Feb 3, 2026
21 checks passed
@pcraciunoiu
Copy link
Copy Markdown
Contributor

Published to v4.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants