An EC2 instance comprises many components: the most prominent ones are the Amazon Machine Image (AMI), the preconfigured software template for your server containing the operating system and software; the hardware including the processor, memory, storage, and networking components based on your requirements; persistent or ephemeral storage volumes for storing your data; the IP addresses, VPCs and virtual and physical location for your instance, such as its subnet, availability zone, and regions, respectively.
When an instance is launched, it is secured by creating a key pair and configuring the security group, a virtual firewall for your instance. In order to access your instance, you will be required to authenticate using this key pair, as depicted in the following figure:
EC2 instances interact with various AWS services and cater to...