The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Signer::AWSv4::SES - Generate passwords for sending email through SES SMTP servers with IAM credentials

SYNOPSIS

  use Signer::AWSv4::SES;
  $pass_gen = Signer::AWSv4::SES->new(
    access_key => 'AKIAIOSFODNN7EXAMPLE',
    secret_key => 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY',
    region => 'us-east-1',
  );
  $pass_gen->smtp_password;

DESCRIPTION

Generate passwords for sending email through SES SMTP servers with IAM credentials. The IAM user needs to have the ses:SendRawEmail IAM permission to be able to send mail.

This module generates v4 signatures for SES, unlike lots of other examples around the Internet, that use the old v2 signature scheme, although a fallback for obtaining a v2 password is still there, just in case you want to use it.

Request Attributes

This module requires access_key, secret_key and region passed to the constructor

Signature Attributes

smtp_user

This has to be used as the user for SMTP authentication to the SES SMTP endpoint

smtp_password

This has to be used as the password the SMTP authentication

smtp_password_v2

This is the password in Version 2 format (not recommended). It is not dependant on the region, so you can basically pass any value to it if you're only interested in the v2 signature.

Extra Attributes

smtp_endpoint

This calculates the name of the SMTP endpoint in funtion of the region.

SEE ALSO

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp.html

BUGS and SOURCE

The source code is located here: https://github.com/pplu/AWSv4Signer

Please report bugs to: https://github.com/pplu/AWSv4Signer/issues

AUTHOR

    Jose Luis Martinez
    pplusdomain@gmail.com

COPYRIGHT and LICENSE

Copyright (c) 2018 by Jose Luis Martinez

This code is distributed under the Apache 2 License. The full text of the license can be found in the LICENSE file included with this module.