Extension that aims to integrate Amazon Web Services (AWS) with CiviCRM, currently it integrates with Simple Email Service (SES) and Simple Notification Service (SNS) to handle CiviMail bounces and open and click tracking.
The extension is licensed under AGPL-3.0.
- PHP v7.1+
- CiviCRM 5.8+
This extension has not yet been published for installation via the web UI.
Sysadmins and developers may download the .zip
file for this extension and
install it with the command-line tool cv.
cd <extension-dir>
cv dl aws@https://github.com/mecachisenros/aws/archive/master.zip
Sysadmins and developers may clone the Git repo for this extension and install it with the command-line tool cv.
git clone https://github.com/mecachisenros/aws.git
cv en aws
First you'll need to create an IAM user to get the access you need to use this extension.
- Login to the AWS console
- Click the Add user button
- Enter a name for the user i.e. CiviUser
- Under Access type check the checkbox for Programmatic access
- Click the Next: Permissions button
- Click the Attach exisiting policies directly in the Set permissions section
- Type AmazonSESFullAccess in the search bar and check the checkbox to add the permission
- Type AmazonSNSFullAccess in the search bar and check the checkbox to add the permission
- Click the Next: Review button
- Click the Create user button
You will see the user security credentials (Access Key ID and Secret Access Key), copy and store them in a safe place or download the .csv
as Amazon will not show them again. If you lose them you can always create a new user.
It's recommended to set your user credentials in the civicrm.settings.php
file, like below:
/**
* CiviCRM AWS Access Key.
*/
if (!defined('CIVICRM_AWS_ACCESS_KEY')) {
define('CIVICRM_AWS_ACCESS_KEY', 'your_access_key');
}
/**
* CiviCRM AWS Secret Key.
*/
if (!defined('CIVICRM_AWS_SECRET_KEY')) {
define('CIVICRM_AWS_SECRET_KEY', 'your_secret_key');
}
/**
* CiviCRM AWS Region.
* Avalable regions for SES/SNS are:
* us-east-1|us-west-2|eu-west-1
*/
if (!defined('CIVICRM_AWS_REGION')) {
define('CIVICRM_AWS_REGION', 'eu-west-1');
}
Alternatively, you can navigate to Administer/AWS/User Credentials and set your user credentials and region.
- Navigate to Administer/AWS/SES Identities and Configuration sets
- Click on Verify new identity
- Add your Identity, domain or email address
- Check the Create SNS Topic box
- Click save
The rest of fields are optional, an Identity will be created with it's SNS topic and Subscription for Bounce and Complaints notifications. The Topic name if left empty, it will be automatically created in the form of:
example.org
=>example_org
me@example.org
=>me_at_example_org
Once saved you can view the verfication token and dkim tokens that you must add to your domain's DNS records by clicking on the identity name.
- Sign in to the SES console
- Click on SMTP Settings in the navigation menu
- Click on Create My SMTP Credentials
- Type a name for the SMTP user
- Click the Create user button
- Click on Show User credentials and Download credentials
In CiviCRM set your Outbound Mail settings to use SMTP.
SMTP Server:
- email-smtp.us-east-1.amazonaws.com
- email-smtp.us-west-2.amazonaws.com
- email-smtp.eu-west-1.amazonaws.com
SMTP Port: 587 Authentication: Yes SMTP Username: you smtp username SMTP ServerPassword: your smtp password
Ensure your default Mail Account for bounce processing is set to use a domain that you verified in SES.
Ensure that your From Emails Address Options are verified in the SES.
- Sign in to the SES console
- Click on Configuration Sets in the navigation menu
- Click on Create Configuration Set
- Type a name
- Click the Create Configuration Set button
- Click on the Configuration set you just created
- In the Add destination dropdown select SNS
- Type a name
- Check the boxes Open and Click
- Select the Topic created for your verfied domain i.e
example_org
- Click save
When cretting a Mailing, the tracking tab has a new option Track with AWS SES/SNS, check the option and select the Configuration set you just created.
All URLs will be tracked using SES tracking, including CiviCRM Contribution, Profiles, and Events URLs.
You can set a default Configuration set to be used for every mailing navigation to Administer/AWS/SES Settings.
- One click option to generate/set the SMTP password
- API for SES configuration sets
- Forms to create/edit configuration sets
- List Configuration sets in the Identities page
- Send using SES API
- Integrate S3 for file storage