A user has created a subnet with VPC and launched an EC2 instance in that subnet with only default settings.
Which of the below mentioned options is ready to use on the EC2 instance as soon as it is launched?
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - B.
When you create a subnet with the default settings, only the Private IP gets populated for EC2 instances.
For Public IP, this is not possible because the Auto-assign Public IP will be ‘no' by default.
Also the Elastic IP and Internet gateway have to manually configured.
For more information on VPC, please visit the link:
https://aws.amazon.com/vpc/When an EC2 instance is launched within a subnet in a VPC, there are certain resources that are automatically associated with it.
Out of the options given, the only resource that is ready to use on the EC2 instance as soon as it is launched with default settings is a Private IP address.
A Private IP address is assigned to the EC2 instance by the VPC when it is launched. This IP address is used for communication within the VPC, between instances within the same subnet, and with resources in other subnets that are connected via VPC peering or VPN connections.
An Elastic IP address is a static, public IP address that can be associated with an EC2 instance. It allows the EC2 instance to communicate with the Internet using a fixed IP address. However, it needs to be specifically allocated to an instance and associated with it. It is not automatically assigned when an EC2 instance is launched with default settings.
A Public IP address is a dynamic IP address that is assigned to an EC2 instance when it is launched in a public subnet. However, it is not automatically assigned to an EC2 instance launched in a private subnet, which is the default setting.
An Internet Gateway is a resource that is used to enable communication between instances in a VPC and the Internet. It needs to be specifically configured and associated with the VPC, and is not automatically assigned when an EC2 instance is launched with default settings.
Therefore, the correct answer is option B - Private IP.