Skip to content

Conversation

@havenbarnes
Copy link
Contributor

Problem

We're not using Tenants yet, a newer feature of SES that will give us better observability on customer-by-customer deliverability metrics

Changes

Adds a couple of calls to create a tenant for a team ID and associate new domains with it

How did you test this code?

TBD

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Comment on lines 37 to 40
self.client.create_tenant_resource_association(
TenantName=tenant_name,
ResourceArn=f"arn:aws:ses:{settings.SES_REGION}:{settings.SES_ACCOUNT_ID}:identity/{domain}",
)
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: The tenant-resource association call lacks error handling, which could leave the system in an inconsistent state if tenant creation succeeds but association fails

Prompt To Fix With AI
This is a comment left during a code review.
Path: products/messaging/backend/providers/ses.py
Line: 37:40

Comment:
**logic:** The tenant-resource association call lacks error handling, which could leave the system in an inconsistent state if tenant creation succeeds but association fails

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines 29 to 31
try:
tenant_name = f"team-{team_id}"
self.client.create_tenant(TenantName=tenant_name, Tags=[{"Key": "team_id", "Value": str(team_id)}])
Copy link
Contributor

Choose a reason for hiding this comment

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

style: AWS tenant names have specific constraints (3-64 characters, alphanumeric and hyphens). Consider validating the generated tenant name meets these requirements

Prompt To Fix With AI
This is a comment left during a code review.
Path: products/messaging/backend/providers/ses.py
Line: 29:31

Comment:
**style:** AWS tenant names have specific constraints (3-64 characters, alphanumeric and hyphens). Consider validating the generated tenant name meets these requirements

How can I resolve this? If you propose a fix, please make it concise.

@havenbarnes havenbarnes merged commit 046a01f into master Oct 8, 2025
187 checks passed
@havenbarnes havenbarnes deleted the feat/messaging-ses-multi-tenant branch October 8, 2025 23:37
havenbarnes added a commit that referenced this pull request Oct 9, 2025
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.

3 participants