AWS beanstalk private load balancer access - amazon-web-services

I have a beanstalk app in private subnets and load balancer in private subnets. I assumed that performing curl to <beanstalk app load balancer> (the URL I see in the list of beanstalk apps under Environments section) will allow me to access it if I do it from inside of session started by session manager directly on that particular beanstalk app.
But connection can't be established. Not sure what should be configured additionally. Is this possible to achieve that and how?

Related

block public access to the AWS Elastick Beanstalk URL

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 ELB URL directly. I want to block public access to the EBS URL. how can I achieve that?
Create a custom security group that allows only the IP address of the CDN. Create an .ebextensions file that will configure the environment to use your custom security group.
See: https://aws.amazon.com/premiumsupport/knowledge-center/security-group-elastic-beanstalk/
Your CDN provider should publish their public IP address, for example here is Cloudflare: https://www.cloudflare.com/ips/

How to blockall requests to /actuator aws

We have a springboot application running as a single instance( there is no Loadbalancer) on aws elastic beanstalk.
The question is how to protect/block the /actuator path (only admins) could access it.
you can't without a load balancer.
With ALB you can configure some settings to restrict access, but not with custom authentication.

AWS Elastic Beanstalk URL points to incorrect IP

Recently somebody manually deleted all Elastic Load Balancers on a AWS account I am working with. All the Load balancers had been provisioned from Elastic Beanstalk configs.
I rebuilt all the Elastic Beanstalk instances from previous configs to restore the deleted load balancers. The various applications are now running correctly apart from 2 which are failing to send traffic to each other. I will call them App A and App B.
App A is sending traffic to App B using its elastic beanstalk URL, however the messages are failing to send. If I SSH into App A, I can manually send JSON messages to App B using CURL and the EC2 private IP. When I ping the EB URL from App B, it shows me a IP to do not recognise and which is not allocated to any EC2 instances running on the account.
App B is in a private subnet with a network load balancer.
How can I get the Elastic Beanstalk URL to point at the correct IP.
I have recently inherited this environment and did not configure the original setup. So perhaps I am missing a step or aspect of how AWS Elastic Bean stalk is intended to work in this regard.
Additionally I am certain this is not a programmatic error ( the code has not changed since the instances where rebuild ) or a firewall setting as I am manually able to send traffic and get a response with a curl script.
Its is the beanstalk URL which appears to be incorrect

How to restrict access to AWS Load Balancer so only another specific AWS Load Balancer can have Inbound access?

we currently have an API and website running on AWS Elastic Beanstalk, both with load balancers.
Right now we are trying to figure out how to restrict all incoming traffic to the API Load Balancer so the Website load balancer is the only point of access to the API.
We have tried to work with the security groups but we can never hit it right.
We have already removed all Inbound access to the API and that restricted all access but we just can't get the Website to access it.
Our finale goal is to have a system where the API can never be reached from the outside but the Website has fully access to it through HTTPS calls.
Hope you guys can help us, thank you in advance!
Your website is running on an EC2 instance, which is only accessible through the ELB. The API server runs in a private subnet and accessible through an internal ELB. You want your website to access the API server. The following steps should solve the issues you are facing:
Configure your API load balancer as internal, so it is not accessible out of your VPC.
Apply the following security group rules to let application instance access the API server.
WebApp (EC2) SG
80/443 sg-xxxelb (External ELB SG)
External ELB SG
80/443 0.0.0.0/0
Your API server should only be accessible by the WebApp Instance.
Internal (API Server) ELB SG
443 sg-xxxec2 (The SG of the WebApp EC2 instance).

Stitching together AWS API Gateway and Private EC2 Instances

I've spent the majority of today reading google results and documentation on how to connect AWS API Gateway to EC2 instances (created by Elastic Beanstalk) in a private subnet. I know that API Gateway requires targets to be publicly addressable, so...
I manually created an Application Elastic Load Balancer that listens for (and terminates) HTTPS at a public IP address;
I created a VPC with two subnets: one public (holds load balancer) and one private (holds EC2 instances); and,
I believe I have to create security groups that allow everyone/everywhere to connect to the load balancer, but only entities in my public subnet to connect to my EC2 instances.
Unfortunately I'm unable to view the sample Beanstalk application via the load balancer's DNS name. The connection just times-out.
Can someone please confirm I've identified all the steps? Is there any way I can trace my requests to see where they're failing? Or (even better) why they're failing? Thanks!
Check your security groups to make sure that HTTPS traffic is allowed
Make sure your Network ACLs are allowing traffic from your load balance to your EC2 instances
Check your VPC routes to ensure there is a route from your load balancer to your EC2 instance