Which AWS Simple Email Service API is the latest
Asked Answered
A

4

4

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

Audly answered 10/2, 2023 at 21:55 Comment(5)
I can't answer that, but this is where I would use wrapper functions so only a few functions grouped together use the API directly. You also get to hide the low-level details from the rest of your code and just say MySendEmail( from, to, cc, body );Traweek
I've found the SES v2 API to actually be lacking some features that are present in the SES v1 API. All I can say is it's probably best to try using the v2 API if you can, but look at the v1 API if v2 isn't working for you.Coroner
@MarkB So it sounds like the solution is to use the v2 API where I can, but if I find a feature that is not supported by v2 then I should fall back to v1. Can it be assumed that at some point in the future v2 will be feature complete and v1 will be removed?Audly
@Audly I would not make that assumption.Coroner
@MarkB Is there anything from AWS explaining why there are two versions of the API then? It seems strange to create a second version rather than just adding to the first if they're going to keep supporting bothAudly
C
2

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.

Congratulate answered 13/2, 2023 at 17:15 Comment(2)
You are talking about the CLI version, not the SES api versionConstellate
good catch.. let me update my answer.Congratulate
N
0

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.
Nearly answered 29/3 at 12:7 Comment(0)
B
0

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

Bunyan answered 7/6 at 9:9 Comment(0)
D
-1

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.

Devolve answered 10/2, 2023 at 23:33 Comment(3)
The op is talking about the api shape itself not the sdk versionDeenadeenya
See docs.aws.amazon.com/sdkfornet/v3/apidocs/items/SimpleEmailV2/…Deenadeenya
They asked about a version of an API (the SES API which has two version) and you provided an answer about which version of the SDK they should be using. API != SDK.Coroner

© 2022 - 2024 — McMap. All rights reserved.