Containers on AWS (1/10)

This article consists of the initial notes on deploying, managing and scaling containarized applications into AWS container infrastructure using Docker on Amazon EC2, Amazon Elastic Container Service (ECS), and AWS Elastic Kubernetes Service (EKS) taken while reading the book Deploy Containers on AWS: With EC2, ECS, and EKS from Shimon Ifrah. I do want to do nine more articles any time in the future covering the notes in following sections of the book:
2. Storing, Managing, and Deploying Docker Container Images with Amazon ECR
3. Deploying Containerized Applications with Amazon ECS
4. Deploy a Containerized Application with Amazon EKS
5. Installing a Docker Host on an Amazon EC2 Instance
6. Securing Your Containerized Environment
7. Scaling the AWS EKS, ECS, and ECR Containerized Environments
8. Monitoring Your Containerized Environment
9. Backing Up and Restoring Your Containers and Hosts on Amazon AWS
10. Troubleshooting Amazon AWS Containerized Solutions

. Local environment requires an IDE (like Visual Studio Code (VSC or VS Code)), Docker, an AWS account, and AWS CLI installed and configured.

. Installing Docker Desktop on Windows 10 (I’ve used the “Edge” version).

. For simple commands use PowerShell Core. I downloaded Windows (x64) LTS .msi and just followed the wizzard using the default options.

. If you get “WSL 2 installation is incomplete” when starting Docker, read here how to solve it.

. If you’re starting in AWS you can sign up for a Free Tier account to enjoy some benefits. If you’re a startup, you can take advantage of Amazon’s support through the AWS Activate program.

. To download AWS CLI I used the Windows installer and just followed the wizzard using the default options.

.Before you can connect to AWS services using the CLI, AWS CLI must be configured using the command aws configure in PowerShell (you need to close and open PowerShell in case you get an error saying that aws command isn’t recognized). During the configuration, the information you need is the AWS Console under “My Security Credentials” > “Access keys” and create a new one. You’ll be asked in the configuration for AWS access key ID, AWS secret access key, Default region and Default output format. The last two can be left blank.

. AWS CLI offers access to all the Amazon AWS container services, and the following are the CLI commands to access them:
Amazon Elastic Container Registry (ECR): aws ecr
Amazon Elastic Container Service (Amazon ECS): aws ecs
Amazon Elastic Container Service for Kubernetes (Amazon EKS): aws eks
These services are the core container services on Amazon AWS.

. Install the Docker Extension for VS Code. It has the name “Docker” it was authored by Microsoft.

. With VS Code, you can delete an image, stop it, and connect to a container from the command prompt using a single click without typing Docker commands. VS Code is also useful for the following:
– Creating and deploying new containers
– Debugging deployed containers
– Running a DockerFile
– Building custom images

. What’s the difference between Amazon ECR and Docker Hub?

. To run containers in the cloud, you need a service that extracts all of the complexity of managing servers, storage, networking, and security and allows you to deploy containers. This can be done with Amazon ECS.

. If you have a large containerized environment with 200+ containers in a complicated configuration where you need a high level of control over the entire lifecycle process of containers and the performance of the applications you can use Amazon AKS to run a Kubernetes cluster with great control and at the same time extract many of the underlying management and configuration. The primary use cases of EKS are as follows:
– Microservices applications
– Batch processing
– Front-end applications
– Hybrid deployments between on-premises infrastructure and the cloud

Related Stories