You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
An anti-pattern is a common response to a recurring problem that is usually ineffective and risks being highly counterproductive. In cloud architecture, anti-patterns lead to workloads that are fragile, expensive, insecure, or difficult to operate. Understanding these anti-patterns — and knowing how to avoid them — is a critical skill for any cloud architect.
Deploying all resources in a single Availability Zone (AZ). If that AZ experiences an outage, the entire workload goes down.
Deploy across at least two Availability Zones. Use Elastic Load Balancing to distribute traffic and Auto Scaling to maintain capacity in each AZ. For databases, use Multi-AZ deployments in RDS or Aurora.
| Component | Single-AZ (Anti-Pattern) | Multi-AZ (Best Practice) |
|---|---|---|
| Web servers | 2 instances in one AZ | 2+ instances across 2+ AZs |
| Database | Single RDS instance | RDS Multi-AZ or Aurora |
| Load balancer | No load balancer | ALB spanning multiple AZs |
Embedding access keys, database passwords, or API tokens directly in application code or configuration files that are committed to version control.
Use AWS Secrets Manager or AWS Systems Manager Parameter Store to manage secrets. Grant your application access through IAM roles, which provide temporary credentials automatically.
# Anti-pattern: hardcoded credentials
db_password = "SuperSecret123!"
# Best practice: retrieve from Secrets Manager
import boto3
import json
client = boto3.client('secretsmanager')
response = client.get_secret_value(SecretId='prod/database/password')
db_password = json.loads(response['SecretString'])['password']
Deploying a workload without setting up metrics, logs, alarms, or dashboards. The team only discovers problems when users report them.
Define monitoring as part of your operational readiness criteria. At a minimum:
Running large instance types "just in case" — paying for capacity that is never used. A common example is running an r5.4xlarge instance when an r5.large would suffice.
Start small and scale up based on data. Use AWS Compute Optimiser to get right-sizing recommendations. Monitor CPU, memory, and network utilisation with CloudWatch. Implement Auto Scaling to match capacity to demand dynamically.
Deploying the entire application as a single, tightly coupled unit. A change to any component requires redeploying the whole system, increasing risk and slowing down release cycles.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.