Logo

dev-resources.site

for different kinds of informations.

The Differences In Sending Email Actions Between SES Version 1 and Version 2 APIs

Published at
8/7/2023
Categories
ses
aws
amazon
Author
timetxt
Categories
3 categories in total
ses
open
aws
open
amazon
open
Author
7 person written this
timetxt
open
The Differences In Sending Email Actions Between SES Version 1 and Version 2 APIs

If you have been using Amazon SES service for a while, it might not be new to you that Amazon SES is having two versions of API actions available at the moment, API Reference (version 1) and API v2 Reference. I tried to find the announcement of the API v2 in What's New with AWS? page but I did not have the luck.

Amazon SES service API calls can be separated into two types:

In this article, you will read about how I took a peek at the sending API actions in Amazon SES API v1 and v2.

  1. What are these API actions?

I can find the API action names in SES API documents. But I find that I can also get the list of API calls by creating an example IAM policy from IAM console.

Here is the list of actions I got when I was creating an IAM policy with service name 'SES' and 'SES v2' from IAM console.

  • v1 IAM actions

    "Action": [
    "ses:SendBounce",
    "ses:SendBulkTemplatedEmail",
    "ses:SendCustomVerificationEmail",
    "ses:SendEmail",
    "ses:SendRawEmail",
    "ses:SendTemplatedEmail"
    ]

  • v2 IAM actions

    "Action": [
    "ses:SendBulkEmail",
    "ses:SendCustomVerificationEmail",
    "ses:SendEmail"
    ]

  1. What are the differences?

I used SES SDK Boto3 Document in the following comparison.

  • To use Amazon SES v2 APIs, the service client must be boto3.client('sesv2')
  • SES v2 API "SendEmail" provides the same functions in v1 APIs "SendEmail", "SendRawEmail" and "SendTemplatedEmail". But only the API "SendEmail" in SES v2 supports the feature "list management". List Management can help to reduce the chance of get complaints or even hard bounces by sending emails to recipients who have opted out of their previous subscriptions to some email services, e.g. newsletter email.

  • SES v2 API "SendBulkEmail" has different names of parameters in sending requests with SES v1 "SendBulkTemplatedEmail". But values of those parameters should be no difference.

  • SES v2 API action "SendCustomVerificationEmail" has no difference with the action in SES v1 API.

  • SES v2 API actions do not have a definition of action "SendBounce". The action "SendBounce" is used to generate and send a bounce message to the sender of an email which I received through Amazon SES. There is a restriction that we can only use this API action on an email up to 24 hours after receiving it.

  1. How do I restrict usage in SES API v1 and v2?

SES public document has given an example about "Allowing Access to only SES API version 2". Relatively, I could modify the condition forcing to use SES API v1.

Why would I want to do that? One thing in the same document could provide an answer:

The SES SMTP interface uses SES API version 2 of ses:SendRawEmail.

As an IAM user can convert AWS credentials into SMTP username and password, I can use the trick to restrict the IAM user to use or not use SMTP client to send emails through Amazon SES.

  1. One more difference is the message size between using SES API v1 and v2. While size of message (after base64 encoding and including attachments) is 10 MB using SES API v1, the size is 40MB in SES API v2.
ses Article's
30 articles in total
Favicon
Amazon SES Unwrapped: Key Lessons & Testing Tips for Building Robust Email Systems
Favicon
Setting Up and Handling Email Aliases in AWS SES
Favicon
AWS workshop #2: Leveraging Amazon Bedrock to enhance customer service with AI-powered Automated Email Response
Favicon
Sending Emails with Spring Boot, AWS SES, and Serverless Lambda for Scalable Solutions
Favicon
Building smarter RSS feeds for my newsletter subscriptions with SES and Bedrock
Favicon
Unleashing the Power of Python Lambda Functions with Terraform for Email Automation via AWS SES
Favicon
Differences Between Amazon SES, Amazon SNS, and Amazon Pinpoint
Favicon
Getting production access to AWS SES (2024)
Favicon
Implementing a Mail Delivery Switch in Python for Local and AWS Environments Using Amazon SES
Favicon
Security Protocol to connect AWS SES
Favicon
Trigger a Typescript AWS Lambda on Receiving an Email with SES
Favicon
Click Click… Configuring Custom Domain SES Tracking with AWS CDK
Favicon
How to setup SES Email templates [2024 Guide]
Favicon
Why I Built the SES Easy Mailer Node Module
Favicon
Configurando Amazon SES para envio de e-mail
Favicon
Monitoramento de Eventos no AWS SES com Filtros no CloudWatch Logs
Favicon
Mail-in-a-Box (Relay AWS SES)
Favicon
Streamline Email Sending with AWS SES, Lambda, and S3 Integration
Favicon
AWS Lambda with CloudWatch for Seamless EC2 State Change Notifications through SES.
Favicon
Send mail by SES CLI
Favicon
CLIでパールを送俑する
Favicon
Sending Email with Amazon SES on NodeJS
Favicon
Integrating AWS Simple Email Service (SES) with Laravel: A Comprehensive Guide
Favicon
The Differences In Sending Email Actions Between SES Version 1 and Version 2 APIs
Favicon
Unlocking Real-Time Insights: Harnessing Lambda and SES to Supercharge S3 Bucket Alerts
Favicon
Tracking Email Activity from AWS Simple Email Service (SES)
Favicon
Streamline Email Sending with AWS SES, Lambda, and S3 Integration
Favicon
Setup WordPress using AWS Lightsail
Favicon
Getting Started with SES: Required Permissions to Send Emails
Favicon
AWS SES - Core Concepts

Featured ones: