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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With