It mainly comes down to the trade-offs between the level of control and ease of operations. Depending on the needs of your workloads and your teams’ comfort with containerization, you might decide to choose one of the three AWS offerings discussed in this section.
AWS Elastic Compute Cloud (EC2)
Organizations that prefer to have maximum control and visibility of the container workloads may decide to run the entire stack on their own, in the compute instances provided by AWS. Technically speaking, nothing stops them from using tools such as Docker Compose, Docker Swarm, or even standard Docker clients to manage multiple containers within an EC2 instance. However, the broader question they should answer is whether they want to invest in developing orchestration at this level for productive use cases that quickly expand beyond the scope of what a single EC2 instance can manage. More often than not, the answer is no.
Secondly, when it comes to integrations with other AWS services for logging, monitoring, and operational needs, it can become quite a challenge to scale and operate the overall tooling that glues the application with the AWS platform. AWS-managed services do a lot of heavy lifting in this area, requiring your efforts for application-specific implementation only. Integrating with such services is just a matter of defining relevant properties in the respective manifest files.
AWS Elastic Kubernetes Service (EKS)
EKS is a managed Kubernetes service that can be used to run Kubernetes not just in the cloud but also on- premises. With the recent announcements in the hybrid environment space, AWS has extended the EKS experience to run clusters on-premises (EKS Anywhere), with the same tooling interface that users are used to. Users can still use the cloud- based EKS dashboard to manage containerized apps on-premises. These offerings are relevant for customers that have regulatory or compliance needs to fulfill.
Furthermore, EKS is also interesting for organizations that want to avoid vendor lock-in. Using AWS services that are built on top of open source frameworks allows them to easily port their applications to a different provider anytime in the future, if required.
If you are interested in learning more about EKS offerings in the hybrid space, I recommend looking into Amazon EKS on AWS Outposts or Amazon EKS Anywhere.
AWS Elastic Container Service (ECS)
The highest form of abstraction and opinionated tooling usually comes with a lot of best practices baked in that you can trust and adopt from the very beginning. Amazon ECS is one such service that is very easy to start with and offers deep integrations with not only other AWS services but also third -party partner ecosystems. Users don’t need to manage any control plane nodes, and just like EKS, you can also expand your application footprint to on-premises servers if needed.
The service allows you to declaratively define your application manifests, which contain the resource requirements along with other dependencies. Furthermore, you can offload the underlying infrastructure provisioning (EC2 nodes) tasks to AWS and benefit from high-security standards of isolation and access management. ECS leverages the Docker runtime under the hood to manage your applications. We will see the service in action in the hands-on exercise.
For the remainder of this chapter, we will dive deeper into ECS and the related features the service comes with.