# Keycloak SES with IAM Role based permission

**URL:** <https://forum.keycloak.org/t/keycloak-ses-with-iam-role-based-permission/27670>\
**Category:** Configuring the server\
**Created:** [August 30, 2024, 7:24am UTC](https://forum.keycloak.org/t/keycloak-ses-with-iam-role-based-permission/27670 "2024-08-30T07:24:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![prifulnath](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/prifulnath/32/10323_2.png) [@prifulnath](https://forum.keycloak.org/u/prifulnath)\
**Post date:** [August 30, 2024, 7:24am UTC](https://forum.keycloak.org/t/keycloak-ses-with-iam-role-based-permission/27670/1 "2024-08-30T07:24:03Z")

</div>

Is it possible to use SES without username and password (by turning off the authentication) in Keycloak?

I asked why this error before [here](https://forum.keycloak.org/t/email-issue-in-keycloak-530-authentication-required/27660). But now i am doubting even SES without authentication is possible in keycloak?

More info from other post:

I added policy for the user the IAM user for send email via SES.

But, whenever I am trying to configure it without Authentication i am getting two errors with different ports,

```auto
2024-08-29 14:08:56,827 ERROR [org.keycloak.services.resources.admin.RealmAdminResource] (executor-thread-340) Failed to send email
org.eclipse.angus.mail.util.MailConnectException: Couldn't connect to host, port: email-smtp.us-east-1.amazonaws.com, 25; timeout 10000;
  nested exception is:
        java.net.SocketTimeoutException: Connect timed out

```

and

```auto
org.keycloak.email.EmailException: org.eclipse.angus.mail.smtp.SMTPSendFailedException: 530 Authentication required

```

My keycloak configuration is as follows,

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/f/fbb54d46911ecfd50b4dc12821756fcd019525b9.png)  
 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/3/338af5b1299ace152f01c311af1805017ad2d8c8.png)

Thanks in advance for your help 🙂

---

<div class="post-metadata">

**Author:** ![prifulnath](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/prifulnath/32/10323_2.png) [@prifulnath](https://forum.keycloak.org/u/prifulnath)\
**Post date:** [August 30, 2024, 9:20am UTC](https://forum.keycloak.org/t/keycloak-ses-with-iam-role-based-permission/27670/2 "2024-08-30T09:20:29Z")

</div>

Found a discussion thread: [How can I configure Keycloak to send emails using AWS SES with IAM roles, instead of using IAM users, to follow best practices? · keycloak/keycloak · Discussion #32010 (github.com)](https://github.com/keycloak/keycloak/discussions/32010) So i guess it is not possible.
