-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Symfony version(s) affected: 4.4/5.0
Description
When using the SesApiTransport on the ap-southeast-2 region and valid credentials requests will fail with the following error
Unable to send an email: The security token included in the request is invalid (code InvalidClientTokenId).
How to reproduce
Configure the Mailer with AWS API transport with region (ses+api://AWS_ACCESS_KEY_ID: AWS_SECRET_ACCESS_KEY@default?region=ap-southeast-2) and attempt to use the transport to send mail.
Possible Solution
My investigation seems to indicate that the issue is caused by the way the authorization signature is generated https://github.com/symfony/amazon-mailer/blob/master/Transport/SesApiTransport.php#L85
as the result from the official sdk is quite different.
Additional context
As a work around I've developed a custom transport that relies on the aws-php-sdk package for, unfortunately the base Transport class does not allow the addition of custom Transports so I can not use Transport::fromDsn(
ses+sdk:...)
to instantiate my transport