2 Answers
- Newest
- Most votes
- Most comments
1
Hello.
As you know, CloudFront listens on ports 80 and 443, so accessing it on port 5000 will result in an error.
https://repost.aws/knowledge-center/cloudfront-supported-protocols
I think it is possible to route using ALB.
Have you configured the ALB redirect action?
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#redirect-actions
For example, if you configure the following settings, when an access occurs at "http://ALBDNS:5000", a redirect will occur to "google.com".
0
Thanks, it worked. I forgot to create a custom VPC with public subnets (I was using a default one before).
answered 3 months ago
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 2 months ago
Thanks, I did almost the same. I used ALB (internet-facing); created target groups, listener on port 5000 and rule to redirect to URL. But I do not see that this is working
The reason why I want to use port 5000 is to set up CNAME on this CloudFront and redirect Docker incoming requests (docker pull mostly). And at the same time just CloudFront distribution URL should redirect to S3 bucket objects (this part was done and tested)