Facebook Pixel

Setting Up Amazon SES with AWS Domain Verification and SMTP Credentials

Learn how to set up Amazon SES from scratch verifying your domain, configuring DNS records, getting SMTP credentials, and requesting production access.

Setting Up Amazon SES with AWS

This guide covers setting up Amazon SES for your Node.js application domain verification, DNS records, SMTP credentials, and production access.

Step 1: Go to Amazon SES Console

  1. Sign in to AWS Console
  2. Go to Services → Simple Email Service
  3. Select your region (e.g., us-east-1)

Step 2: Verify Your Domain

  1. Go to SES → Verified identities → Create identity
  2. Choose "Domain"
  3. Enter your domain (e.g., yourdomain.com)
  4. Check "Use a custom MAIL FROM domain" (optional)
  5. Click "Create identity"

SES gives you DNS records to add:

DKIM records (3 CNAME records):

Type: CNAME
Name: abc123._domainkey.yourdomain.com
Value: abc123.dkim.amazonses.com

Type: CNAME
Name: def456._domainkey.yourdomain.com
Value: def456.dkim.amazonses.com

Type: CNAME
Name: ghi789._domainkey.yourdomain.com
Value: ghi789.dkim.amazonses.com

Add these to your DNS provider (Cloudflare, Route 53, etc.).

Step 3: Add SPF and DMARC Records

SPF:

Type: TXT
Name: @
Value: v=spf1 include:amazonses.com ~all

DMARC:

Type: TXT
Name: _dmarc
Value: v=DMARC1; p=none; rua=mailto:[email protected]

Step 4: Wait for Verification

SES checks the DNS records automatically. Verification usually takes 15-60 minutes.

Check status: SES → Verified identities → your domain → Status should be "Verified"

Step 5: Get SMTP Credentials

  1. Go to SES → SMTP Settings
  2. Click "Create SMTP Credentials"
  3. A new IAM user is created
  4. Copy the SMTP username and password
  5. Save securely (you can't see the password again)

SMTP settings:

  • Server: email-smtp.us-east-1.amazonaws.com
  • Port: 587 (TLS) or 465 (SSL)
  • Username: AKIAXXXXXXXXXXXXX
  • Password: (from step 4)

Step 6: Request Production Access

By default, SES is in sandbox mode (only send to verified emails).

To request production access:

  1. Go to SES → Account dashboard
  2. Click "Request production access"
  3. Fill in the form:
    • Mail type: Transactional
    • Website URL: https://yourdomain.com
    • Describe your use case: "Sending password reset emails, welcome emails, and connection notifications for a developer networking app"
  4. Submit

AWS reviews within 24 hours. Once approved, you can send to any email address.

Step 7: Test Sending an Email

In sandbox mode, verify a test email address first:

  1. SES → Verified identities → Create identity
  2. Choose "Email address"
  3. Enter your test email
  4. Confirm via the verification email

Then test via the console:

  1. SES → Test email
  2. From: [email protected]
  3. To: [email protected]
  4. Subject: Test
  5. Body: This is a test
  6. Send test email

Step 8: Store Credentials in .env

# .env SES_HOST=email-smtp.us-east-1.amazonaws.com SES_PORT=587 SES_USER=AKIAXXXXXXXXXXXXX SES_PASS=your-smtp-password [email protected]

The Takeaway

Setting up Amazon SES involves: verifying your domain (add DKIM CNAME records), adding SPF and DMARC TXT records, getting SMTP credentials, requesting production access (takes ~24 hours), testing in sandbox mode, and storing credentials in .env. Domain verification takes 15-60 minutes after adding DNS records.

Go to SES → Verified identities → Create identity → Domain. SES gives you 3 DKIM CNAME records to add to your DNS provider. Also add SPF (v=spf1 include:amazonses.com ~all) and DMARC records. SES checks automatically verification takes 15-60 minutes.

Go to SES → SMTP Settings → Create SMTP Credentials. An IAM user is created with SMTP permissions. Copy the username and password immediately (password can't be viewed again). SMTP server is email-smtp.us-east-1.amazonaws.com, port 587 for TLS.

New SES accounts are in sandbox mode you can only send emails to verified email addresses. To send to any address, request production access from SES → Account dashboard → Request production access. AWS reviews within 24 hours.

3 DKIM CNAME records (provided by SES for email signing), 1 SPF TXT record (v=spf1 include:amazonses.com ~all for sending authorization), and 1 DMARC TXT record (v=DMARC1; p=none for policy). All must be added to your DNS provider.

First verify a test email address (SES → Verified identities → Create identity → Email address, confirm via email). Then use SES → Test email to send from your verified domain to the verified email address. Once production access is approved, you can send to any address.

Ready to master Node.js completely?

Want to upskill yourself, crack your next interview, and get your dream job? Join our comprehensive course to dive deeper with high-quality video tutorials, solve interview questions, and a premium community.

Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.
Please Login.