Amazon Elastic Compute Cloud (EC2) and Amazon Machine Images (AMI) are foundational services in Amazon Web Services (AWS). EC2 provides…