Simple Email Service (SES)

AWS’s Simple Email Service (SES) can be used to send batches of emails to users. In contrast to Simple Notification Service (SNS), which requires that users subscribe to a topic, SES may be used to arbitrarily send emails to users. This may be done without recipient verification once the SES account is moved out of sandbox mode. Because of this, it is a useful service for automated email notifications or mailing lists.

Configuration

First, configure an authentication provider using your AWS security credentials. After doing so, configure a data source—choosing Amazon SES as the data source type.

AWS Access Permissions

When using AWS APIs, it is best practice to utilize strict and well-defined IAM policies so users can only perform actions they have explicit access to.

Listed below are the permissions this data source type requires to properly function. Use this list to better define your IAM roles.

  • ses:SendEmail

Verify Email Addresses

SES requires that any email addresses used to send emails are verified. To verify email addresses, follow AWS documentation, ensuring that the region you verify the address within matches the AWS region selected within the Skuid authentication provider.

Note

Until your AWS account is taken out of sandbox mode, all recipient emails must be verified as well. See Moving out of the Amazon SES Sandbox from AWS documentation.

Using the AWS SES data source

Data source actions

The SES data source is used exclusively to send emails through its one data source action, which can be selected anywhere the Action Framework is accessible, such as Button Set components or as row actions on Tables.

  • Send Email: Sends an email through SES. Each of its properties is compatible with merge syntax.

    • To: The email address or addresses that will receive the email. Can accept multiple addresses delimited by a comma.
    • Cc: The email address that will also receive the email as a carbon copy (Cc), meaning other recipients of the email will see that other addresses received the email. Can accept multiple addresses delimited by a comma.
    • Bcc: The email address that will also receive the email as a blind carbon copy (Bcc), which will hide that the Bcc addresses received the email from other recipients. Can accept multiple addresses delimited by a comma.
    • Sender: The email address that will be used to send the email. This email address must be verified within the appropriate AWS region.
    • Email Display name: The name displayed by the sender email, typically the name of the person or organization sending the email.
    • Subject: The subject line of the email.
    • Body: The body of the email message. You may use HTML code within this message.

Email partitioning

SES has a maximum of 50 emails per batch, however Skuid can send more than 50 emails at a time. Skuid partitions emails into batches based on the priority of the recipients, which are ranked as follows:

  1. To recipients
  2. Cc recipients
  3. Bcc recipients

For example, an SES action sends emails to 25 To recipients, 50 Cc recipients, and 75 Bcc recipients. These emails will be sent in 3 batches.

  1. All 25 To recipients + the first 25 Cc recipients
  2. The remaining 25 Cc recipients + the first 25 Bcc recipients
  3. The final 50 Bcc recipients

Warning

If a subsequent batch fails—perhaps due to an email address formatting error or an issue with the SES service—it’s not possible to rollback. For example, if the third batch of emails fails, the first two batches will be sent to the first 100 recipients regardless.

Troubleshooting

My emails are not sending. [[]]

SES data source actions may fail without notifying the user unless an on-error action is added.

In many cases, you can glean useful troubleshooting information from the response AWS sends back to Skuid’s network request.

How to open the Network tab depends on your browser:

Some common causes of SES errors include:

  • The SendEmail permission: If this permission is not added to the IAM role used for the data source’s authentication provider, the action will fail. Verify that this role has the necessary permission.

  • Misformed merge variables: Ensure that all merge variables used in the action’s properties are correct. A misformed merge variable in any property will break the entire action.

  • Unverified emails: Ensure that the email used in the Sender property is verified for the authentication provider’s IAM role.

    • If the email address is verified, double check that the region in which it is verified matches the Skuid authentication provider’s region.
  • Unverified emails in sandbox mode: Ensure that recipient email addresses are verified if testing SES in sandbox mode. Emails may only be sent to unverified recipients when your SES account has been moved out of sandbox mode.