I have a node.js app running on AWS Elastic Beanstalk. I have setup a domain pointing to a CDN distribution which is pointing to the EBS. But the web app is also accessible via the EBS URL directly. I want to block public access to the EBS URL. how can I achieve that?
Asked
Active
Viewed 437 times
1 Answers
1
Since Feb 2022, this is possible to be done thanks to AWS managed prefix lists
- Announcement here: https://aws.amazon.com/about-aws/whats-new/2022/02/amazon-cloudfront-managed-prefix-list/
- User guide doc here: https://docs.aws.amazon.com/vpc/latest/userguide/working-with-aws-managed-prefix-lists.html
You basically just need to:
- Get the prefix list ID from your VPC page
- Modify the SG to only accept HTTP from the PrefixId in the above step

Ermir Beqiraj
- 111
- 3