Migrasi dari Amazon SES
Halaman ini memetakan panggilan SES v2 SendEmail, daftar supresi tingkat akun, dan notifikasi event SNS ke Bird. Ikuti panduan migrasi utama secara berurutan, dan gunakan pemetaan ini untuk langkah 1, 3, dan 4.
Serahkan ini ke agen Anda
Tempelkan ini ke Claude Code, Cursor, atau Codex. Agen akan mengerjakan halaman ini terhadap repositori Anda sendiri, menggunakan antarmuka Bird mana pun yang sudah tersedia: server MCP jika sudah terhubung, atau CLI jika sudah terinstal dan masuk.
Contoh kode
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.Petakan panggilan pengiriman
SES membagi satu pengiriman ke Destination, Content, dan alur configuration set. POST /v1/email/messages kami adalah satu payload datar:
| Fungsi | SES (SendEmail v2) | Bird |
|---|---|---|
| Pengirim | FromEmailAddress | from |
| Penerima | Destination.*Addresses | to / cc / bcc (array) |
| Subjek | Content.Simple.Subject | subject |
| Isi | Content.Simple.Body.Html/Text | html / text (minimal satu) |
| Reply-to | ReplyToAddresses | reply_to (array) |
| Header kustom | Content.Simple.Headers | headers (objek string → string) |
| Label yang dapat difilter | EmailTags | pasangan tags: {name, value} |
| Konteks round-trip | (tidak ada) | metadata: JSON arbitrer |
| Template tersimpan | Content.Template | template + template.parameters |
| Pelacakan buka/klik | configuration set | track_opens / track_clicks (default true) |
| IP pool | dedicated IP pool (config set) | ip_pool_id (ipp_... atau ipp_shared) |
| Kategori | (tidak ada) | category: marketing (default) atau transactional |
Batas field dan nilai default kami (jumlah penerima, batas tag dan metadata) ada di Mengirim email.
Catatan porting:
- Configuration set berubah menjadi field per pesan. Pelacakan, IP pool, dan routing event sebelumnya diatur oleh configuration set di SES. Di sini, dua yang pertama adalah field payload dan routing event adalah langganan webhook.
- Autentikasi berubah dari SigV4 ke bearer token. Tidak perlu penandatanganan permintaan; cukup header Authorization: Bearer bk_... biasa. Hapus rantai kredensial AWS SDK dari jalur kode ini.
- Template SES dipindahkan ke template tersimpan. Content.Template (nama template beserta TemplateData) dipetakan ke field template kami dengan nilai di template.parameters. Lihat mengirim dengan template.
- Content.Raw (MIME) tidak memiliki padanan. Kami membangun pesan dari field terstruktur. Jika Anda menyusun MIME mentah untuk melampirkan file, kirimkan sebagai array attachments kami (base64 content per file, content_id untuk gambar inline).
- Sandbox SES ≠ sandbox Bird. Sandbox SES membatasi kepada siapa Anda dapat mengirim. Mail sandbox kami adalah simulator dengan alamat khusus: tanpa allowlisting, dan tidak ada yang benar-benar dikirimkan.
Ekspor supresi
Ekspor daftar supresi tingkat akun dan jalankan melalui loop impor:
- GET /v2/email/suppressed-destinations (paginasi dengan NextToken, dan setiap entri memiliki BOUNCE atau COMPLAINT sebagai alasannya)
Terjemahkan event webhook
SES memublikasikan event melalui SNS atau EventBridge. Kami mengirim webhook bertanda tangan secara langsung dengan POST, sehingga topik SNS, handshake konfirmasi langganan, dan pembukaan envelope pesan semuanya tidak diperlukan lagi. Nama event dipetakan seperti ini:
| Hasil | SES | Bird |
|---|---|---|
| Diterima/diproses | Send | email.accepted → email.processed |
| Terkirim | Delivery | email.delivered |
| Kegagalan sementara | DeliveryDelay | email.deferred |
| Bounce permanen | Bounce | email.bounced / email.out_of_band_bounce |
| Keluhan spam | Complaint | email.complained |
| Diblokir/disupresi | (tidak ada) | email.rejected |
| Dibuka | Open | email.opened |
| Diklik | Click | email.clicked |
| Berhenti langganan | Subscription | email.list_unsubscribed |
email.rejected adalah hal baru dibandingkan SES: kami melaporkan penerima yang disupresi secara eksplisit (status rejected, rejection_reason: recipient_suppressed) alih-alih memasukkannya ke siklus kirim-dan-bounce. Tambahkan handler untuk event ini.
Sebagai pengganti verifikasi pesan SNS, kami menandatangani sesuai spesifikasi Standard Webhooks, dengan header HMAC pada pengiriman itu sendiri. Cara verifikasinya ada di Webhooks & events.
Peralihan
Ikuti domain & DNS dan uji asap sandbox di panduan utama. Keduanya tidak bergantung pada provider. Satu catatan khusus SES untuk langkah DNS: CNAME DKIM SES tetap di tempatnya selama transisi. Record TXT DKIM kami menggunakan selektor sendiri, sehingga keduanya bisa berdampingan.
Langkah selanjutnya
- Domain pengirim: registrasi, siklus hidup verifikasi, dan record DNS yang Anda arahkan ulang
- Webhooks & events: pengaturan endpoint dan verifikasi Standard Webhooks
- Sandbox pengujian: uji asap integrasi baru sebelum peralihan
- Supresi: konfirmasi daftar yang sudah diimpor dan cara kami mengelolanya selanjutnya
Sumber daya terkait
Lanjutkan dengan dokumentasi, panduan, dan contoh untuk topik ini. Sumber daya tersedia dalam bahasa Inggris.
Tonton panduannyaGetting started with emailJelajahi kemampuannyaEmailIkuti jalur pembelajaranBuild your first integrationPanduan implementasiSend your first email
Coba praktiknya dan dapatkan ringkasan implementasi