Lightsail container as CloudFront Origin returns 404 No Such Service


I have created and deployed a Lightsail container and it is available publicly via HTTPS with a domain like

I have created a CloudFront Distribution and set this domain as the HTTPS origin. However, when I access the CloudFront distribution endpoint I get 404 No Such Service. Why?

I am using a normal CloudFront Distribution instead of a Lightsail Distribution as I need to add Lambda@Edge functions to it.

asked 2 years ago774 views
1 Answer
Accepted Answer

I have resolved it by adding the default domain name of the distribution to my container service by using the AWS CLI as per

This can only by done via the CLI.

aws lightsail update-container-service --service-name ContainerServiceName --public-domain-names '{"_": [""]}'
answered 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.

Guidelines for Answering Questions