Skip to main content

Sending Email and SMS on AWS

Send transactional email with SES, send SMS with AWS End User Messaging, and plan the move off Amazon Pinpoint before support ends on October 30, 2026.

Overview and What You Will Learn

Amazon SES sends email from your application, and AWS End User Messaging sends SMS, MMS, push, voice and WhatsApp messages. Together they cover transactional messaging on AWS. Amazon Pinpoint, which used to add segments, campaigns, journeys and analytics on top, ends support on October 30, 2026, so new designs should not depend on it and existing ones need a migration plan.

In this lab you will:

  • Verify a sending domain with DKIM, SPF alignment and DMARC
  • Check sandbox status, send email with the SES API and request production access
  • Capture bounces and complaints with a configuration set and protect your sender reputation
  • Send an SMS with AWS End User Messaging and understand India sender registration
  • Inventory and export your Pinpoint resources and map each one to its replacement

Why This Matters in Production

Every order confirmation, password reset and delivery update at a company like Swiggy or Razorpay is a transactional message triggered by a backend service. It must be fast, trackable and reach the inbox, because a missed one-time password or invoice is a support ticket. Marketing needs different things, such as audiences, schedules and multi-step journeys, and that is exactly the part Pinpoint provided and AWS is retiring. Knowing which service does which job lets you keep transactional traffic stable while you rebuild the marketing side.

Core Principles

Choose the service by what you are sending and who triggers it. A developer calling an API to message one person is a transactional case. A marketer targeting a segment on a schedule is an engagement case.

flowchart TD Q{What are you sending?} -->|Email from your code| SES([Amazon SES]) Q -->|SMS, push, voice, WhatsApp| EUM([AWS End User Messaging]) Q -->|Internal alerts to people or systems| SNS([Amazon SNS]) Q -->|Segments, campaigns, journeys| ENG{Engagement platform} ENG --> CN[Amazon Connect or a third-party tool] ENG -.->|ends Oct 30, 2026| PP[Amazon Pinpoint] classDef svc fill:#326CE5,color:#FFFFFF classDef ask fill:#DBEAFE,color:#1E293B classDef old fill:#EF4444,color:#FFFFFF classDef alt fill:#10B981,color:#FFFFFF class SES,EUM,SNS svc class Q,ENG ask class PP old class CN alt
Need Use
Order, OTP and invoice email SES
SMS, push, voice, WhatsApp delivery AWS End User Messaging
Alerts to ops teams and subscribers SNS
Segments, campaigns, journeys Amazon Connect or a third-party platform

SES is not the same as SNS email. SNS email is plain text, requires subscribers to confirm, and has no per-message analytics or reputation management, so use it only for internal alerts. SES sends formatted HTML, tracks sends, deliveries, bounces, complaints, opens and clicks, and manages your sender reputation. SES costs about $0.10 per 1,000 emails, so check current pricing for your Region.

Remember

AWS ends support for Amazon Pinpoint on October 30, 2026. After that date the console and Pinpoint resources (endpoints, segments, campaigns, journeys and analytics) are no longer accessible. The SMS, push and voice APIs continue under the name AWS End User Messaging, and AWS recommends moving email to SES.

Detailed Step-by-Step Practical Lab

Milestone 1: Verify and Authenticate a Sending Domain

Verify a domain rather than single addresses in production. Easy DKIM gives you three CNAME records that let SES sign your mail, and a custom MAIL FROM domain makes SPF align with your domain.

Bash
export AWS_REGION=ap-south-1
aws sesv2 create-email-identity --email-identity devops.in
aws sesv2 get-email-identity --email-identity devops.in \
--query "DkimAttributes.Tokens" --output text
# Custom MAIL FROM so SPF aligns with your own domain
aws sesv2 put-email-identity-mail-from-attributes \
--email-identity devops.in \
--mail-from-domain bounce.devops.in \
--behavior-on-mx-failure USE_DEFAULT_VALUE

Add the three DKIM CNAME records, the MX and SPF TXT records SES gives you for the MAIL FROM domain, and a DMARC policy. If your DNS is in Route 53, the SES console can publish the records for you.

Bash
# DMARC TXT record at _dmarc.devops.in (start in monitoring mode)
v=DMARC1; p=none; rua=mailto:dmarc-reports@devops.in
# Move to p=quarantine and then p=reject once reports show legitimate mail passes

Large mailbox providers require authentication for bulk senders. Gmail and Yahoo expect SPF, DKIM and DMARC, a spam complaint rate well under 0.3 percent, and one-click unsubscribe on marketing mail.

Milestone 2: Check Sandbox Status

A new SES account is in the sandbox. In the sandbox you can send only to verified addresses, up to 200 messages per day and 1 per second.

Bash
aws sesv2 get-account \
--query "[ProductionAccessEnabled,SendQuota]" --output json

A send to an unverified recipient in the sandbox is rejected with an error (MessageRejected: Email address is not verified), and it does not disappear silently. If real users do not receive email, check this first, then check the suppression list and your DNS authentication.

Milestone 3: Create a Configuration Set for Tracking

A configuration set attaches event tracking and sending options to your messages. Without one you cannot see bounces and complaints per message. Use one for every production send.

Bash
aws sesv2 create-configuration-set --configuration-set-name production-tracking
aws sns create-topic --name ses-events
aws sesv2 create-configuration-set-event-destination \
--configuration-set-name production-tracking \
--event-destination-name to-sns \
--event-destination 'Enabled=true,MatchingEventTypes=[BOUNCE,COMPLAINT,DELIVERY],SnsDestination={TopicArn=arn:aws:sns:ap-south-1:123456789012:ses-events}'

Other destinations include CloudWatch for metrics, Kinesis Data Firehose to archive every event to S3, and EventBridge. Subscribe a Lambda function to the SNS topic so bounced and complained addresses are removed from your own lists straight away.

Milestone 4: Send Email with the SES API

Store the message in a YAML input file so the CLI call stays readable and easy to template.

YAML
# order-email.yaml
FromEmailAddress: orders@devops.in
Destination:
ToAddresses:
- rahul@customer.in
Content:
Simple:
Subject:
Data: Your order ORD-2026-001 is confirmed
Body:
Text:
Data: Thank you for your order. Estimated delivery is 30 minutes.
Html:
Data: <h1>Order confirmed</h1><p>Estimated delivery is 30 minutes.</p>
ConfigurationSetName: production-tracking
Bash
aws sesv2 send-email --cli-input-yaml file://order-email.yaml

From an application, use the SDK, and send both a text and an HTML part.

Python
import boto3
ses = boto3.client("sesv2", region_name="ap-south-1")
ses.send_email(
FromEmailAddress="orders@devops.in",
Destination={"ToAddresses": ["rahul@customer.in"]},
Content={
"Simple": {
"Subject": {"Data": "Your order ORD-2026-001 is confirmed"},
"Body": {
"Text": {"Data": "Estimated delivery is 30 minutes."},
"Html": {"Data": "<h1>Order confirmed</h1><p>Estimated delivery is 30 minutes.</p>"},
},
}
},
ConfigurationSetName="production-tracking",
)

For many recipients with personalization, create a stored template with aws sesv2 create-email-template and use send-bulk-email. For simple newsletters, SES contact lists and topics manage subscriptions and unsubscribes.

Milestone 5: Protect Your Sender Reputation

Mailbox providers decide inbox or spam placement from your history. SES reviews accounts whose bounce rate reaches about 5 percent or complaint rate reaches about 0.1 percent, and can pause sending at higher levels.

Bash
# Let SES keep bounced and complained addresses off your sending automatically
aws sesv2 put-account-suppression-attributes \
--suppressed-reasons BOUNCE COMPLAINT
aws sesv2 list-suppressed-destinations --reasons BOUNCE
# Watch reputation in CloudWatch
aws cloudwatch get-metric-statistics \
--namespace AWS/SES --metric-name Reputation.BounceRate \
--start-time $(date -u -d '1 day ago' +%FT%TZ) --end-time $(date -u +%FT%TZ) \
--period 3600 --statistics Maximum

A hard bounce means the address does not exist, so remove it permanently. A soft bounce means a temporary problem such as a full mailbox, so retry a few times and then stop. Keep lists clean, send only to people who asked, and make unsubscribing easy.

Common Mistake

Ignoring bounce and complaint events. If your application keeps mailing dead addresses, your bounce rate climbs, providers start filtering you to spam, and SES may pause your account.

Milestone 6: Request Production Access

Request production access when your domain is verified, bounce handling is in place, and you can describe your use case clearly.

Bash
aws sesv2 put-account-details \
--production-access-enabled \
--mail-type TRANSACTIONAL \
--website-url https://www.devops.in \
--use-case-description "Order confirmations and password resets triggered by user actions. Bounces and complaints are processed from SNS and removed from our lists." \
--contact-language EN

AWS typically reviews the request within about a day. Sending quotas then grow automatically as your reputation builds.

Milestone 7: Send SMS with AWS End User Messaging

AWS End User Messaging (SMS) is the delivery service for SMS, MMS, push, voice and WhatsApp. It was previously exposed as the Pinpoint SMS APIs, and its CLI namespace is still pinpoint-sms-voice-v2. You send from an origination identity: a phone number, a sender ID or a short code.

Bash
# Review account limits and sandbox state
aws pinpoint-sms-voice-v2 describe-account-attributes
aws pinpoint-sms-voice-v2 describe-account-limits
# Send a one-time password
aws pinpoint-sms-voice-v2 send-text-message \
--destination-phone-number +919876543210 \
--origination-identity DEVOPSIN \
--message-body "Your DevOps Network code is 482913. It expires in 5 minutes." \
--message-type TRANSACTIONAL \
--configuration-set-name sms-production

Expect these rules:

  • Sandbox: a new account can send only to verified destination numbers until you request production access.
  • Registration: most countries require registered sender IDs or numbers. In India, senders and message templates must be registered under the telecom DLT framework before messages are delivered, so start registration early, because it can take days or weeks.
  • Opt-outs: End User Messaging honors STOP replies through opt-out lists, and you must not message opted-out numbers.
  • Message type: use TRANSACTIONAL for codes and alerts and PROMOTIONAL for marketing, because carriers treat them differently.

For simple fan-out, SNS can also publish SMS, and for a mix of channels, call SES and End User Messaging from the same service.

Milestone 8: Migrate Off Amazon Pinpoint

List what you have, export it, and map each part to a replacement. If your Pinpoint console is already inaccessible, resources created there can no longer be exported, so export before the deadline and check the AWS migration guide for the latest options.

Bash
# Inventory
aws pinpoint get-apps --query "ApplicationsResponse.Item[].[Id,Name]" --output table
export APP_ID=a1b2c3d4e5f60718293a4b5c6d7e8f90
aws pinpoint get-segments --application-id $APP_ID
aws pinpoint get-campaigns --application-id $APP_ID
aws pinpoint list-journeys --application-id $APP_ID
aws pinpoint list-templates
# Export every endpoint (users and devices) to S3
aws pinpoint create-export-job \
--application-id $APP_ID \
--export-job-request S3UrlPrefix=s3://devops-pinpoint-export/endpoints/,RoleArn=arn:aws:iam::123456789012:role/PinpointExportRole

Then map each capability to a replacement:

Pinpoint feature Replacement
Email sending SES
SMS, MMS, push, voice, WhatsApp AWS End User Messaging
Endpoints and segments Amazon Connect Customer Profiles or your own data store
Message templates Connect or SES templates (similar Handlebars rendering)
Campaigns Scheduled sends with EventBridge Scheduler, Connect outbound campaigns or a third-party platform
Journeys Step Functions plus SES and End User Messaging, Connect, or a third-party platform
Analytics SES and End User Messaging event streams into CloudWatch, S3 and Athena

Check feature gaps before committing. Amazon Connect does not cover every Pinpoint engagement feature. In-app messaging is a common gap, and some teams move push, in-app and journeys to a dedicated third-party engagement platform. A simple journey ("welcome email now, reminder SMS after 3 days if no login") can also be built directly: EventBridge Scheduler or Step Functions waits, a Lambda function checks the user's state, then calls SES or End User Messaging.

Plan the cutover in order: stand up SES and End User Messaging sending, rebuild templates and audiences, run both side by side with a small group, switch traffic, and only then delete Pinpoint resources.

Milestone 9: Clean Up
Bash
aws sesv2 delete-configuration-set --configuration-set-name production-tracking
aws sesv2 delete-email-identity --email-identity devops.in
aws sns delete-topic --topic-arn arn:aws:sns:ap-south-1:123456789012:ses-events

Remove the DNS records you added for the domain.

Production Best Practices & Common Pitfalls

  1. Authenticate every sending domain. Use DKIM, a custom MAIL FROM and DMARC before you send volume.
  2. Always use a configuration set. Without it you cannot see or act on bounces and complaints.
  3. Use separate domains or subdomains for transactional and marketing mail. A marketing complaint spike should not hurt password resets.
  4. Process bounces automatically. Enable the account suppression list and remove bad addresses from your own data.
  5. Warm up gradually. Increase volume steadily on new domains and dedicated IPs.
  6. Register SMS senders early. Country rules, especially DLT in India, are the longest lead item.
  7. Do not build on Pinpoint. Design new engagement features for SES, End User Messaging or a platform that has a future.
  8. Keep alerts on SNS and customer messages on SES. The two serve different purposes.
Common Mistake

Using SNS email for messages customers read. It is plain text, has no tracking and requires opt-in confirmation. Use SES for anything a customer sees.

Tip

Test deliverability with a few real mailboxes at different providers and read the DMARC reports before your first large send. Fixing authentication after a spam complaint spike is much harder.

Quick Reference & Troubleshooting Commands

Command Description
aws sesv2 create-email-identity Verify a domain or address
aws sesv2 get-account Show sandbox status and quotas
aws sesv2 send-email Send an email
aws sesv2 create-configuration-set Create tracking settings
aws sesv2 list-suppressed-destinations List addresses SES will not send to
aws pinpoint-sms-voice-v2 send-text-message Send an SMS
Symptom Likely cause and fix
Email address is not verified Account in the sandbox or recipient unverified, request production access
Emails land in spam Missing DKIM, SPF alignment or DMARC, or a poor reputation
Mail accepted but never arrives Address on the suppression list or hard bounce, check events
SMS not delivered in India Sender ID or template not registered with DLT
AccessDenied calling Pinpoint Pinpoint resources are no longer available after October 30, 2026

Resources

AWS Direct Connect vs VPN: Run Both as Failover

AWS Direct Connect vs VPN: Run Both as Failover

Run AWS Direct Connect as primary and Site-to-Site VPN as BGP failover. Size the backup, set route preference and test it before an outage does.

10 min read•Aug 2026
Lambda vs Fargate vs EC2 Spot: The Cost Crossover

Lambda vs Fargate vs EC2 Spot: The Cost Crossover

Lambda vs Fargate vs EC2 Spot, at the crossover where Lambda stops being cheaper — 2026 pricing, invocation thresholds, and interruption math.

5 min read•Aug 2026
Secrets Manager vs Parameter Store vs Vault

Secrets Manager vs Parameter Store vs Vault

Secrets Manager vs Parameter Store vs Vault: cost math, rotation, dynamic secrets and a decision flow, plus the Vault, IBM and OpenBao licensing context.

10 min read•Aug 2026
AWS VPC Security: Hardening Every Layer

AWS VPC Security: Hardening Every Layer

Harden your AWS VPC in layers: subnets, Security Groups, NACLs, Flow Logs, endpoints, and IAM conditions, with CLI examples for production.

10 min read•Jul 2026
Event-Driven Architecture on AWS Explained

Event-Driven Architecture on AWS Explained

Build event-driven systems on AWS with SQS, SNS, EventBridge and Kinesis: fan-out, DLQs, idempotent consumers and queue-based scaling.

11 min read•Jul 2026
S3 vs RDS vs DynamoDB: Choosing AWS Storage

S3 vs RDS vs DynamoDB: Choosing AWS Storage

Choosing S3, RDS, or DynamoDB wrong costs you in performance, cost, and scalability. Here is a practical decision guide based on your actual access patterns.

5 min read•Jul 2026
AWS Cost Optimisation: 8 Actions That Cut Bills

AWS Cost Optimisation: 8 Actions That Cut Bills

Cut your AWS bill without re-architecting: eight ordered steps from anomaly alerts and tagging to rightsizing, VPC endpoints, Savings Plans and Spot.

11 min read•Jul 2026
EC2 vs Lambda vs Fargate: Choosing AWS Compute

EC2 vs Lambda vs Fargate: Choosing AWS Compute

Choose between EC2, Lambda and Fargate using traffic shape, state and runtime limits, with worked cost break-evens instead of rules of thumb.

11 min read•Jul 2026

Explore More in AWS DevOps, Cost, and Machine Learning

All 6 Topics

Frequently Asked Questions

Is Sending Email and SMS on AWS free to learn on DevOps Network?

Yes - this topic, like everything on DevOps Network, is 100% free with no paywall or sign-up gate.

What does the Sending Email and SMS on AWS topic cover?

Send transactional email with SES, send SMS with AWS End User Messaging, and plan the move off Amazon Pinpoint before support ends on October 30, 2026.

Found a mistake, an outdated step or a broken link?