π This is not properly displayed? Here is the online version! π‘
Hi Reader! π
As you probably already know, we're an enormous fan of AWS Lambda. In our opinion, it's the fastest way of getting started with a new project; in most cases, you don't even need to worry about costs. Especially in the beginning.
However, container runtimes such as Amazon ECS are and will continue to be significant in numerous organizations. This is due to valid reasons.
If you're new to cloud computing, familiarizing yourself with ECS and Fargate is highly beneficial.
In this newsletter, we'll explore why and what you need to know to get started with this awesome service. ποΈ
Let's go! π
β
If you can't wait to have all the important knowledge in a single place, have a look at our Amazon ECS infographic.
β
In the traditional approach, application development and hosting were separate.
With cloud-native, they are integrated, allowing developers to leverage platform technologies that directly benefit their applications.
Public clouds like AWS, Azure, and GCP introduced containerization, where companies handed over infrastructure responsibility to cloud providers. Now, with services like Lambda, which are even more abstracted, developers can focus on features and business processes instead of operations.
Infrastructure can be created and destroyed quickly using code, enabling developers to replicate entire application ecosystems effortlessly. This means they can develop locally or remotely with a fully functioning duplicate of a production system, without impacting customers.
Amazon Elastic Container Service (ECS) is a highly scalable and efficient container management service. It provides a management platform for orchestrating containers in your cluster. With ECS, you can easily run, stop, and manage containers.
It is a battle-tested service that is well-suited for critical infrastructure handling high-volume microservice API requests.
ECS offers several features that simplify the development process, reduce operational tasks, and minimize liabilities.
As we believe in the future of cloud-native applications, we will focus on the basics of the Fargate Launch Type and not delve into the details of the EC2 Taunch Type.
While exploring and learning about ECS, you'll come across many important terms that may not be immediately clear or easy to understand. This is completely normal, and we've felt this as well.
Being honest here: In the initial months of working with ECS, despite having apps in production, we encountered challenges in differentiating between the terms tasks, task definitions, clusters, and services.
However, they are essential for comprehending how all the different components of ECS interact. Let's delve into it!
Fargate is a serverless, pay-as-you-go option where you don't have to worry about maintaining any infrastructure. With Fargate, all you need to do is specify the task definition, cluster, and desired number of tasks, and ECS takes care of everything else.
Fargate automatically provisions the necessary compute resources, like Amazon EC2 instances (which are completely abstracted and therefore not your responsibility), and runs the tasks on those instances.
It's the recommended launch type for workloads of any size that may require low overhead and occasional bursts. If you're unsure about your requirements, always choose the Fargate launch type to minimize operations and responsibilities.
A task goes through various lifecycle stages, regardless of whether it was initiated manually or as part of a service.
The ECS container agent by Amazon monitors all state changes, keeps track of the last known state, and maintains the desired state.
ECS with Fargate relies exclusively on container images. You can store these images in the Amazon Elastic Container Registry (ECR), a fully managed container registry that allows you to host and share an unlimited number of images and artifacts.
ECR seamlessly integrates with ECS, as well as Amazon Elastic Kubernetes Service (EKS) and AWS Lambda.
There are no upfront costs associated with ECR. You only pay for the data storage and transfer costs to the internet. This means that when Fargate pulls images to run your containerized tasks, there are no additional charges incurred.
ECS provides a range of options for scaling the number of tasks in a cluster, allowing you to effectively manage workload and optimize resource utilization:
If you are interested in learning how to deploy your first application on ECS, we have a detailed step-by-step guide in our βπ AWS Fundamentals e-bookβ that provides instructions on how to deploy a Node.js app on ECS with Fargate!
β
That's it for today folks! π
We hope you have a great week & hear you soon! π
Sandro & Tobi
Still hungry for AWS content? Have a look at our blog! π β
Join our community of over 9,300 readers delving into AWS. We highlight real-world best practices through easy-to-understand visualizations and one-pagers. Expect a fresh newsletter edition every two weeks.
AWS FOR THE REAL WORLD β±οΈ Reading time: 6 minutes π― Main Learning: Understanding Amazon Aurora DSQL pricing structure including DPUs, storage costs, and free tier π Blog Post π₯ YouTube Video Hey Reader ππ½in December 2024 AWS announced the preview of the serverless database DSQL and just in May it was generally available. With the announcement of the general availability, the pricing was also announced. The pricing is not super straightforward, so let's dive into it. Click to watch this video...
AWS FOR THE REAL WORLD β±οΈ Reading time: 8 minutes π― Main Learning: Building & Testing Lambda@Edge Functions with LocalStack π Blog Post Hey Reader ππ½we hope you have a great week! End of last year the CDN Edgeio was deprecated. Tobi's client company used it and the only thing that saved his day was CloudFront and Lambda@Edge Functions. But we realized that testing them and executing them locally is a pain. When we started to look for a solution we found Localstack - let's see how we can use...
AWS FOR THE REAL WORLD β±οΈ Reading time: 8 minutes π― Main Learning: Migrating from Edgio to CloudFront π Blog Post π» GitHub Repository Hey Reader ππ½After a busy week in Prague, both Tobi and I (Sandro) delivered our talks and we got quite some good feedback! We will share them in a separate newsletter soon.But this newsletter is all about accessing S3 within a VPC via Gateway endpoints vs. Internet routing. We know these networking issues are not the fanciest onces (looking at you AI) but...