Amazon Web Services (AWS) is currently one of the most widely used cloud computing platforms in the world. Companies of all sizes use AWS to host applications, databases, APIs, files, microservices, and critical systems.
Amazon Web Services (AWS) is currently one of the most widely used cloud computing platforms in the world.
Companies of all sizes use AWS to host applications, databases, APIs, files, microservices, and critical systems.
Its popularity is due to a few factors:
One of AWS's biggest advantages is flexibility.
The same application can be built in many different ways depending on the desired cost, performance, availability, and complexity.
Imagine a modern web application:
Usuário
|
v
Route53
|
v
Load Balancer
|
v
ECS Service
|
v
Containers Docker
|
v
RDS
In addition:
Arquivos -> S3
Processamentos -> Lambda
This architecture is extremely common in companies that use microservices.
S3 is AWS's file storage service. It works as a huge object repository.
You can store:
Imagine an e-commerce system. When the user uploads a product photo:
produto.jpg
The application saves the file to S3. The database only stores:
https://bucket.s3.amazonaws.com/produto.jpg
Route 53 is AWS's DNS service. It translates friendly names into infrastructure addresses.
Example:
api.minhaempresa.com
to
load-balancer.amazonaws.com
The user accesses:
https://api.minhaempresa.com
Route 53 responds:
Esse domínio aponta para o Load Balancer X
From there the request continues to the application.
ECS is AWS's container orchestration service. It allows you to run Docker applications without having to manage servers manually.
A .NET API:
FROM mcr.microsoft.com/dotnet/aspnet:9.0
Generates a Docker image. That image is uploaded to AWS.
ECS runs the containers automatically.
Before ECS can run an application, it needs to be packaged.
That's where Docker images come in.
An image contains:
Código
↓
Docker Build
↓
Imagem
↓
Registry (ECR)
↓
ECS
A .NET API:
docker build -t payment-api .
Generates an image. That image is published to ECR.
Then ECS uses that image to create containers.
The Service is responsible for keeping the desired number of containers running.
Configuration:
Desired Count = 3
ECS guarantees that there are always:
API 1
API 2
API 3
If a container goes down:
API 2 morreu
ECS creates another one automatically.
ECS can increase or decrease the number of containers automatically.
Configuration:
Mínimo: 2
Máximo: 10
When CPU reaches:
80%
ECS creates new containers.
2 -> 4 -> 6 -> 8
When traffic decreases:
8 -> 6 -> 4 -> 2
This reduces costs.
A very common question:
How does HTTPS reach my container?
The answer usually involves a Load Balancer.
Usuário
↓
Route53
↓
Application Load Balancer
↓
ECS Service
↓
Container
The user accesses:
https://api.minhaempresa.com/clientes
The flow happens like this:
Route 53 finds:
api.minhaempresa.com
Receives the HTTPS connection.
SSL certificate:
AWS Certificate Manager
Example:
/clientes
→ Customer API container
/pagamentos
→ Payments API container
The Load Balancer forwards the request to a healthy container.
payment-api-container-3
Lambda is AWS's serverless service.
You only submit a function.
AWS runs it when needed.
Whenever a file is uploaded to S3:
produto.jpg
A Lambda function is triggered.
It:
All without dedicated servers.
RDS is the managed relational database service.
It supports:
A payments application might store:
Clientes
Pagamentos
Pedidos
Reembolsos
in a PostgreSQL database hosted on RDS.
Imagine a business management SaaS.
Flow:
Usuário
↓
Route53
↓
Load Balancer
↓
ECS Service
↓
Container Docker
↓
RDS
Files:
Usuário envia PDF
↓
S3
Processing:
Upload
↓
Lambda
↓
Extrair informações
Scaling:
Mais acessos
↓
Mais containers ECS
All happening automatically.
| Service | Function |
|---|---|
| S3 | File storage |
| Route 53 | DNS |
| ECS | Container execution |
| ECS Service | Container management |
| ECS Auto Scaling | Automatic scaling |
| Load Balancer | Traffic distribution |
| Docker Image | Application package |
| Lambda | Serverless execution |
| RDS | Relational database |
Most modern AWS architectures are built by combining a handful of fundamental services.
A typical application uses:
Mastering these components already makes it possible to understand the architecture of most systems hosted on AWS, and it provides an excellent foundation for moving on to more advanced solutions involving microservices, messaging, observability, and distributed architectures.