HomePhabricator

Update SES API to use AWSv4 signatures

Description

Update SES API to use AWSv4 signatures

Summary:
Ref T13570. Fixes T13235. In most cases, we use modern (v4) signatures for almost all AWS API calls, and have for several years.

However, sending email via SES currently uses an older piece of external code which uses the older (v3) signature method.

AWS is retiring v3 signatures on October 1 2020, so this pathway will stop working.

Update the pathway to use PhutilAWSFuture, which provides v4 signatures.

T13235 discusses poor error messages from SES. Switching to Futures fixes this for free, as they have more useful error handling.

Test Plan:

  • Configured an SES mailer, including the new region parameter.
  • Used bin/mail send-test to send mail via SES.
  • Sent invalid mail (from an unverified address); got a more useful error message.
  • Grepped for removed external, no hits.

Maniphest Tasks: T13570, T13235

Differential Revision: https://secure.phabricator.com/D21461