How the internet work:
everything connect with IP address ( like u mail u need the address of u and the reciever)
Then question time:
So what is the diferent btw ec2 and elastic beanstalk:
Amazon EC2 provides raw computing resources, and you handle setup, configuration, and management. AWS Elastic Beanstalk is a higher-level service that handles infrastructure setup, configuration, and management for you, letting you focus on just the application.