Nexial Automation

Test Automation Platform for everyone!

X

aws.ses

SES, or Simple Email Service, is a cloud service provided by Amazon AWS. One can utilize such service to send, receive and manage email activities in the cloud. Currently Nexial supports the use of SES for sending email to one or more recipients (to, cc, or bcc). The email content can be either HTML or plain text.

Connection Setup

Similar to other command collections in Nexial, the commands of this command type utilize a profile-based approach to connect to the target AWS services. A profile is a collection of data variables that share the same prefix. In this case, below are the data variables that make up an AWS connectivity profile:

data variable value note
<profile>.aws.accessKey The access key valid for the target AWS service For more information, consult AWS online documentation
<profile>.aws.secretKey The secret key valid for the target AWS service More information available on AWS online documentation
<profile>.aws.region The target region to connect to Available AWS regions. Scroll down to the relevant service section
<profile>.aws.url The URL of the service (Required only when not using AWS, eg. minio, localstack, etc)  
<profile>.aws.assumeRoleArn (OPTIONAL) The ARN that represents the role to assume Only required if “assume role” is desired.
<profile>.aws.assumeRoleSession (OPTIONAL) The session name that represents the temporarily role Specify a session name that can be useful for tracking temp. role activities.
<profile>.aws.assumeRoleDuration (OPTIONAL) The duration of the role temporarily switched Specify the duration of the role switching.


Note that if “assume role” is desired, <profile>.aws.assumeRoleSession is required.

In addition, the following connection configuration should be considered as well:

data variable value note
<profile>.aws.from The “from” address for each email sent via this profile (REQUIRED) A valid email address (not necessarily a valid email account)
<profile>.aws.cc The “cc” address(es) for each email sent via this profile Multiple email addresses are separated by nexial.textDelim
<profile>.aws.bcc The “bcc” address(es) for each email sent via this profile Multiple email addresses are separated by nexial.textDelim
<profile>.aws.replyTo The “reply-to” address(es) for each email sent via this profile If supplied, this is the “reply to” email address(s). If not, the to address will be assumed. Multiple email addresses are separated by nexial.textDelim
<profile>.aws.configurationSetName The SES rules to apply on sending emails Using Amazon SES Configuration Sets
<profile>.aws.xmailer The extra “tag line” at the end of each email sent Useful to provide contextual information regarding the email content. For example, one could add $(execution|script|name) on $(execution|meta|nexial) as a “X-Mailer” to indicate where the email is sent from (i.e. which script and with which version of Nexial)


For example, suppose we have a “profile” named as mailer:
profile

Shown above, mailer will be used as a “profile” throughout the “aws.ses” commands for SES-related automation.

NOTE:

  1. Consider using nexial-crypt to encrypt your access key and secret key information.
  2. It is possible to create multiple profiles and use them selectively during execution.

The “aws.ses” command type represents a series of commands regarding AWS SES.

Available Commands