What is the difference between @aws-sdk/client-ses and @aws-sdk/client-sesv2?
Asked Answered
L

3

8

AWS's SDK for JavaScript version 3 seems to have 2 different clients for Simple Email Service (SES).

I realized I have been using @aws-sdk/client-sesv2 but:

  • The actual doc on their GitHub repos is really hard to understand (see v1 and v2)
  • Nowhere in the Github example do they show an example of sending an email or why there are 2 versions
  • I found this more useful documentation but they don't even mention v2?

Are we supposed to use v1 or v2? What are the differences between both?

Lippmann answered 8/12, 2022 at 20:36 Comment(0)
L
9

After poking around, the AWS SDK for JavaScript seems to have two versions:

Version 2 of the SDK is meant to be entering maintenance mode in 2023.

Now that this first layer of confusion is cleared out, the AWS SES API also has 2 versions:

So based on this investigation, I presume that the packages points to the different API versions.

Lippmann answered 8/12, 2022 at 20:56 Comment(2)
Did you ever find out what is going on here? I also noticed that the SES API has two versions, but I cannot find out why... I posted a similar question here #75416974Filmdom
I just replied back on your question. Version 2 would be the one I would implement to avoid upgrading later.Lippmann
G
0

Despite the name, v2 is actually the older version of the client.

You should use @aws-sdk/client-ses, which is v3.

Source:

See the code examples section in AWS SES docs, click the "Javascript" tab, the code example is headed:

SDK for JavaScript (v3)

With the code snippet starting:

import { SendEmailCommand } from "@aws-sdk/client-ses";
Goaltender answered 10/11, 2023 at 20:48 Comment(0)
E
0

According to this post, SESv2 API is introduced in 2020 as apposed to other OP says, so v2 is the newer version.

Earthaearthborn answered 12/8 at 0:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.