Connect Amazon SES securely
Replifier sends through your own Amazon SES account. This guide explains the two ways to connect it and which permissions you give Replifier in each. The wizard in the app (providers section, Amazon SES) gives you the policies already filled in with your domain, region and senders; the examples here use the domain midominio.com, the example account 111122223333 for yours and 444455556666 for Replifier’s.
Why a role is safer than keys
Section titled “Why a role is safer than keys”With an AWS role (the recommended option), your account lets Replifier assume a role with minimal permissions. Replifier requests temporary credentials each time it needs them:
- There are no credentials to steal. Replifier stores no keys from your account.
- Credentials last 1 hour. They expire on their own and Replifier requests new ones.
- You revoke access by deleting the role. Without the role, Replifier can no longer get new credentials.
With access keys, Replifier stores, encrypted, a key and its secret that never expire until you deactivate them. Use them only if you cannot create a role.
What the external ID is and why Replifier generates it
Section titled “What the external ID is and why Replifier generates it”The external ID is a random value, unique to your connection, that goes in the role’s trust policy. Replifier can only assume your role if it presents that same value. This prevents the “confused deputy” problem: someone else who also uses Replifier handing over your role’s ARN so that Replifier acts on your account.
That is why Replifier generates the external ID, not you: if you picked it, someone else could guess or reuse it. AWS explains this in its guide on giving third parties access with an external ID. It is not a secret, but do not share it outside your AWS account.
Step by step with CloudFormation (recommended)
Section titled “Step by step with CloudFormation (recommended)”- In the app, open the Amazon SES wizard, enter the region, the domain and the approved senders (if you leave it empty, any
@midominio.comaddress) and choose AWS role (recommended). - Press Create the role in AWS. The CloudFormation console opens in your region with a quick-create link and the parameters already filled in:
ExternalId,Domain,Senders,RoleNameandPlatformAccountId. - Check in the console that the domain and senders are yours and that the role name starts with
ReplifierSES-(for example,ReplifierSES-midominio-com). - Tick the box acknowledging that CloudFormation will create IAM resources with custom names. Without it, the console will not create the stack.
- Press Create stack and wait until the status is
CREATE_COMPLETE. - The stack’s Outputs tab shows
RoleArn, shaped likearn:aws:iam::111122223333:role/ReplifierSES-midominio-com. Copy it. - Paste it in the app and press Validate and connect.
Step by step by hand
Section titled “Step by step by hand”If you prefer not to use CloudFormation, create the role in the IAM console (AWS guide):
- In IAM, go to Roles, then Create role, and choose AWS account, Another AWS account.
- Enter the Replifier account ID shown in the app and tick Require external ID. Paste the external ID from the app.
- Give the role exactly the name the app gives you. The
ReplifierSESprefix is required: Replifier can only assume roles with that prefix. - Add the permissions policy. The app gives it to you with your account, region, domain and senders; it looks like this:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "SendOnlyFromApprovedSenders", "Effect": "Allow", "Action": [ "ses:SendEmail", "ses:SendRawEmail" ], "Resource": [ "arn:aws:ses:us-east-1:111122223333:identity/midominio.com", "arn:aws:ses:us-east-1:111122223333:configuration-set/*" ], "Condition": { "StringLike": { "ses:FromAddress": [ "ventas@midominio.com" ] } } }, { "Sid": "ReadAndVerifyDomainIdentity", "Effect": "Allow", "Action": [ "ses:GetEmailIdentity", "ses:CreateEmailIdentity" ], "Resource": "arn:aws:ses:us-east-1:111122223333:identity/midominio.com" }, { "Sid": "ReadAccountStatus", "Effect": "Allow", "Action": "ses:GetAccount", "Resource": "*" } ]}- Check that the role’s trust policy looks like this, with the external ID from the app:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::444455556666:root" }, "Action": "sts:AssumeRole", "Condition": { "StringEquals": { "sts:ExternalId": "<EXTERNAL_ID>" } } } ]}- Copy the role’s ARN, paste it in the app and press Validate and connect.
If you use access keys
Section titled “If you use access keys”If you cannot create a role:
- Create an IAM user just for Replifier (AWS guide), without console access.
- Attach only the least-privilege policy from the previous section, the one the app gives you already filled in. In the app, Review my policy tells you what is extra or missing without calling AWS.
- Never use the root account’s keys. Replifier rejects them (
ses_root_keys_rejected). AWS recommends not creating keys for the root user. - Rotate the key every 90 days (how to rotate access keys): create a new one, update it in the app and deactivate the old one.
- Turn on MFA in your AWS account (AWS guide), especially for the root user.
To validate keys, Replifier only makes calls that do not raise alerts in AWS: sts:GetCallerIdentity, ses:GetAccount and ses:GetEmailIdentity. It never enumerates your IAM permissions or sends test emails meant to fail.
What Replifier can and cannot do with these permissions
Section titled “What Replifier can and cannot do with these permissions”The policy, action by action (SES authorization reference and access control in SES):
| Action | What Replifier uses it for | Limit |
|---|---|---|
ses:SendEmail, ses:SendRawEmail |
Send your campaigns and transactional emails. | Only with your domain’s identity and only from the approved senders (ses:FromAddress condition). |
ses:GetEmailIdentity |
Check whether your domain is verified and its DKIM status. | Only your domain. |
ses:CreateEmailIdentity |
Add your domain to SES if it does not exist yet, so you can verify it. | Only your domain. |
ses:GetAccount |
Know whether the account is in the sandbox and what your sending quota is. | Read only; AWS does not allow limiting it to a resource. |
What it cannot do: send from another domain or address, read your contacts or email in other services, touch IAM, create users or keys, change your SES configuration, delete identities or use any other AWS service.
How to revoke access
Section titled “How to revoke access”You can remove Replifier’s access at any time:
- Role created by CloudFormation: delete the stack; the role is deleted with it.
- Role created by hand: delete the role or remove Replifier’s account from its trust policy. Temporary credentials already issued expire in less than 1 hour; to cut them off at once, revoke the role’s active sessions.
- Keys: deactivate and delete the key in IAM, or delete the Replifier user.
Also disconnect the provider in the app so Replifier stops trying to send with it.
Moving out of the SES sandbox
Section titled “Moving out of the SES sandbox”New SES accounts start in the sandbox: they only send to verified addresses and with a low limit. The app warns you if your account is still there; it is not an error, but you will not be able to send to your contacts. Request production access in the SES console following the AWS guide.
Common problems
Section titled “Common problems”- The role does not exist or does not trust Replifier. Check that the ARN is complete and from your account, that the role starts with
ReplifierSESand that its trust policy has the Replifier account the app gave you. - The external ID does not match. Each time you open the wizard, Replifier generates a new external ID. If you created the role with an earlier one, create the stack again from the app’s button or change the role’s
sts:ExternalIdcondition to the current value. - The domain is not verified in SES. Verify it in the SES console, in the same region you chose in the app (AWS guide), and validate again.
- The account is in the sandbox. It is a warning, not an error: follow the steps in the previous section.
- Root account keys rejected. Create an IAM user just for Replifier, as in the keys section.
Done when
Section titled “Done when”The app shows Amazon SES as connected and your test email from an approved sender reached your inbox.