Home > Software engineering >  Connect cloudfront with ElasticBeanStalk Application
Connect cloudfront with ElasticBeanStalk Application

Time:03-31

I am trying to connect cloudfront with EBS.

Whats the setup?

  • EBS is hosting a nodeJs application.

  • Cloudfront origin set to Elastic load balancer and accepts HTTPS only [Cloudfront config]

  • All Alternative domains are added correctly.

  • ACM certificate is added to Cloudfront [region US EAST - N.Virgina]

  • EC2 instance / EBS is in the region Asia Pacific. ACM certificates installed in load balancer are from Asia pacific too.

I am also redirecting http traffic with the help of load balancer listeners.

enter image description here

Security group allows traffic to port 443 . No AWS WAF set.

Origin settings:-

enter image description here

It's been a day now.

I am trying continuously.

I am able to set DNS A & AAA record to the cloudfront using route 53, getting the dropdown value as well.

I am able to park domains directly to EBS & they work over https properly.

Getting 502 ERROR : The request could not be satisfied.

Already tried enter image description here

  • then added a new listener to ELB which forwards to my instance if the header match, it would help EBS differentiate requests from Cloudfront and other origins.

enter image description here

Still i was getting same response, found out the response was from cache. Just had to invalidate cache of cloudfront. And its done!

  • Related