Campbell
Campbell

Reputation: 630

Which AWS Simple Email Service API is the latest

I am building an application using AWS SES, but it is not clear to me which version of the API I should be developing against.

Looking at the Amazon Simple Email Service Documentation I see both API and API v2 listed.

Logic would tell me to use v2 as that is a higher number, but at the same time the Developer Guide primarily references API (not API v2).

Similarly the Code examples section is much smaller for v2.

If I look at the .NET libraries, which is the SDK I would be using, it isn't much help either, and both versions have had updates pushed in the last 24 hours, and both are on version 3.10X.XX.

Is there any documentation from AWS that indicates the status of their SES SDKs and when particular versions are going to be deprecated? I would prefer not to start developing against a specific version only to find that support is ending for it in a short time.

Thanks

Upvotes: 4

Views: 2047

Answers (4)

AMAL
AMAL

Reputation: 81

Method Availability: In AWSSDK.SimpleEmailV2 for .NET Core, the SendEmail method is unavailable, and you must use the asynchronous SendEmailAsync method. This requires modifying existing methods to use async/await if not already structured that way.

Synchronous Alternatives: If restructuring isn't feasible, using SendEmailAsync().Wait() or SendEmailAsync().Result() is possible but risky. These synchronous alternatives can cause unwanted errors, like deadlocks, particularly in ASP.NET environments.

SES V1 Method Availability: In AWSSDK.SimpleEmail (SES V1), both SendEmail and SendEmailAsync methods are available. https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/SimpleEmailV2/MSimpleEmailServiceV2SendEmailSendEmailRequest.html

Upvotes: 0

Juanlu
Juanlu

Reputation: 79

Response from Amazon Q:

For sending emails using the Amazon SES API, you have the choice between using the @aws-sdk/client-ses package or the @aws-sdk/client-sesv2 package. Here are some key differences:

  • The @aws-sdk/client-ses package interacts with the original Amazon SES API (version 2010-12-01), while @aws-sdk/client-sesv2 interacts with the newer Amazon SES API version 2020-12-01.
  • The original SES API has reached the end of life and will be deprecated. So for new applications, it's recommended to use the SESv2 API and @aws-sdk/client-sesv2 package.
  • The SESv2 API provides additional functionality like support for contact lists, email templates, and event publishing to SNS topics. It also has improved support for things like email content filtering and delivery notifications.
  • The @aws-sdk/client-sesv2 package follows AWS SDK best practices with features like asynchronous operations, configuration builders, and response pagination.

Upvotes: 1

Nicolas Bouvrette
Nicolas Bouvrette

Reputation: 4767

Based on the information retrieved from the Amazon SES FAQs page, there is a clear distinction between the capabilities of Amazon SES V1 and V2 in terms of email size limits:

  • Amazon SES V2 API and SMTP accept email messages up to 40MB in size, including any images and attachments that are part of the message. Messages larger than 10MB are subject to bandwidth throttling.
  • Amazon SES API V1 accepts messages up to 10MB in size, including any images and attachments that are part of the message.

This suggests that if you need to send larger emails, Amazon SES V2 would be the better choice. However, there is still no explicit recommendation from Amazon for one version over the other.

Upvotes: 2

smac2020
smac2020

Reputation: 10734

Now the question you are asking is given the .NET SDK V3, what version of the SES .NET API should you use.

In the AWS Github, it uses SES .NET Service Client v1:

https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/dotnetv3/SES/Actions

However, now there is .NET Service Client v2.

https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/SimpleEmailV2/TSimpleEmailServiceV2Client.html

Both are supported and I do not think you have to worry about support for v1 ending in the short time. I will confirm and post back.

Upvotes: -1

Related Questions