- Más nuevo
- Más votos
- Más comentarios
I am not an expert in this, but these are some things that I have ran into related to CloudFront with S3, I am not sure that your issue is with SES at all.
- Check your Security groups or network access control lists (ACLs): If your CloudFront distribution is unable to establish a connection with the origin server due to restrictive network rules, such as security groups or ACLs, it may result in a 400 error. Verify the network configurations to ensure that the appropriate ports and protocols are allowed.
- Check to see if Static website hosting is enabled on your S3 bucket (it should be enabled I believe in this use case)
- Can you put a basic index.html document in your bucket and see that?
- Under your Cloudfront distribution do you have anything in the root object to point it to the right document?
Hopefully that guides you in the right direction!
Got it. My bad, I misread that. You are not tracking user link clicks in email, but the fact that a user opened the email.
So is this the flow? user opens email -> email client does http GET to fetch the image -> Route53 DNS -> CloudFront -> Origin (fails with 400) If so, what is the origin set to in your CloudFront distribution?
Did you go through this already? https://docs.aws.amazon.com/ses/latest/dg/configure-custom-open-click-domains.html
Hi Mike,
Apologies for any confusion. I didn't specify my DNS provider clearly, and I'm using DigitalOcean's DNS, not AWS Route 53. I did go through the documentation you mentioned and followed it, but I'm still facing the same issue.
To clarify the flow in my setup: When a user opens an email, the email client does an HTTP GET to fetch the image, which is then directed to CloudFront through my DNS setup on DigitalOcean. The failure with a 400 status code happens at the origin stage.
I hope this clears up any misunderstandings. Could you perhaps provide some insight into what might be going wrong given this setup, especially considering the origin set in my CloudFront distribution? Any guidance on troubleshooting the 400 error would be greatly appreciated.
To me the problem is between your CDN (CloudFront) and the origin. The DNS provider doesn't seem to be the issue since you are seeing this error in your CloudFront logs. I still don't understand your architecture here, but without sharing any details can you at least tell me what type of origin you are using in CloudFront? I feel like you are leaving out part of your architecture.
Maybe if we start with what you are trying to do and maybe we can work backwards from that and find an alternative?
I want to use a custom domain to track click and open events.
I've used this document to configure the environment for that purpose with an added certificate to use it with HTTPS: https://docs.aws.amazon.com/ses/latest/dg/configure-custom-open-click-domains.html
Here is my architecture flow: Email link click -> DigitalOcean DNS (CName) -> Amazon CloudFront -> Origin
It fails at http://[custom domain]/cl0/.... - returns 400.
Stuck with the same issue here, the issue seems to come from the URL generating feature.
my flow is: Email link click -> Cloudflare DNS (CName) -> Amazon CloudFront -> Origin.
What I found interesting while troubleshooting was before enabling the custom domain redirect feature, if I replace the aws domain with my custom domain it works just fine. The redirect behavior is exactly as expected and click metrics gets updated as well. After I enable the custom domain redirect feature, the generated URL with my custom domain gets long (despite custom domain shorter than aws one) and fails with 400.
I was facing error 400 after enabling custom redirect domain (using CloudFront as CDN for https support).
I've followed the instructions described in the doc: https://docs.aws.amazon.com/ses/latest/dg/configure-custom-open-click-domains.html (Option 2: Configuring an HTTPS domain)
The problem was related to a missing CloudFront configuration. The issue was solved after defining an "Origin request policy" - set to "AllViewer" (Origin behavior section).
After this, all started to work as expected (for http and https).
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace un año
- OFICIAL DE AWSActualizada hace 2 años
Hi Mike,
Thank you for your insights. However, I believe there might be a misunderstanding. In this case, I am not using S3 as the origin for CloudFront. I merely used S3 for logging purposes to gain more insight into the CloudFront-SES issue. Consequently, static website hosting and the presence of an index.html document in the S3 bucket are not relevant in this case.
The core issue I'm experiencing seems to be related to Amazon SES and its click-tracking functionality, specifically resulting in 400 Bad Request errors. My initial assumption is that the redirection system or the URL rewriting done by SES might not interact well with CloudFront, leading to these errors.
Thanks again for your help. It's much appreciated.