Sign inGet started

Migracja z Amazon SES

Ta strona mapuje wywołanie SES v2 SendEmail, listę suppressions na poziomie konta i powiadomienia o zdarzeniach SNS na Bird. Postępuj zgodnie z głównym przewodnikiem migracji po kolei i korzystaj z tych mapowań dla kroków 1, 3 i 4.

Przekaż to swojemu agentowi

Wklej to do Claude Code, Cursor lub Codex. Agent przetworzy tę stronę w kontekście Twojego repozytorium, korzystając z dostępnego interfejsu Bird: serwera MCP, jeśli jest podłączony, lub CLI, jeśli jest zainstalowany i zalogowany.
Przykład kodu
I am moving an email integration from Amazon SES to Bird. Route through it with me.
1. Check what you already have before setting anything up. If Bird's MCP server is connected, use its tools. If the Bird CLI is installed and signed in, use that. Either one is enough, and every step below is an action you take with whichever you have. Only if neither is present, follow https://bird.com/docs/ai/set-up-your-agent.md to set one up and sign me in. Every Bird docs page serves Markdown at its own URL with `.md` appended, so fetch that rather than the HTML.
2. Read https://bird.com/docs/guides/email/migrate/ses.md for the payload, suppression and event mapping, and https://bird.com/docs/guides/email/migrate.md for the order the steps go in.
3. Find and list my SES usage in this repository and its infrastructure before you change anything: the SendEmail and SendRawEmail call sites through the AWS SDK or CLI, the configuration sets they name, the SNS topics or EventBridge rules carrying my events, the handler subscribed to them, and every identity I send from. Say which of these live in infrastructure code rather than application code, because those change by a different route.
4. Register each of those sending domains with Bird and give me the DNS records to publish, following https://bird.com/docs/guides/email/sending-domains.md. Leave the SES DKIM CNAMEs exactly as they are: Bird's DKIM record uses its own selector, so the two coexist and both providers authenticate side by side until I switch traffic. Publishing DNS affects mail for the whole domain, so show me the records and let me publish them.
5. Export my account-level suppression list from SES and import it into Bird before any production traffic goes through Bird, so my first sends do not reach addresses that already bounced or complained. Read it from GET /v2/email/suppressed-destinations, paginating with NextToken to the end, and keep both the BOUNCE and COMPLAINT reasons. The Bird import takes one address per request and is idempotent, so a partial re-run is safe. https://bird.com/docs/guides/email/suppressions.md has the reason taxonomy.
6. Port the send call and replace the event plumbing. Bird posts signed webhooks straight to an endpoint, so the SNS topic, the subscription-confirmation handshake, and the message-envelope unwrapping all go away rather than being ported: my handler reads the event body directly and verifies it per Standard Webhooks. See https://bird.com/docs/guides/webhooks.md and https://bird.com/docs/guides/email/events.md. Tell me which SNS or EventBridge resources become unused, but do not delete any of them.
7. Run my whole integration against Bird's mail sandbox before any production traffic, following https://bird.com/docs/guides/email/testing-sandbox.md. Sandbox sends run the real pipeline without reaching an inbox or touching my sending reputation.
8. Stop and ask me wherever a step needs a decision. Do not point production traffic at Bird until I have seen the sandbox results and replied with the words cut over to Bird. Retiring the SES path is a separate step that comes later: ask me again and wait for me to reply with the words retire the SES path. A reply that agrees without naming what it is authorising is not authorisation. Finish by telling me what is left that only a person can do.

Zmapuj wywołanie wysyłki

SES rozkłada wysyłkę na Destination, Content i mechanizm configuration set. Nasz POST /v1/email/messages to jeden płaski payload:
Co robiSES (SendEmail v2)Bird
NadawcaFromEmailAddressfrom
OdbiorcyDestination.*Addressesto / cc / bcc (tablice)
TematContent.Simple.Subjectsubject
TreśćContent.Simple.Body.Html/Texthtml / text (co najmniej jedno)
Reply-toReplyToAddressesreply_to (tablica)
Własne nagłówkiContent.Simple.Headersheaders (obiekt string → string)
Filtrowalne etykietyEmailTagstags: pary {name, value}
Kontekst zwrotny(brak)metadata: dowolny JSON
Zapisany szablonContent.Templatetemplate + template.parameters
Śledzenie otwarć/kliknięćconfiguration settrack_opens / track_clicks (domyślnie true)
Pula IPdedykowana pula IP (config set)ip_pool_id (ipp_... lub ipp_shared)
Kategoria(brak)category: marketing (domyślnie) lub transactional
Limity pól i wartości domyślne (liczba odbiorców, limity tagów i metadanych) znajdziesz w sekcji Wysyłanie e-maili.
Uwagi dotyczące portowania:
  • Configuration sets zanikają na rzecz pól per wiadomość. Śledzenie, pula IP i routing zdarzeń były obsługiwane przez configuration set w SES. Tutaj pierwsze dwa to pola w payloadzie, a routing zdarzeń to subskrypcja webhooka.
  • Uwierzytelnianie zmienia się z SigV4 na token bearer. Bez podpisywania żądań; zwykły nagłówek Authorization: Bearer bk_.... Usuń łańcuch poświadczeń AWS SDK z tej ścieżki kodu.
  • Szablony SES przenoszą się do zapisanych szablonów. Content.Template (nazwa szablonu plus TemplateData) mapuje się na nasze pole template z wartościami w template.parameters. Zobacz wysyłanie z szablonem.
  • Content.Raw (MIME) nie ma odpowiednika. Wiadomość budujemy z pól strukturalnych. Jeśli składasz surowy MIME, żeby dołączać pliki, wyślij je jako naszą tablicę attachments (base64 content na plik, content_id dla obrazów inline).
  • Sandbox SES ≠ sandbox Bird. Sandbox SES ogranicza, do kogo możesz wysyłać. Nasz sandbox mailowy to symulator z magicznymi adresami: bez allowlistingu i nic nie jest dostarczane.

Eksportuj suppressions

Wyeksportuj listę suppressions na poziomie konta i przepuść ją przez pętlę importu:
  • GET /v2/email/suppressed-destinations (paginuj za pomocą NextToken; każdy wpis ma BOUNCE lub COMPLAINT jako powód)

Przetłumacz zdarzenia webhookowe

SES publikuje zdarzenia przez SNS lub EventBridge. My wysyłamy podpisane webhooki bezpośrednio metodą POST, więc temat SNS, handshake potwierdzenia subskrypcji i rozpakowywanie koperty wiadomości odpadają. Nazwy zdarzeń mapują się tak:
WynikSESBird
Zaakceptowano/przetworzoneSendemail.acceptedemail.processed
DostarczonoDeliveryemail.delivered
Tymczasowy błądDeliveryDelayemail.deferred
Trwałe odrzucenieBounceemail.bounced / email.out_of_band_bounce
Skarga na spamComplaintemail.complained
Zablokowano/wstrzymano(brak)email.rejected
OtwarcieOpenemail.opened
KliknięcieClickemail.clicked
WypisanieSubscriptionemail.list_unsubscribed
email.rejected to nowość w porównaniu z SES: raportujemy wstrzymanych odbiorców jawnie (status rejected, rejection_reason: recipient_suppressed), zamiast wliczać ich w cykl wysyłki i odrzuceń. Dodaj handler dla tego zdarzenia.
Zamiast weryfikacji wiadomości SNS podpisujemy zgodnie ze specyfikacją Standard Webhooks, z nagłówkami HMAC na samej dostawie. Przepis na weryfikację znajdziesz w sekcji Webhooki i zdarzenia.

Przełączenie

Przejdź przez domeny i DNS oraz test sandbox w głównym przewodniku. Oba kroki są niezależne od dostawcy. Jedna uwaga specyficzna dla SES w kroku DNS: rekordy CNAME DKIM z SES zostają na miejscu podczas przejścia. Nasz rekord TXT DKIM używa własnego selektora, więc oba współistnieją.

Następne kroki

  • Domeny wysyłkowe: rejestracja, cykl życia weryfikacji i rekordy DNS, które przekierowujesz
  • Webhooki i zdarzenia: konfiguracja endpointu i weryfikacja Standard Webhooks
  • Sandbox testowy: przetestuj nową integrację przed przełączeniem
  • Suppressions: potwierdź zaimportowaną listę i sposób, w jaki ją utrzymujemy