AWS Organizations

AWS Organizations – Overview

Key Benefits

Limitation

Creating an AWS Organization
  1. Start from a standard AWS account
    • Standard account = not yet part of any AWS Organization
    • Log in, create an organization → this account becomes the management account
  2. Add member accounts
    • Invite existing accounts → standard account must accept invitation
    • Create new accounts directly inside the organization
Switching Roles in AWS Organizations

Best Practices for Identity Administration:

  1. Centralize logins:
    • Single account for IAM users, or
    • Identity Federation with external IDPs (e.g., Microsoft Active Directory)
  2. Access other accounts via roles using Switch Role
Hierarchical Structure of AWS Organizations
Cost Benefits of AWS Organizations
  1. Consolidated Billing
    • Member accounts’ bills are combined → one monthly invoice for the organization
    • Payer account = management account
  2. Volume Discounts
    • Aggregated usage can reduce costs
  3. Consolidated Reservations
    • Reserved instances can be shared across member accounts
DEMO: Creating an AWS Organization
  1. Log in to GENERAL account, create an organization → GENERAL becomes the management account
  2. Add existing PROD account
    • Invite PROD to join, PROD accepts → becomes member account
  3. Add new DEV account
    • Create inside GENERAL → DEV becomes member account
    • Note: Increase AWS Organization account quota if needed: Service Quotas
  4. OrganizationAccountAccessRole
    • Create in PROD to grant admin access to GENERAL
    • DEV role created automatically (since DEV was created inside the organization)
  5. Switch Roles Feature
    • From GENERAL account, main menu → Switch Roles → fill in account, role name, alias (e.g., PROD = red, DEV = yellow)

Service Control Policies (SCPs)

AWS Organizations – Service Control Policies (SCP)

SCP Scope and Attachment

An SCP can be applied to:

  1. Organization Root → impacts all member accounts in the organization (excluding the management account)
  2. Organizational Units (OUs) → affects the OU and all nested accounts and OUs
    • SCPs are inherited downward through the hierarchy
  3. Individual member accounts

Default Behavior

SCP Design Approaches

1. Allow List (Block by Default)

2. Deny List (Allow by Default)

Overlap Between Identity/Resource Policies and SCPs

Amazon CloudWatch (CW) 101

Amazon CloudWatch – Architecture and Key Components
  1. CloudWatch Metrics = the core CloudWatch functionality
    • Example: tracking EC2 CPU usage over time or disk usage from on-prem systems
    • Accepts metrics from AWS services, applications, and external environments
    • Certain metrics are automatically collected by AWS services
    • CloudWatch Agent is required when:
      • Capturing metrics not provided by default within AWS
        • e.g., application-level or OS-level metrics inside an EC2 instance
      • Collecting metrics from non-AWS environments
    • Due to the large volume of metrics, proper organization and separation is important
  2. CloudWatch Logs
    • Ingests logs from AWS services, applications, and on-premises systems
    • Some logs are automatically generated by AWS services, while others require the CloudWatch Agent
  3. CloudWatch Alarms
    • Initiates alerts or automated actions based on metric thresholds
    • Can send notifications via Amazon SNS
    • Example: trigger an alert when EC2 CPU usage exceeds 90%
    • Billing alerts can also be configured to notify via email when costs exceed a defined threshold
  4. CloudWatch Events (now replaced by Amazon EventBridge)
    • Integrates with AWS services and scheduled workflows
    • Produces events that can initiate actions (e.g., sending notifications)
    • Events can be triggered by:
      1. State changes (e.g., EC2 instance launch or termination)
      2. Scheduled timing (e.g., specific time or recurring intervals)
Amazon CloudWatch – Core Concepts

Diagram 1:

Diagram 2:

Namespace = Logical container for related metrics

Dimensions = Attributes used to filter and segment a metric

Diagram 3:

CloudWatch Logs

CloudWatch Logs – Overview
CloudWatch Logs – Architecture

Log sources: AWS services, mobile applications, databases, external APIs, and non-AWS compute systems

Log Stream = Ordered sequence of log events from a single source

Log Group = Collection of related log streams

Example scenario:

AWS CloudTrail

AWS CloudTrail (CT) – Overview

Types of CloudTrail Events

  1. Management Events
    • Represent control plane actions (resource management operations)
      • Examples: creating an EC2 instance, deleting an S3 bucket, setting up a VPC
    • Enabled by default
      • The first copy is free, while additional copies incur charges
  2. Data Events
    • Represent data plane operations (interactions within a resource)
      • Examples: uploading objects to S3 or invoking a Lambda function
    • Disabled by default due to the potentially high volume of activity
      • For instance, frequent access to an S3 bucket can generate many events
  3. Insight Events(less relevant for SAA-C03)
    • Detect unusual patterns or anomalies in account activity
AWS CloudTrail – Trail

Types of Trails

  1. Single-region trail
    • Records events only within the region where it is created
    • Reminder: CloudTrail is a regional service
  2. All-region trail
    • Captures events across all AWS regions
    • Technically, a collection of per-region trails, managed as one logical trail
    • Automatically updated when AWS adds new regions
  3. Organizational trail
    • Logs events from all accounts in an AWS Organization across all regions
    • Also, a collection of per-account, per-region trails, managed as one logical entity

Global Services

Trail Outputs

AWS CloudTrail – Pricing

Additional Costs

  1. Management events
    • First copy in all regions is included in the free basic service
    • Extra copies cost $2 per 100,000 events
  2. Data events
    • Charged at $0.10 per 100,000 events
    • Typically, much higher in volume than management events
    • No free allowance – charged from the first event

AWS Control Tower 101

AWS Control Tower – Key Concepts

Control Tower Dashboard

Control Tower Landing Zone

AWS Control Tower – Guardrails

AWS Control Tower – Account Factory