a month ago
Hey,
Does anyone know if AWS SES being blocked at at the network level is a known limitation of Railway?
See below for my debug trace.
Best
Matt
[Better Auth POST] Request received: https://0.0.0.0:8080/api/auth/sign-in/magic-link
[Better Auth POST] Request body: {"email":"<redacted>","callbackURL":"/"}
[Network Debug] DNS resolved to IPs: [ '52.31.197.18' ]
[Network Debug] Testing HTTPS connection to: email.eu-west-1.amazonaws.com
[Network Debug] Socket assigned
[Network Debug] Socket DNS resolved to: 52.31.197.18
[Better Auth] sendMagicLink called for: <redacted>
[Better Auth] Magic link URL: https://<redacted>/api/auth/magic-link/verify?token=<redacted>
[SES] Starting sendMagicLinkEmail for: <redacted>
[SES] Sender address: "<redacted>" <noreply@<redacted>>
[SES] Creating SendEmailCommand
[SES] Sending email via SES...
[Network Debug] Diagnostics complete
[Network Debug] Request timeout after 5000ms
[Network Debug] HTTPS connection failed after 5029 ms
[Network Debug] Error: socket hang up
[Network Debug] Error code: ECONNRESET
@smithy/node-http-handler - [WARN] a request has exceeded the configured 10000 ms requestTimeout. Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.
@smithy/node-http-handler - [WARN] a request has exceeded the configured 10000 ms requestTimeout. Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.
code: 'ETIMEDOUT',
syscall: 'connect',
address: '34.252.104.46',
port: 443,
at async handler (/app/.next/server/app/api/auth/[...all]/route.js:53:3239)
name: 'TimeoutError',
at async n (/app/.next/server/app/api/auth/[...all]/route.js:53:2818)
at async gi (/app/.next/server/app/api/auth/[...all]/route.js:249:25353)
'$metadata': { attempts: 2, totalRetryDelay: 69 }
at async handler (/app/.next/server/app/api/auth/[...all]/route.js:53:3239)
}
8 Replies
a month ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
a month ago
Hello,
Outbound SMTP is only available on the Pro plan and above, while Free, Trial, and Hobby plans have SMTP disabled.
For sending emails from your application, please use a dedicated email service that provides HTTPS APIs. More information can be found in our documentation:
https://docs.railway.com/reference/outbound-networking
Best regards,
The Railway Team
Status changed to Awaiting User Response Railway • 28 days ago
brody
Hello,Outbound SMTP is only available on the Pro plan and above, while Free, Trial, and Hobby plans have SMTP disabled.For sending emails from your application, please use a dedicated email service that provides HTTPS APIs. More information can be found in our documentation:https://docs.railway.com/reference/outbound-networkingBest regards,The Railway Team
a month ago
Hi,
But i’m not using SMTP, it’s using the AWS SES API on HTTPS (port 443), see the trace.
Thanks
Status changed to Awaiting Railway Response Railway • 28 days ago
a month ago
Railway does not block any HTTP requests. Does this same request work locally?
samgordon
Railway does not block any HTTP requests. Does this same request work locally?
a month ago
Yup, works locally with the same credentials. Also it’s a TCP timeout not a HTTP failure, so either Railway is blocking outbound HTTPS to SES API’s or AWS is blocking Railway.
mabibby
Yup, works locally with the same credentials. Also it’s a TCP timeout not a HTTP failure, so either Railway is blocking outbound HTTPS to SES API’s or AWS is blocking Railway.
a month ago
Can you try moving your application to a different region?
samgordon
Can you try moving your application to a different region?
a month ago
Yup, so I moved it to US East and it works, must be something about the EU region...
a month ago
I'm going to escalate this thread. To the team: is there anything that can be done with various service's blocking entire Railway regions? I've seen this more and more as of recently.
Status changed to Solved samgordon • 27 days ago
