Cloudfront direct links to edge server

0

I use a third-party service to send emails to subscribers. During the email send process, they shorten links for tracking purposes. The issue is that these shortened redirect links point to the "edge server" URL instead of the original Cloudfront URL.

This is causing issues for us since it appears that these direct links cannot be invalidated. In other words, if I change the file on S3 (I also have Cloudfront caching disabled), the Cloudfront URL will show the new file immediately. However, these direct links to the "edge server" do not, they continue to show the old version.

I'm guessing the the email service runs a process to understand the URL that is being served before being shortened, and instead of using the original, it grabs the "edge server" link instead.

Any advice or thoughts? I need to be able to change these files (at times) after the email has been sent and am not able to.

DavidR
asked a year ago179 views
1 Answer
1

It sounds like the issue may be related to the caching behavior of the edge server. When a user clicks on the shortened link in the email, the request is routed through the edge server, which may cache the content for a certain amount of time before checking for updates on the origin server.

One potential solution is to configure the caching behavior of the edge server to reduce the cache time, or to disable caching altogether. This may cause a higher load on the origin server, but would ensure that updates are reflected in the content served by the edge server.

Another solution may be to use a different service for link tracking that does not rely on the edge server URL. For example, some URL shortening services provide the option to use a custom domain for the shortened links, which would allow you to use your Cloudfront URL instead of the edge server URL. Alternatively, you could set up your own URL shortening service using a tool like YOURLS or Bitly, which would give you full control over the URL generation process.

Finally, you may want to consider using a different email service provider that does not modify the URLs in your emails. While this may not be feasible depending on your specific requirements and workflows, it may be worth exploring as a potential solution.

AWS_Guy
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions