Skip to content

Can we avoid Cloudfront addd ~500ms on top of function url

0

We are working serverless but needed to support SSE so we had to use a lambda function url.

For all function urls we see, be it a streaming or a buffered one, cloudfront add a significant time to first byte.

Instead of ~140ms from the function url directly we get ~600-~800 from cloudfront.

Our settings includes no caching, streaming, and full viewer request passing. We basically need it to behave as a minimalistic reverse proxy...

1 Answer
0

Hello, Team.

According to the post, you are experiencing latency issues with cloudfront, which adds ~600-~800ms to the first byte instead of ~140ms from the function URI directly. You would like to know how to mitigate this issue.

Please note that in order to advise accordingly on this issue, will require Cloudfront request ID's for requests where the latency was observed. Having Cloudfront request IDs will allow us to pull and analyse our internal logs to determine what is causing this latency. For additional details on how to retrieve CloudFront request ID's, see the article linked below[1]. Please also refer to this documentation, which explains how to reduce CloudFront latency[2].

Therefore, to further investigate this issue, I do recommend you to reach to AWS Support by creating a support case[3], and share the Cloudfront request ID's for requests where the latency was observed so that we can investigate further and help you overcome the issue.

References:

[1] What information do I give AWS Support to diagnose CloudFront web distribution latency issues: https://repost.aws/knowledge-center/cloudfront-latency-diagnosis-data

[2]How do I reduce the latency of slow responses from CloudFront: https://repost.aws/knowledge-center/cloudfront-latency-xcache

[3]Open a support case with AWS using the link: https://support.console.aws.amazon.com/support/home#/case/create

AWS
answered 2 years ago
EXPERT
reviewed 2 years 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.