AWS SES Introduction

Amazon SES is a service that allows AWS users to send outbound bulk email correspondence. This post cover the basis about this service.

Verifying your email

AWS requires email verification in order to grant that emails are being sent only by email owners. Verifying process is quick and simple you only have to login in your AWS account and follow the steps contained on this link: Verifying Email Addresses in Amazon SES

Grant sending access to a group

Is good idea have different groups for different tasks, below a json policy that can be used to grant ses access to a group:

    {
        "Version": "2012-10-17",
        "Statement":[{
           "Effect":"Allow",
           "Action":["ses:SendEmail", "ses:SendRawEmail"],
           "Resource":"*"
           }
        ]
     }

To assing the policy to some group we can execute the command below:

    $aws iam put-group-policy --group-name webapp --policy-document file://ses-policy.json --policy-name ses-webapp

AWS-cli and SES

We can access AWS SES using console aws client, to see a complete of avaiable commands you can type aws ses help . First thing We can do is to list the identities associated to the AWS account with the command aws ses list-identities :

    $aws ses list-identities

    {
        "Identities": [
            "email@mydomail.com"
        ]
    }

Sending messages

aws ses send-email --from email@mydomail.com --to user@box.com --subject 'test message' --text 'hello world'  --html 'hello world'

References