Lightsail container as CloudFront Origin returns 404 No Such Service

0

I have created and deployed a Lightsail container and it is available publicly via HTTPS with a domain like containerservicename.123456abcdef.us-west-2.cs.amazonlightsail.com.

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.

질문됨 2년 전787회 조회
1개 답변
1
수락된 답변

I have resolved it by adding the default domain name of the distribution to my container service by using the AWS CLI as per https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-adding-distribution-default-domain-to-container-service.

This can only by done via the CLI.

aws lightsail update-container-service --service-name ContainerServiceName --public-domain-names '{"_": ["example123.cloudfront.net"]}'
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠