18

I am confused by the difference in the javascript aws-sdk between SES and SESV2. My default assumption would be that V2 is an upgrade/update and should cover all the functionality that the base SES module has, but there seems to be numerous gaps, at the very least those functions dealing with Receipt Rule Sets seem to be missing. Or am I missing something?

For example, "listReceiptRuleSets" is in the aws-sdk SES, but not in SESv2. Is there an equivalent action in V2?

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SES.html#listReceiptRuleSets-property

https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SESV2.html

Taterhead
  • 5,763
  • 4
  • 31
  • 40
david barg
  • 181
  • 1
  • 9
  • 1
    Did you find out anything about the differences? Is it indeed an upgrade or same grade or a downgrade? – pratikpc Apr 10 '21 at 08:35
  • 1
    no, still doesn't really make sense to me – david barg Apr 11 '21 at 18:00
  • 1
    I noticed that ses-v2 has a `SendBulkEmailCommand` that allows to send an email to multiple destinations and it's not available in the ses v1. – Claudio Catterina Aug 24 '21 at 08:33
  • 1
    v2's `SendBulkEmail` appears to have the same capabilities as v1's `SendBulkTemplatedEmail`. – medmunds May 02 '22 at 17:57
  • 2
    [As of 2022-04-26](https://aws.amazon.com/about-aws/whats-new/2022/04/amazon-ses-v2-supports-email-size-40mb-inbound-outbound-emails-default/), the v2 APIs can be used to send or receive messages up to 40 MB. v1 is still apparently limited to 10 MB send, 30 MB receive. – medmunds May 02 '22 at 17:59
  • 1
    Sorry, my mistake: [v1 can also handle up to 40 MB](https://aws.amazon.com/about-aws/whats-new/2021/09/amazon-ses-emails-message-40mb/), and increased its limits before v2. :shrug: – medmunds May 02 '22 at 22:04
  • 1
    The v2 API adds features for managing "[contact lists](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_CreateContactList.html)" and "contacts", which seem to be for bulk mailing lists. (Contacts can be subscribed to various "topics" within a list. But it's not clear how you can send mail to a contact list or a topic.) v2 also adds [suppression list](https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_DeleteSuppressedDestination.html) management APIs. And there's a new (and expensive!) "deliverability dashboard" that can only be enabled through v2. – medmunds May 02 '22 at 22:16

1 Answers1

8

Using this answer as a guide, I wrote the following

// Load the AWS SDK for Node.js
var AWS = require('aws-sdk');

AWS.config.apiVersions = {
    sesv1: '2010-12-01',
    sesv2: '2019-09-27'
  };

  var sesv1 = new AWS.SES();
  var sesv2 = new AWS.SESV2();

  //list intance methods
  console.log(Object.getOwnPropertyNames(Object.getPrototypeOf(sesv1))
  .filter(m => 'function' === typeof sesv1[m]))

  console.log(Object.getOwnPropertyNames(Object.getPrototypeOf(sesv2))
  .filter(m => 'function' === typeof sesv2[m]))

ran this with node and YES, there are major differences:

v1:

[
  'constructor',
  'cloneReceiptRuleSet',
  'createConfigurationSet',
  'createConfigurationSetEventDestination',
  'createConfigurationSetTrackingOptions',
  'createCustomVerificationEmailTemplate',
  'createReceiptFilter',
  'createReceiptRule',
  'createReceiptRuleSet',
  'createTemplate',
  'deleteConfigurationSet',
  'deleteConfigurationSetEventDestination',
  'deleteConfigurationSetTrackingOptions',
  'deleteCustomVerificationEmailTemplate',
  'deleteIdentity',
  'deleteIdentityPolicy',
  'deleteReceiptFilter',
  'deleteReceiptRule',
  'deleteReceiptRuleSet',
  'deleteTemplate',
  'deleteVerifiedEmailAddress',
  'describeActiveReceiptRuleSet',
  'describeConfigurationSet',
  'describeReceiptRule',
  'describeReceiptRuleSet',
  'getAccountSendingEnabled',
  'getCustomVerificationEmailTemplate',
  'getIdentityDkimAttributes',
  'getIdentityMailFromDomainAttributes',
  'getIdentityNotificationAttributes',
  'getIdentityPolicies',
  'getIdentityVerificationAttributes',
  'getSendQuota',
  'getSendStatistics',
  'getTemplate',
  'listConfigurationSets',
  'listCustomVerificationEmailTemplates',
  'listIdentities',
  'listIdentityPolicies',
  'listReceiptFilters',
  'listReceiptRuleSets',
  'listTemplates',
  'listVerifiedEmailAddresses',
  'putConfigurationSetDeliveryOptions',
  'putIdentityPolicy',
  'reorderReceiptRuleSet',
  'sendBounce',
  'sendBulkTemplatedEmail',
  'sendCustomVerificationEmail',
  'sendEmail',
  'sendRawEmail',
  'sendTemplatedEmail',
  'setActiveReceiptRuleSet',
  'setIdentityDkimEnabled',
  'setIdentityFeedbackForwardingEnabled',
  'setIdentityHeadersInNotificationsEnabled',
  'setIdentityMailFromDomain',
  'setIdentityNotificationTopic',
  'setReceiptRulePosition',
  'testRenderTemplate',
  'updateAccountSendingEnabled',
  'updateConfigurationSetEventDestination',
  'updateConfigurationSetReputationMetricsEnabled',
  'updateConfigurationSetSendingEnabled',
  'updateConfigurationSetTrackingOptions',
  'updateCustomVerificationEmailTemplate',
  'updateReceiptRule',
  'updateTemplate',
  'verifyDomainDkim',
  'verifyDomainIdentity',
  'verifyEmailAddress',
  'verifyEmailIdentity'
]

v2:

[
  'constructor',
  'createConfigurationSet',
  'createConfigurationSetEventDestination',
  'createContact',
  'createContactList',
  'createCustomVerificationEmailTemplate',
  'createDedicatedIpPool',
  'createDeliverabilityTestReport',
  'createEmailIdentity',
  'createEmailIdentityPolicy',
  'createEmailTemplate',
  'createImportJob',
  'deleteConfigurationSet',
  'deleteConfigurationSetEventDestination',
  'deleteContact',
  'deleteContactList',
  'deleteCustomVerificationEmailTemplate',
  'deleteDedicatedIpPool',
  'deleteEmailIdentity',
  'deleteEmailIdentityPolicy',
  'deleteEmailTemplate',
  'deleteSuppressedDestination',
  'getAccount',
  'getBlacklistReports',
  'getConfigurationSet',
  'getConfigurationSetEventDestinations',
  'getContact',
  'getContactList',
  'getCustomVerificationEmailTemplate',
  'getDedicatedIp',
  'getDedicatedIps',
  'getDeliverabilityDashboardOptions',
  'getDeliverabilityTestReport',
  'getDomainDeliverabilityCampaign',
  'getDomainStatisticsReport',
  'getEmailIdentity',
  'getEmailIdentityPolicies',
  'getEmailTemplate',
  'getImportJob',
  'getSuppressedDestination',
  'listConfigurationSets',
  'listContactLists',
  'listContacts',
  'listCustomVerificationEmailTemplates',
  'listDedicatedIpPools',
  'listDeliverabilityTestReports',
  'listDomainDeliverabilityCampaigns',
  'listEmailIdentities',
  'listEmailTemplates',
  'listImportJobs',
  'listSuppressedDestinations',
  'listTagsForResource',
  'putAccountDedicatedIpWarmupAttributes',
  'putAccountDetails',
  'putAccountSendingAttributes',
  'putAccountSuppressionAttributes',
  'putConfigurationSetDeliveryOptions',
  'putConfigurationSetReputationOptions',
  'putConfigurationSetSendingOptions',
  'putConfigurationSetSuppressionOptions',
  'putConfigurationSetTrackingOptions',
  'putDedicatedIpInPool',
  'putDedicatedIpWarmupAttributes',
  'putDeliverabilityDashboardOption',
  'putEmailIdentityConfigurationSetAttributes',
  'putEmailIdentityDkimAttributes',
  'putEmailIdentityDkimSigningAttributes',
  'putEmailIdentityFeedbackAttributes',
  'putEmailIdentityMailFromAttributes',
  'putSuppressedDestination',
  'sendBulkEmail',
  'sendCustomVerificationEmail',
  'sendEmail',
  'tagResource',
  'testRenderEmailTemplate',
  'untagResource',
  'updateConfigurationSetEventDestination',
  'updateContact',
  'updateContactList',
  'updateCustomVerificationEmailTemplate',
  'updateEmailIdentityPolicy',
  'updateEmailTemplate'
]

I would suggest if you are dependent on a method that only exists in v1 to stick with using v1. If you find a method you have to use from v2, then you will have to build an instance of v2 and use it alongside the v1 object.

Taterhead
  • 5,763
  • 4
  • 31
  • 40