What is the best way to deploy a Docker container to AWS?

Your thoughts?


If you are familiar with k8 then EKS will be very easy to integrate with.

If you are just experiencing containerization and Docker for your first time then ECS may be a better option. It's a fully managed service and allows you to deploy containers without knowing k8.

While ECS offers similar functionality to EKS it doesn't require an expertise in how Kubernetes orchestrates docker containers.

If you really want to get something hosted quickly without worrying about container configuration AT ALL, then Fargate will help you quickly deploy a solution.


AWS Fargate is easy and we have had lots of success with that. You can also do K8 route and host your kubernetes cluster via AWS EKS.

Its also possible to manage the EC2 instances directly as part of a cluster. This is a lot of configuration for someone without much of a devops background but it can be a good way to learn!


This all depends on how much you want to leverage AWS (or any cloud provider) versus understanding underlying resources and deployment details.

While you can let something like Elastic Bean Stalk or Fargate completely manage the provisioning of things like ec2 instances, load balancers, etc, you won't really understand the magic that is keeping your application breathing. The main downside to this is vendor lock in and price gauging. If you don't understand how much it takes to run your system and rely on AWS magic then you may be stuck with AWS forever.

This is where Kubernetes comes in. K8s is an open source solution that you can learn and apply to ANY major cloud provider. Think of it like learning Kafka or some other open source technology that is independent of a specific cloud vendor.


First master container orchestration. Then decide how you host it.


I've heard Fargate is good if you want an Elastic Beanstalk type experience where the underlying EC2 instances are managed for you...