Bobcares

CloudFront missing authentication token

by | Dec 15, 2021

Wondering how to resolve CloudFront missing authentication token error? We can help you.

Here, at Bobcares, we assist our customers with several AWS queries as part of our AWS Support Services.

Today, let us see steps followed by our Support Techs to resolve this error.

How to resolve CloudFront missing authentication token error?

Usually, when CloudFront url is invoke with Authorization headers, it returns a 403 error.

{
"message": "Missing Authentication Token"
}

However, when the API Gateway url is invoked instead of CloudFront url with the same Authorization headers, it works.

We have also try invoking the endpoint without any authorizer via CloudFront url and it works.

Today, let us see how our Support Techs resolve this specific issue.

Firstly, when provisioning a CloudFront distribution, remember that CloudFront removes most headers from the request by default.

Usually, this is done to optimize the cache hit ratio while preventing your origin server from making decisions based on those headers.

That would not appropriate for different requests base on other variations (or absence) of those headers, which CloudFront would then serve from cache, inappropriately.

You will need to whitelist the Authorization header for forwarding to the origin.

Note also that when provisioning API Gateway behind a CloudFront distribution that you control.

You will probably want to deploy your API endpoint as regional and not edge-optimize.

[Need help with the procedure? We’d be glad to assist you]

Conclusion

In short, we saw how our Support Techs to resolve CloudFront missing authentication token error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.