Containers versus VMs
There is a definite line of distinction between VMs and containers. Containers allow you to isolate applications within an operating system environment. VMs allow you to isolate what appears to the users and represent it as a completely different machine to the user, even with its own operating system.
The following diagram illustrates the difference:
As we can see in Figure 9.1, in the case of a VM architecture, each virtual slice has its own operating system and all the slices sit on top of the hypervisor. In the case of a container architecture, there is only one operating system installed for each instance. There is only one container engine, but multiple binaries and multiple applications can be installed for each slice.
It's also useful to highlight that in the majority of cases, when you run containers in AWS (and in most cloud environments, for that matter), you will be running...