NotiGrid
Channels

AWS SES & SNS

Configure Amazon SES for email and SNS for SMS notifications

AWS SES & SNS Integration

Use Amazon Web Services for reliable email (SES) and SMS (SNS) delivery through NotiGrid.

Overview

  • Amazon SES (Simple Email Service) - For email notifications
  • Amazon SNS (Simple Notification Service) - For SMS notifications

Prerequisites

  • AWS account with appropriate permissions
  • Access to AWS Console or AWS CLI
  • Verified domain or email addresses (for SES)
  • NotiGrid account

Amazon SES Setup (Email)

1. Create IAM User

  1. Log in to AWS Console
  2. Navigate to IAM → Users
  3. Click Create User
  4. User name: notigrid-ses
  5. Select Programmatic access
  6. Click Next

2. Attach SES Permissions

  1. Select Attach policies directly
  2. Search for and select: AmazonSESFullAccess
  3. Or create a custom policy with minimal permissions:
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ses:SendEmail",
        "ses:SendRawEmail",
        "ses:SendTemplatedEmail",
        "ses:GetSendQuota",
        "ses:GetSendStatistics"
      ],
      "Resource": "*"
    }
  ]
}
  1. Click NextCreate User
  2. Save the Access Key ID and Secret Access Key (you'll need these)

3. Verify Email Domain or Address

  1. Go to Amazon SES → Verified identities
  2. Click Create identity
  3. Select Domain
  4. Enter your domain (e.g., example.com)
  5. Check Generate DKIM settings
  6. Click Create identity
  7. Add the provided DNS records to your domain:
    • DKIM records - 3 CNAME records for email authentication
    • Mail From domain (optional) - MX and TXT records

Option B: Verify Email Address (For Testing)

  1. Go to Amazon SES → Verified identities
  2. Click Create identity
  3. Select Email address
  4. Enter your email address
  5. Click Create identity
  6. Check your inbox and click the verification link

4. Request Production Access

By default, SES is in sandbox mode (limited to verified addresses only).

  1. Go to Amazon SES → Account dashboard
  2. Click Request production access
  3. Fill out the form:
    • Mail type: Transactional
    • Website URL: Your website
    • Use case description: Describe how you'll use SES
    • Bounce/Complaint handling: Explain your process
  4. Submit the request (usually approved within 24 hours)

5. Configure in NotiGrid

  1. Log in to NotiGrid dashboard
  2. Go to Channels → Email → AWS SES
  3. Click Add SES Configuration
  4. Enter your details:
    • Name: "Production SES" (or any name)
    • AWS Region: Your SES region (e.g., us-east-1)
    • Access Key ID: From step 2
    • Secret Access Key: From step 2
    • From Email: Your verified email/domain
    • From Name: Your company name
  5. Click Save & Test

Amazon SNS Setup (SMS)

1. Create IAM User

  1. In AWS Console, go to IAM → Users
  2. Click Create User
  3. User name: notigrid-sns
  4. Select Programmatic access
  5. Click Next

2. Attach SNS Permissions

  1. Select Attach policies directly
  2. Search for and select: AmazonSNSFullAccess
  3. Or create a custom policy:
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "sns:Publish",
        "sns:SetSMSAttributes",
        "sns:GetSMSAttributes"
      ],
      "Resource": "*"
    }
  ]
}
  1. Click NextCreate User
  2. Save the Access Key ID and Secret Access Key

3. Configure SMS Settings

  1. Go to Amazon SNS → Text messaging (SMS)
  2. Click Edit in SMS settings
  3. Configure:
    • Default message type:
      • Promotional - Lower cost, best effort delivery
      • Transactional - Higher cost, optimized for critical messages
    • Account spend limit: Set monthly SMS spend limit
    • Default sender ID: Your company name (not supported in all countries)
  4. Click Save changes

4. Set Up Origination Numbers (Optional)

For better deliverability in some countries:

  1. Go to Amazon Pinpoint (SNS uses Pinpoint for SMS)
  2. Navigate to SMS and voice → Phone numbers
  3. Click Request phone number
  4. Choose number type:
    • Toll-free - For US/Canada
    • Long code - For two-way messaging
    • Short code - For high-volume (requires application)
  5. Complete the request

5. Configure in NotiGrid

  1. Log in to NotiGrid dashboard
  2. Go to Channels → SMS → AWS SNS
  3. Click Add SNS Configuration
  4. Enter your details:
    • Name: "Production SNS"
    • AWS Region: Your preferred region (e.g., us-east-1)
    • Access Key ID: From step 2
    • Secret Access Key: From step 2
    • Sender ID: Your sender name (if supported)
    • Message Type: Transactional or Promotional
  5. Click Save & Test

Sending Notifications

Email via SES

curl -X POST https://api.notigrid.com/v1/notifications \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "email",
    "to": "user@example.com",
    "subject": "Welcome!",
    "body": "Thanks for signing up!"
  }'

SMS via SNS

curl -X POST https://api.notigrid.com/v1/notifications \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "sms",
    "to": "+1234567890",
    "body": "Your verification code is: 123456"
  }'

Best Practices

SES Email Best Practices

  1. Warm up your domain - Start with low volume and gradually increase
  2. Monitor bounce rates - Keep below 5%
  3. Handle complaints - Process unsubscribe requests immediately
  4. Use DKIM & SPF - Improve deliverability with proper authentication
  5. Maintain clean lists - Remove invalid addresses
  6. Segment sending - Use configuration sets for different types
  7. Monitor reputation - Check SES reputation dashboard regularly

SNS SMS Best Practices

  1. Include opt-out - Always provide a way to unsubscribe (e.g., "Reply STOP")
  2. Verify numbers - Use phone number validation
  3. Time zones - Send messages at appropriate times
  4. Character limits - Keep messages under 160 characters when possible
  5. Costs - Monitor spending, SMS can be expensive
  6. Compliance - Follow TCPA, GDPR, and local regulations
  7. Use appropriate type - Transactional for time-sensitive, Promotional for marketing

Monitoring & Analytics

SES Metrics

Track in AWS CloudWatch:

  • Sends - Total emails sent
  • Deliveries - Successfully delivered
  • Bounces - Hard and soft bounces
  • Complaints - Spam reports
  • Rejects - Rejected by SES

SNS Metrics

Monitor in CloudWatch:

  • NumberOfMessagesPubished - SMS messages sent
  • NumberOfNotificationsFailed - Failed deliveries
  • SMSSuccessRate - Delivery success rate

Cost Optimization

SES Pricing (as of 2025)

  • First 62,000 emails/month: $0 (if sent from EC2)
  • Beyond that: $0.10 per 1,000 emails
  • Attachments: $0.12 per GB
  • Dedicated IPs: $24.95/month

SNS Pricing (varies by country)

  • US: ~$0.00645 per SMS
  • UK: ~$0.0522 per SMS
  • India: ~$0.00435 per SMS
  • Check AWS SNS Pricing for your region

Cost-saving tips:

  • Use promotional messages for non-critical notifications
  • Implement retry logic with exponential backoff
  • Clean up invalid numbers regularly
  • Consider batching when appropriate

Troubleshooting

SES Issues

Email not sending:

  • Check if domain/email is verified
  • Verify you're not in sandbox mode (or recipient is verified)
  • Check IAM permissions
  • Review bounce/complaint rates

High bounce rate:

  • Validate email addresses before sending
  • Remove hard bounces from your list
  • Implement double opt-in

Emails going to spam:

  • Set up DKIM, SPF, and DMARC
  • Improve email content (avoid spam triggers)
  • Warm up your domain
  • Maintain good sender reputation

SNS Issues

SMS not delivering:

  • Verify phone number format (E.164: +1234567890)
  • Check if recipient country is supported
  • Verify spending limits aren't exceeded
  • Ensure sender ID is supported in destination country

High costs:

  • Use promotional messages for non-critical SMS
  • Implement rate limiting
  • Remove invalid numbers
  • Consider alternative channels for some messages

Security

  1. Rotate credentials - Regularly rotate access keys
  2. Use IAM roles - When possible, use EC2 instance roles instead of keys
  3. Limit permissions - Follow principle of least privilege
  4. Enable CloudTrail - Log all API calls
  5. Encrypt data - Use TLS for data in transit
  6. Monitor usage - Set up billing alerts

Compliance

Email Compliance

  • CAN-SPAM Act (US) - Include unsubscribe, physical address
  • GDPR (EU) - Obtain consent, honor deletion requests
  • CASL (Canada) - Get explicit consent

SMS Compliance

  • TCPA (US) - Obtain prior express consent
  • GDPR (EU) - Data protection requirements
  • Local regulations - Check country-specific rules

Support Resources