INT364Semester 5 • 3 CreditsElective Subjects

Cloud Architecture And Implementation-Ii

This course introduces AWS cloud architecture and implementation, including disaster recovery, secure networking, storage and compute, databases, monitoring, automation, serverless applications, and container-based microservices. Students develop practical skills in designing, deploying, securing, and optimizing resilient AWS solutions.

6 Units • Notes • Model Answers • MCQs
Select Course Unit (6 Units)
Active: Unit 1
Unit 1:Unit 1: Cloud Fundamentals and Security
7 min read•High-Yield Unit Guide

Unit 1: Cloud Fundamentals and Security

Unit 1 Exam Focus & Core Takeaways

Review the core definitions, standard architectures, and syntax patterns below. Pay special attention to sections highlighted with bullet points for your mid-term and end-term subjective questions.

Unit 1: Cloud Fundamentals and Security

1. Architectural Foundations of Cloud Resilience & Disaster Recovery

1.1 Fundamental Resilience Metrics & Concepts

Designing high-availability and disaster-resilient systems in Amazon Web Services (AWS) requires strict alignment between business impact tolerances and cloud architectural decisions. System resilience is quantified through distinct recovery metrics:

  • Recovery Point Objective (RPO): The maximum tolerable volume of data loss measured back in time from the moment of an outage. For example, if a database failure occurs at 14:00 and the recovery image reflects the system state at 13:55, the actual data loss is 5 minutes. If business governance dictates an RPO <= 15 minutes, automated backup snapshots or streaming replication must operate at intervals strictly tighter than 15 minutes.
  • Recovery Time Objective (RTO): The maximum allowable elapsed time between service disruption declaration and full service restoration to an operational baseline. If an enterprise website becomes unavailable at 09:00 and operational traffic is rerouted and accepted at 09:30, the achieved RTO is 30 minutes. RTO drives compute provisioning speed, DNS TTL propagation constraints, and automation complexity.
  • Durability vs. Availability:
    • Durability measures the probability that stored bits and objects remain uncorrupted and permanently intact over time (e.g., Amazon S3 Standard provides 99.999999999% [11 9's] durability across multiple Availability Zones).
    • Availability measures the percentage of operational uptime during which an endpoint responds successfully to valid client transactions (e.g., 99.99% availability equates to no more than 52.6 minutes of downtime per calendar year). A storage system can possess near-infinite durability while experiencing temporary network partition unreachability (low availability).
  • Mean Time Between Failures (MTBF) and Mean Time to Repair (MTTR): Cloud architectures minimize MTTR through automated self-healing compute topologies while maximizing MTBF through decoupled microservice design and managed regional services.
CODE
       Timeline of an Unplanned Cloud Outage
<-------------------- RPO ------------------->|<-------------------- RTO ------------------->
+--------------------------------------------+-----------------------------+---------------->
Last Successful Persistent               Disaster Strikes            Full Workload
Replication / Snapshot Point              (Service Fails)           Service Restored

1.2 Blast Radius Mitigation & Fault Isolation

Resilience engineering requires limiting the scope of collateral damage when an individual component, network interface, or logical dependency fails:

  1. Availability Zone (AZ) Independence: An AWS Region comprises multiple physically separated, isolated data centers connected via low-latency, private optical fiber. AZs feature independent utility power substations, cooling chillers, backup diesel generators, and flood plain zoning. Workloads deploy across at least two or three AZs to protect against hypervisor crashes, rack power loss, or physical facility emergencies.
  2. Regional Independence: AWS Regions are entirely autonomous geographic clusters. Control planes and data planes between Regions (e.g., us-east-1 and us-west-2) do not share physical dependencies. Architecting for regional disaster recovery protects systems against widespread telecommunications cuts, severe weather catastrophes, or regional control-plane disruptions.
  3. Multi-Account Segregation: Using AWS Organizations to partition environments (Development, Staging, Production, Security Audit, and Disaster Recovery Target) establishes rigid IAM and security boundary firewalls. A compromised credential or misconfigured deployment script in Production cannot modify or wipe backup vaults located in an isolated Disaster Recovery account.

1.3 The AWS Shared Responsibility Model for Business Continuity

The boundary of responsibility shifts depending on the managed service tier:

  • AWS Responsibility (Resilience OF the Cloud): AWS owns the physical infrastructure, virtualization hypervisor layer, data center physical security, environmental power/cooling redundancies, hardware replacement, and foundational network backbones. For managed services like Amazon S3, Amazon DynamoDB, and AWS Lambda, AWS guarantees underlying multi-AZ replication, patch orchestration, and hardware fault tolerance.
  • Customer Responsibility (Resilience IN the Cloud): Customers are responsible for configuring guest operating system patches, network security groups, network access control lists (NACLs), IAM credentials, database cross-region replication rules, backup execution schedules, automated failover DNS health checks, and data encryption key rotation policies.
LayerCustomer ResponsibilityAWS Responsibility
Physical FacilitiesNoneData center physical security, generators, cooling, fiber
Network InfrastructureSubnet allocation, Route Tables, VPN/Direct Connect configsGlobal backbone, physical switches, border routers
Compute HypervisorsEC2 AMI patching, OS kernel updates, host firewallsNitro system integrity, physical server maintenance
Managed DatabasesSchema indexes, read replica setup, retention periodsMulti-AZ disk sync, automated snapshot storage, host failover
Identity & DataLeast privilege IAM, KMS key permissions, S3 Object LockKey management infrastructure, cryptographic hardware modules

2. AWS-Native Disaster Recovery Mechanisms & Service Orchestration

2.1 Durable Storage Services & Cross-Region Safeguards

Object and block storage mechanisms provide the foundational recovery layer for application state:

  • Amazon S3 Multi-AZ Durability & S3 Versioning: S3 automatically stores objects redundantly across a minimum of three physical AZs. Enabling S3 Versioning ensures that every mutating PUT, POST, or DELETE generates a historical version ID. A malicious or accidental DELETE action merely places a Delete Marker on the object, permitting instant retrieval of prior revisions without data loss.
  • S3 Object Lock (WORM Storage): Implements Write Once, Read Many compliance. Object Lock prevents objects from being overwritten or deleted for a fixed retention period or indefinite legal hold:
    • Governance Mode: Authorized IAM users with specific permissions (s3:BypassGovernanceRetention) can override or delete object versions.
    • Compliance Mode: Absolute protection. No IAM principal—including the AWS Account Root user—can delete the object version or shorten the retention duration until the timer elapses.
  • S3 Cross-Region Replication (CRR): Automatically and asynchronously copies new objects, tags, and ACLs across distinct AWS Regions. CRR supports changing object storage classes (e.g., replicating from S3 Standard in us-east-1 to S3 Glacier Flexible Retrieval in eu-west-1) and cross-account ownership overrides to defend against source account compromise.
  • Amazon EBS Snapshots & AWS Backup Integration: EBS volume snapshots capture point-in-time incremental block changes directly to Amazon S3. AWS Backup provides unified, policy-driven automation across EBS, RDS, DynamoDB, EFS, and Storage Gateway. It features AWS Backup Vault Lock, which enforces immutable WORM policies on backup storage vaults to neutralize enterprise ransomware threats.

2.2 Relational & NoSQL Database Resilience Architectures

Database recovery models balance write latency against cross-regional replication overhead:

CODE
               Relational Database Replication Topology
               
   [ AWS Primary Region ]                         [ Secondary DR Region ]
+---------------------------+                 +-------------------------------+
| +-----------------------+ |                 | +---------------------------+ |
| |   RDS Primary Writer  | |                 | | RDS Cross-Region Replica  | |
| |      (Active AZ-a)    | |                 | |     (Asynchronous Lag)    | |
| +-----------+-----------+ |                 | +---------------------------+ |
|             |             |                 |               ^               |
|    Synchronous Mirror     |                 |               |               |
|             v             |                 |       Asynchronous Binlog     |
| +-----------------------+ |                 |         Replication Stream    |
| |   RDS Multi-AZ Standby| |                 |               |               |
| |     (Passive AZ-b)    | |                 +---------------+---------------+
| +-----------------------+ |                                 |
+---------------------------+---------------------------------+
  1. Amazon RDS Multi-AZ vs. Cross-Region Read Replicas:
    • Multi-AZ Synchronous Mirroring: High-availability mechanism. Every write committed to the primary DB instance is synchronously acknowledged to a warm standby in a second AZ before acknowledging the client. Failover is automated (typically 60–120 seconds) via dynamic DNS record update. It does NOT protect against regional outages or accidental logical table drops (since the drop executes synchronously on both copies).
    • Cross-Region Read Replicas: Disaster recovery mechanism. Data changes stream asynchronously over AWS private regional interconnects. In the event of primary regional catastrophe, the replica is manually or programmatically promoted to a standalone read-write database.
  2. Amazon Aurora Global Database: Employs dedicated storage-level physical replication engines. Storage nodes in the primary Region replicate raw block increments directly to secondary regional clusters with typical replication latency under 1 second. Aurora Global Database supports programmatic cross-region failover in under 1 minute with zero data loss (RPO = 0) under managed conditions, bypassing MySQL/PostgreSQL logical binlog replay bottlenecks.
  3. Amazon DynamoDB Global Tables: Fully managed multi-region, active-active NoSQL database. Tables replicate bidirectionally across designated AWS Regions. Conflicts are arbitrated using a "last-writer-wins" timestamp strategy. Provides sub-second write replication worldwide for decentralized applications.

2.3 Compute Reconstruction & Infrastructure as Code (IaC)

Dormant or destroyed compute capacity must be reconstructed reliably without manual configuration errors:

  • Golden AMIs vs. Bootstrap Launch Templates:
    • Golden AMI: Fully baked machine image containing OS, runtime environments, security agents, and static dependencies. Boots rapidly (low RTO) but requires frequent maintenance pipelines (EC2 Image Builder).
    • Just-in-Time Bootstrap: Minimal base OS AMI combined with EC2 User Data shell scripts or cloud-init directives that pull code artifacts from S3 at initialization. Highly flexible, but increases instance spin-up time and introduces internet/repository dependencies during disaster failover.
  • AWS CloudFormation & AWS CDK: Declarative templates codify complete Virtual Private Cloud (VPC) network fabrics, security groups, subnets, target groups, and serverless compute definitions. CloudFormation StackSets allow administrators to deploy, update, or audit stacks across multiple AWS accounts and Regions with a single API invocation.

2.4 Traffic Routing, DNS Failover & Global Ingress

Redirecting user traffic during regional failover requires resilient edge networking:

  • Amazon Route 53 Health Checks & Failover Routing:
    • Route 53 probes application health via public endpoint pings, calculated health checks (aggregating multiple metric streams), or CloudWatch alarms.
    • Active-Passive Failover Routing: Route 53 associates a Primary record with a Secondary disaster recovery record. If primary health check probes fail, Route 53 DNS servers return the secondary endpoint IP or CNAME.
    • DNS TTL Implications: Resolving clients and intermediate recursive DNS resolvers cache DNS responses according to the Record Set Time-To-Live (TTL). Setting TTL to 60 seconds ensures rapid traffic cutover; high TTL values (e.g., 86400 seconds) cause clients to send traffic to dead primary infrastructure long after disaster declaration.
  • Route 53 Application Recovery Controller (ARC): Provides highly reliable recovery readiness checks and routing controls that operate independently of standard AWS control plane dependencies. ARC ensures that recovery capacity exists before triggering regional traffic shifts.
  • AWS Global Accelerator: Provisions static Anycast IP addresses routed across the AWS global edge network. Client traffic enters the nearest edge location and traverses the private AWS backbone to optimal regional endpoints. Global Accelerator performs continuous health checking; if an application endpoint in us-east-1 degrades, it automatically reroutes incoming client packets to us-west-2 within 30 seconds without relying on client-side DNS cache expiry.

2.5 Automated Runbook Orchestration & Validation

Manual recovery procedures during an outage are prone to human error and stress-induced oversights:

  • AWS Systems Manager (SSM) Automation: Executes parameterized Python or PowerShell runbooks across EC2 fleets and AWS APIs. SSM can sequence complex cross-service recovery workflows, such as stopping instances, attaching recovered EBS volumes, and starting application services.
  • AWS Step Functions: Serverless visual state machine that orchestrates distributed tasks, handles retries, branches conditionally based on API responses, and includes human-in-the-loop approval gates via Amazon SNS and email callbacks.
  • AWS Fault Injection Service (FIS): A fully managed chaos engineering service. FIS injects controlled synthetic faults (CPU spikes, network latency, terminated EC2 instances, killed RDS databases, throttled APIs) into production or staging environments to validate whether monitoring alarms trigger and automated recovery policies execute within expected RTO boundaries.

3. Deep-Dive Comparative Analysis of the Four DR Strategies

AWS categorizes disaster recovery strategies into four distinct architectural patterns along a spectrum of cost, operational complexity, RTO, and RPO:

CODE
+-----------------------------------------------------------------------------------+
|                  Disaster Recovery Spectrum (Cost vs. Recovery Speed)             |
|                                                                                   |
|  [Backup & Restore]  -->   [Pilot Light]   -->   [Warm Standby]  -->  [Active-Active]
|                                                                                   |
|  * Lowest Ongoing Cost     * Minimal Core       * Reduced Capacity    * Near-Zero RPO/RTO
|  * Highest RTO (Hours)     * Replicated Data    * Hot Serving Layer   * Highest Cost
|  * Highest RPO (Hours)     * Compute Dormant    * Rapid Scale-out     * Maximum Complexity
+-----------------------------------------------------------------------------------+

3.1 Pattern 1: Backup and Restore

In the Backup and Restore pattern, production data is regularly backed up to durable storage (such as Amazon S3 or AWS Backup vaults) and replicated to a secondary AWS Region. No application compute or database servers run in the recovery Region during normal operations.

  • Operational Sequence During Outage:
    1. Disaster declared in primary Region.
    2. CloudFormation StackSet provisions VPC networking, subnets, route tables, and security groups in the recovery Region.
    3. RDS or Aurora instances are created from the latest cross-region snapshot or point-in-time recovery log.
    4. Auto Scaling groups provision EC2 instances or ECS/EKS clusters using pre-synchronized AMIs and container images from Amazon ECR.
    5. Application smoke tests validate end-to-end database connectivity and service health.
    6. Route 53 DNS record is updated to point client traffic to the newly created Application Load Balancer.
  • RPO & RTO Profile:
    • Typical RPO: Hours to 24 hours (governed by snapshot backup frequency).
    • Typical RTO: Several hours to 24+ hours (governed by disk restoration speeds, database size, and compute provisioning queues).
  • Optimal Use Cases: Non-critical internal business applications, batch processing workloads, developer sandboxes, and regulatory compliance data retention where downtime is tolerable.

3.2 Pattern 2: Pilot Light

The Pilot Light pattern maintains the critical core data persistence layer continuously running and synchronizing in the recovery Region, while compute and application serving layers remain completely dormant or unprovisioned.

  • Architecture & Workflow:
    • An Amazon Aurora Global Database secondary cluster or an Amazon RDS Cross-Region Read Replica runs continuously in the secondary Region, receiving asynchronous writes.
    • VPC subnets, security groups, IAM roles, and KMS decryption keys are fully deployed and idle in the recovery Region.
    • Auto Scaling groups are pre-configured with a desired/minimum capacity of zero (DesiredCapacity = 0).
  • Operational Sequence During Outage:
    1. Primary regional failure identified.
    2. The secondary database read replica is promoted to primary standalone read-write status.
    3. Auto Scaling group desired capacity is scaled from 0 to operational targets (e.g., 20 EC2 instances).
    4. Instances launch, attach to target groups, pass load balancer health checks.
    5. Route 53 health check or manual DNS routing switchover directs public ingress to the standby load balancer.
  • RPO & RTO Profile:
    • Typical RPO: Seconds to minutes (replication lag between primary and secondary database).
    • Typical RTO: 10 minutes to tens of minutes (time required to promote database and launch/warm compute instances).
  • Optimal Use Cases: Core business systems requiring low data loss (low RPO) where the enterprise can accept a short, controlled window of downtime while compute infrastructure boots up.

3.3 Pattern 3: Warm Standby

The Warm Standby pattern maintains a scaled-down but fully functional copy of the entire production workload running continuously in the secondary Region. This secondary environment is capable of receiving background traffic, handling smoke tests, or serving internal health-check transactions.

  • Architecture & Workflow:
    • Primary Region runs production capacity (e.g., 100 EC2 instances behind an Application Load Balancer, Multi-AZ RDS cluster).
    • Secondary Region runs a mirror topology at fractional capacity (e.g., 10 to 20 smaller EC2 instances behind an ALB, active read replica).
    • Data is continuously replicated via Aurora Global Database or S3 CRR.
  • Operational Sequence During Outage:
    1. Primary Region fails.
    2. Route 53 or Global Accelerator immediately shifts user traffic to the secondary Region ALB (since healthy targets are already serving requests).
    3. Auto Scaling dynamic scaling policies immediately detect the surge in traffic and scale instance capacity from 20 up to 100 instances.
    4. Aurora database is promoted to primary writer.
    5. System absorbs full production load.
  • RPO & RTO Profile:
    • Typical RPO: Seconds (continuous database replication).
    • Typical RTO: Minutes (traffic shift is immediate; full capacity achieved as soon as Auto Scaling completes instance provisioning).
  • Optimal Use Cases: High-priority consumer-facing web services, e-commerce storefronts, and enterprise SaaS platforms where minutes of downtime represent substantial revenue loss.

3.4 Pattern 4: Multi-Site Active-Active

In a Multi-Site Active-Active configuration, two or more AWS Regions operate production workloads simultaneously. End-user traffic is dynamically distributed across all active Regions based on latency, geography, or weighted routing policies.

  • Architecture & Workflow:
    • Full production compute capacity runs concurrently in both Region-A and Region-B.
    • Data Layer: Utilizes globally distributed databases supporting multi-master active writes (e.g., Amazon DynamoDB Global Tables) or active-read/partitioned-write architectures.
    • Ingress Layer: AWS Global Accelerator or Amazon Route 53 Geolocation/Latency routing routes client requests to the nearest healthy regional stack.
  • Operational Sequence During Outage:
    1. Outage occurs in Region-A.
    2. Edge health checks instantly fail for Region-A.
    3. Route 53 or Global Accelerator immediately stops routing new traffic to Region-A; 100% of global traffic flows to Region-B.
    4. No database failover or promotion step is necessary, as Region-B is already actively processing transactions.
  • RPO & RTO Profile:
    • Typical RPO: Near-zero (limited only by asynchronous multi-region replication latency, typically tens of milliseconds).
    • Typical RTO: Near-zero to seconds (governed strictly by health check detection interval and edge routing update speed).
  • Challenges & Tradeoffs:
    • Data Consistency & Conflict Resolution: Concurrent writes to the same record in two different regions require robust idempotency, vector clocks, or deterministic conflict resolution (e.g., DynamoDB last-writer-wins).
    • Cost & Overhead: Requires paying for continuous full-scale redundant infrastructure in multiple regions.

3.5 Comparative Decision Matrix

DimensionBackup and RestorePilot LightWarm StandbyMulti-Site Active-Active
Typical RTOHours to DaysTens of Minutes to 1 HourMinutesSeconds to Near-Zero
Typical RPOHours to 24 HoursSeconds to MinutesSecondsSub-second to Seconds
Ongoing Infra CostLowest ($)Low ($$)Medium ($$$)Highest ($$$$)
Compute in DR SiteZero (Off)Zero / DormantScaled-down runningFull running capacity
Database in DR SiteBackups onlyReplicated Core runningReplicated Core runningFully Active Multi-Region
Operational EffortLow daily, high during DRModerateHigh (syncing configs)Highest (conflict resolution)
Traffic HandlingNone until rebuildNone until bootedCan serve low trafficServes live traffic continuously

4. Security, Identity, and Governance in Disaster Recovery

4.1 Cross-Account Security & Air-Gapped Backups

Disaster recovery architectures must account for security breaches, insider threats, and ransomware attacks that target recovery systems:

  1. Isolated Disaster Recovery AWS Account: Backups should be replicated into a separate AWS Account dedicated exclusively to recovery vaults. Access to this account is heavily restricted, isolating it from daily developer and production administrative credentials.
  2. Cross-Account IAM Roles & Trust Boundaries: Backup transfer operations assume tightly scoped IAM roles using external ID constraints and condition keys (aws:PrincipalOrgID) to ensure cross-account jobs only execute within corporate boundaries.
  3. KMS Encryption Key Management: Backups must be encrypted at rest using AWS Key Management Service (AWS KMS) Customer Managed Keys (CMKs). When copying backups across accounts or regions:
    • The target account must be granted kms:Decrypt, kms:DescribeKey, and kms:CreateGrant permissions on the source key.
    • The copied snapshot is re-encrypted using a KMS key native to the target region/account.
    • KMS Multi-Region Keys: AWS KMS supports multi-region primary and replica keys. A multi-region key shares the same key ID and key material across regions, simplifying client-side envelope decryption without needing to re-encrypt stored ciphertexts during regional failover.
CODE
       Air-Gapped Cross-Account Backup Architecture
+-------------------------------+             +---------------------------------+
|   Production AWS Account      |             |   Isolated DR AWS Account       |
|                               |             |                                 |
|  +-------------------------+  |             |  +---------------------------+  |
|  | EC2 / RDS / EBS Volumes |  |             |  | Dedicated AWS Backup Vault|  |
|  +------------+------------+  |             |  | +-----------------------+ |  |
|               |               |             |  | | AWS Backup Vault Lock | |  |
|               v               |             |  | | (WORM: Non-deletable) | |  |
|      [ AWS Backup Plan ]      |             |  | +-----------------------+ |  |
|               |               |             |  +-------------^-------------+  |
|               +---------------+-------------+----------------+                |
|               Encrypted Copy Stream via KMS CMK Cross-Account Trust           |
+-------------------------------------------------------------------------------+

4.2 Governance Guardrails & Immutability Enforcement

Enterprises enforce compliance rules through policy-as-code:

  • AWS Organizations Service Control Policies (SCPs): SCPs apply guardrails across all accounts in an Organizational Unit (OU). A critical SCP rule denies backup:DeleteBackupVault, backup:DeleteRecoveryPoint, and s3:DeleteBucketPolicy to all principals (including root), preventing ransomware actors from wiping recovery repositories:
    json
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Sid": "DenyBackupDeletion",
          "Effect": "Deny",
          "Action": [
            "backup:DeleteBackupVault",
            "backup:DeleteRecoveryPoint",
            "backup:UpdateRecoveryPointLifecycle"
          ],
          "Resource": "*"
        }
      ]
    }
    
  • AWS Config Compliance Rules: Evaluates configuration posture continuously. Rules like backup-recovery-point-minimum-retention-check and rds-snapshots-public-prohibited alert security teams whenever resources deviate from DR compliance standards.
  • AWS CloudTrail Audit Trails: Ingestion logs capture every API call across regions and accounts. Logs are delivered to an encrypted, write-locked S3 bucket with CloudTrail log file validation enabled to detect tampering.

4.3 Disaster Recovery Drills & Testing Methodologies

A disaster recovery plan remains unproven until validated through realistic recovery simulations:

  1. GameDays and Chaos Drills: Teams schedule planned operational exercises where specific production failures are simulated (e.g., isolating an AZ network path or revoking database access) to test team responsiveness, alert accuracy, and runbook fidelity.
  2. Non-Disruptive Failover Testing:
    • Isolated VPC Simulation: Restoring databases and compute into a sandbox VPC in the secondary Region allows comprehensive functional testing without altering production DNS or impacting live customers.
    • Aurora Cloning: Creates copy-on-write database clones in seconds without impacting storage capacity, enabling instant validation of point-in-time recovery data.
  3. Runbook Automation & Documentation: Recovery runbooks must reside in an accessible, out-of-band repository. Automation scripts (SSM Automation documents) must be version-controlled, continuously tested against staging environments, and audited for deprecated API calls.