← Revision notesStudy notes

AWS Hands‑On Security

Chapter-by-chapter, lesson-by-lesson notes from every video in Chad Smith's course (Pearson, on O'Reilly): identities, policies, programmatic access, audit and compliance, multi-account governance, keys and secrets, threat detection and edge protection. Each lesson has its key points, the console steps from the demos, commands and policy examples, and a self-check at the end of each chapter.

8chapters
52lessons
4 h 49of video
25concepts
24demos
3scenarios

0 of 52 lessons ticked off

How the course runs: it builds progressively from protecting a single account's root user to governing an organization of accounts, then layers on encryption, detection and edge defences. Every chapter mixes short concept lessons with console or terminal demos you can repeat in your own account, and three real-world scenarios (3.8, 5.10, 8.5) tie the services together.

Lesson 1

AWS Identities

Proper identity management is the foundation of AWS security. This chapter secures the root user, builds administrator and power-user identities with IAM users and groups, introduces IAM roles for service-to-service access, and compares federation options for enterprises.

8 lessons · 38 min · 4 demos
IAM, root user, MFA, EventBridge, SAML, OIDC, IAM Identity Center
1.1Concept4:57

AWS root user best practices

  • Accurate contact information. If you are ever locked out of root, AWS Support can unlock it only when the details you give match what is configured on the account.
  • Root email should not belong to one human. Use a distribution list (or an alias for a personal account) so alerts such as "root password changed" or "MFA enabled" reach several people.
  • No root access keys. Delete or disable them. There is no business reason to use root from the CLI or an SDK.
  • Create accounts with AWS Organizations. Programmatically created member accounts get a random 32-character root password; the only way in as root is a password reset sent to the root email.
  • Go further: disable root on member accounts through Organizations. That makes the next items irrelevant for those accounts.
  • For standalone and management accounts, still apply: complex password, MFA, periodic password rotation and a periodic test that root sign-in still works.
  • MFA: up to 8 devices can be registered, but the instructor warns that with more than one device you lose the ability to have AWS Support unlock root.
  • Alarm on any root activity (it should always be an exception): CloudTrail to CloudWatch Logs with a metric filter and alarm, or simply an EventBridge rule.
  • Use root only for the small set of tasks that require it, never for day-to-day management.
  • In an organization, SCPs can restrict what root can do in member accounts; Control Tower creates guardrail SCPs for you, so you avoid writing and troubleshooting complicated policies.
ControlStandalone or management accountMember account, root disabled
Distribution-list email, accurate contactsYesYes
Delete root access keysYesYes
Complex password, MFA, rotation, periodic testYesNot needed (root unusable)
Alert on root usageYesYes
SCP / Control Tower guardrailsSCPs do not apply to the management accountYes
1.2Demo4:20

Demo: Protect the root user (console)

  1. Account menu (top right) → Security credentials. Confirm there are no access keys: programmatic root access is already blocked.
  2. Assign MFA device → name it after the app → choose Authenticator app (other choices: passkey/security key, hardware TOTP token) → Show QR code → scan → enter two consecutive 6-digit codes (about 30 s apart) → Add MFA.
  3. Discuss virtual vs hardware MFA trade-offs for your use case; remember up to 8 devices are allowed.
  4. EventBridge → Rules → Create rule "RootAccountUsage" → rule with an event pattern → paste JSON (below) → target an SNS topic that reaches the right people → let it create a role → create.
EventBridge pattern: root activity
{
  "detail-type": [
    "AWS API Call via CloudTrail",
    "AWS Console Sign In via CloudTrail"
  ],
  "detail": {
    "userIdentity": { "type": ["Root"] }
  }
}

Watch out These notifications are not real time; CloudTrail delivery adds delay. True real-time root alerting is harder to achieve.

1.3Concept4:34

IAM users and groups

  • IAM = Identity and Access Management: securely manage identities and access to AWS services and resources. The term is used across the industry, not just at AWS.
  • Scope: regional API endpoints, but IAM resources are available in every region of the same partition. No dependencies on other services.
  • Everyone who uses AWS works with IAM, not only security teams. The instructor files it under management & governance (the console lists it under Security, Identity & Compliance).
  • Use cases: control access to resources, manage permissions, MFA and authentication methods, roles for resources, and implementing least privilege.
  • The three A's: Authentication (prove identity), Authorization (permissions), Accounting/Auditing. IAM covers the first two.
  • IAM user = a principal identity: you must present an explicit credential to use it. Permissions attach directly or through group membership.
  • User credentials: console sign-in (username + password); access keys for programmatic access (direct API, CLI, SDKs); MFA, which can never be used on its own, only with one of the others.
  • IAM groups: a collection of users that receive the same permissions. Simplified compared with other directories: groups cannot be nested, so a user must be an explicit member of each group they need.
1.4Demo5:32

Demo: Create an IAM administrator (console)

Why: root is required for fewer than 10 tasks, so daily work needs an admin identity instead.

  1. IAM → Policies → filter by type AWS managed – job function (a short, human-readable list: AdministratorAccess, DatabaseAdministrator, DataScientist, SecurityAudit, Billing…).
  2. Open AdministratorAccess; the JSON view is tiny: allow every action on every resource. It covers everything except root-only tasks such as closing the account.
  3. User groups → Create group Admins → attach AdministratorAccess.
  4. Users → Create user MyAdmin → provide console access to a person, using IAM (not Identity Center) → autogenerated password → require a new password at next sign-in → add to Admins → Create.
  5. On the final page, get the password with Show or Download .csv. "Email sign-in instructions" sends the sign-in URL and username but not the password.
  6. The new admin then changes the password, adds MFA, creates access keys if appropriate, and manages their own user.
  7. Later, the user's Last accessed tab shows which services were really used: evidence for tightening permissions over time.
AdministratorAccess (AWS managed)
{
  "Version": "2012-10-17",
  "Statement": [
    { "Effect": "Allow", "Action": "*", "Resource": "*" }
  ]
}
1.5Demo4:39

Demo: Create an IAM power user (console)

  • Not everyone needs admin. Power users run daily operations but should not change account settings or manage users.
  • PowerUserAccess (AWS managed job function): allows everything that is not IAM, Organizations or Account, plus a few exceptions such as creating service-linked roles and listing roles.
  • AWS updates managed policies occasionally; the policy's version history shows what changed.
  • Steps: create group PowerUsers with PowerUserAccess → create user PowerUser with console access, autogenerated password, forced reset → add to group → save the password.
  • The console automatically adds IAMUserChangePassword to the user. PowerUserAccess alone would not let them change their own password; the extra policy uses a policy variable so they can change only their own.
PowerUserAccess, simplified shape
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "NotAction": ["iam:*", "organizations:*", "account:*"],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "iam:CreateServiceLinkedRole",
        "iam:DeleteServiceLinkedRole",
        "iam:ListRoles",
        "organizations:DescribeOrganization",
        "account:ListRegions"
      ],
      "Resource": "*"
    }
  ]
}
IAMUserChangePassword: only your own user
{
  "Effect": "Allow",
  "Action": ["iam:ChangePassword"],
  "Resource": ["arn:aws:iam::*:user/${aws:username}"]
}
1.6Concept3:45

IAM roles

  • Analogy: sudo on Linux or Run as on Windows. Assuming a role swaps your current permissions for another set for a limited time. It does not imply becoming an administrator.
  • A role is an IAM identity but not a principal identity: it has no credentials of its own. You assume it from a principal that has already authenticated.
  • A role has permission policies and a trust policy. The trust policy is a resource-based policy saying which principals may assume the role and under what conditions.
  • Trust policies add a Principal element. Valid principals include IAM users, federated users, IAM roles (assuming a role from a role is role chaining, common) and AWS services such as ec2.amazonaws.com, which is how resources get roles.
  • Cross-account access: a principal of arn:aws:iam::ACCOUNT:root delegates the choice of who may assume the role to that whole account.
  • Harden it with an external ID condition, an alphanumeric string supplied on every AssumeRole ("think of it as static MFA"). It helps prevent the confused deputy problem (see 3.8).
Cross-account trust policy with external ID
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": { "AWS": "arn:aws:iam::111122223333:root" },
      "Action": "sts:AssumeRole",
      "Condition": {
        "StringEquals": { "sts:ExternalId": "Unique-Partner-Phrase-42" }
      }
    }
  ]
}
1.7Demo5:16

Demo: Create an IAM role for EC2 (console)

  • Goal: a default EC2 role so the Systems Manager agent works and the CloudWatch agent can send guest-OS metrics.
  • AmazonSSMManagedInstanceCore: core Systems Manager functionality, including Session Manager (ssmmessages, ec2messages, get parameters). "SSM" survives from the old name Simple Systems Manager, still used in the CLI and APIs.
  • CloudWatchAgentServerPolicy: CloudWatch metrics, CloudWatch Logs, X-Ray, and ssm:GetParameter to read the agent config stored in Parameter Store under a specific name.
  • CloudWatchAgentAdminPolicy additionally lets the config wizard on the instance write the config to Parameter Store. Use the server policy for normal instances.
  • Steps: Roles → Create role → trusted entity AWS service → EC2 ("allows EC2 instances to call AWS services on your behalf") → attach both policies → confirm trusted entity ec2.amazonaws.com → name EC2DefaultRole → create.
  • A shortcut use case, "EC2 Role for Systems Manager", adds defaults; the demo shows the fully custom path.
  • From then on, attach the role (instance profile) to instances at launch.
Trust policy the console creates
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": { "Service": "ec2.amazonaws.com" },
      "Action": "sts:AssumeRole"
    }
  ]
}
1.8Concept4:30

Account federation options

OptionHow it worksExample identity providers
Single account, SAML 2.0Set up in IAM. External identities map to IAM roles they can assume; roles support normal policy types (least privilege or job functions such as power user). Attributes can be passed for precise access.Active Directory, Microsoft Entra ID, Google Workspace, Okta
Single account, OIDCAlso uses IAM roles, with OpenID Connect providers.Amazon, Facebook/Meta, Google, GitHub (GitHub Actions can act in AWS with no stored static secret)
Many accounts: IAM Identity CenterTemporary credentials through roles deployed by permission sets: define once, distributed to each assigned account. Requires all accounts in one AWS Organization; configured in the management or a delegated administrator account. Supports SAML and OIDC.Any of the above, or the built-in Identity Center directory (users, groups, attributes)

Watch out IAM Identity Center is region-scoped: you pick one region. Control Tower also works only in certain regions and must share Identity Center's region, so plan both together.

Tip A startup without an external IdP can begin with Identity Center's internal directory and still avoid creating IAM users in every account.

Key takeaways

  • Lock root down: no keys, MFA, shared mailbox, alerts on use; disable it in member accounts.
  • People use IAM users in groups (or better, federation); workloads use roles.
  • Job-function managed policies (AdministratorAccess, PowerUserAccess) are quick starting points; tighten with Last accessed data.
  • Roles = permissions + trust policy; cross-account trust needs an external ID or a specific principal.
  • Multi-account federation belongs in IAM Identity Center with permission sets.

Self-check

Why point the root email at a distribution list?

So security notices (password or MFA changes) reach several people and the account is not tied to one employee's inbox.

What is the difference between an IAM user and an IAM role?

A user is a principal with its own long-term credentials. A role has no credentials; an authenticated principal assumes it to get temporary credentials, and its trust policy controls who may do so.

Which two managed policies make a good default EC2 role?

AmazonSSMManagedInstanceCore (Systems Manager / Session Manager) and CloudWatchAgentServerPolicy (CloudWatch agent).

Why does a power user need IAMUserChangePassword?

PowerUserAccess excludes IAM actions, so without it the user could not change their own console password.

Which federation option scales to dozens of accounts?

IAM Identity Center with permission sets. It requires AWS Organizations and is deployed in one region.

Lesson 2

AWS Permissions

All AWS access control is expressed as policies. This chapter maps every policy type, then builds a least-privilege customer managed policy and a resource-based S3 bucket policy.

5 lessons · 24 min · 2 demos
Identity policies, resource policies, boundaries, session policies, ACLs
2.1Concept5:31

AWS policy types

  • Policies grant or deny access; an explicit deny overrides everything.
  • Policies are JSON key-value documents with a documented schema, applied at different scopes, which is why permissions get complicated with many workloads.
  • Everything is denied by default (implicit deny). Every action needs an explicit allow.
  1. Request arrives
  2. Any explicit Deny? → denied
  3. Allowed and within every boundary/SCP? → allowed
  4. Otherwise implicit deny
TypeWhat it isAttaches to
Identity-based: managed (AWS managed, customer managed)Standalone resources with their own lifecycle. AWS managed are read-only, maintained and occasionally updated by AWS, so they are versioned. Everything else is customer managed (you create, modify, delete).Many IAM users, groups and roles at once
Identity-based: inlineNot a standalone resource; a configuration value embedded in one identity.One user, group or role
Resource-based permission policyManages permissions only for the resource it is attached to.S3 buckets, Lambda functions, API Gateway and more
Role trust policyA resource policy whose only permission is sts:AssumeRole.IAM roles
Permission boundaryLooks like a policy but grants nothing: Allow statements define the maximum permissions; Deny is still an explicit deny.IAM users and roles; account or OU level via Organizations SCPs and RCPs
Session policyPassed when generating temporary credentials (e.g. AssumeRole) to deliberately scope the session below what the role allows.A single session
ACLsNot network ACLs. XML, no awareness of IAM, S3 only. Disabled by default on new buckets; you must re-enable them to use them.S3 buckets and objects
2.2Concept3:06

Identity-based policies

  • Two categories: managed (customer managed, AWS managed) and inline.
  • Managed policies are standalone: you can create, modify or delete them even while attached.
  • Inline policies live inside a user, group or role: no version control and a smaller character limit, but the same effect. Typical use: unique permissions needed by only one user or group.
  • Editability: customer managed, full control; AWS managed, use only. Some AWS managed policies have many versions and change often, so plan for that.
  • Attachment: directly to users, or to groups (users inherit through membership). Groups are the more sustainable, scalable choice; with many users, move on to IAM Identity Center and federation.
2.3Demo5:22

Demo: Create a customer managed IAM policy (console)

Goal: let a user or role list and download objects from one bucket and describe EC2 instances, nothing more.

  1. Note the bucket name in S3 (demo: "AWSF IAM Demo Bucket"). IAM → Policies → Create policy → visual editor.
  2. Service S3: the action list is overwhelming (List, Read, Write, Permissions management, Tagging). Resist "all S3 actions"; that is not least privilege. Pick ListBucket (List) and GetObject, GetObjectVersion (Read).
  3. Resources: bucket ARN for bucket actions, and bucket/* for object actions, so the JSON gets two resource lines.
  4. Optional conditions are available, such as MFA present or a source IP range.
  5. Add service EC2 → List → DescribeInstances (EC2 has about 194 list/describe and 448 write actions) on all resources.
  6. Switch to JSON, rename the Sids, name it "EC2andS3Custom" with a description → create, then attach to users, groups or roles.
Resulting policy
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "S3VariousOperations",
      "Effect": "Allow",
      "Action": ["s3:ListBucket", "s3:GetObject", "s3:GetObjectVersion"],
      "Resource": [
        "arn:aws:s3:::awsf-iam-demo-bucket",
        "arn:aws:s3:::awsf-iam-demo-bucket/*"
      ]
    },
    {
      "Sid": "DescribeEC2Instances",
      "Effect": "Allow",
      "Action": "ec2:DescribeInstances",
      "Resource": "*"
    }
  ]
}
2.4Concept4:14

Resource-based policies

  • Govern only the single resource they are attached to. Not every resource supports them; check the service documentation.
  • They require a Principal element (identity policies do not), naming which identities are in scope. A Resource element is also required.
  • Some resources make the policy mandatory at creation, e.g. a KMS key.
  • Supported examples: S3 buckets (most common), KMS keys, Backup vaults, CloudWatch Logs, Lambda functions, API Gateway, SQS queues, SNS topics and many more.
  • Pattern: allow everyone in your organization to read a bucket. "Principal": "*" alone is objectively a bad idea; the condition on aws:PrincipalOrgID is what scopes it down. If the condition fails, access falls back to identity policies or other grants.
Bucket policy: organization-wide read
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowOrgRead",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::example-shared-bucket/*",
      "Condition": {
        "StringEquals": { "aws:PrincipalOrgID": "o-a1b2c3d4e5" }
      }
    }
  ]
}
2.5Demo5:18

Demo: Create a resource policy (console)

  1. IAM: a user with no permission policies (Last accessed is empty). Signed in, they see errors all over the console.
  2. S3 → bucket → Permissions tab → Bucket policy is empty, so access depends entirely on IAM.
  3. Edit → Policy generator: type S3 bucket policy, Allow, principal = the user's ARN, actions ListBucket, GetObject, GetObjectVersion → Add statement (required before Generate) → Generate policy.
  4. The generator puts "Resource": "*", which will not work. Copy the bucket ARN from Properties and replace it with a list: bucket ARN and bucket ARN + /*.
  5. Save. The user can now list the bucket and download objects, granted purely by the resource policy.

Conditions can scope it further: a source CIDR range, or enforcing TLS.

Bucket policy for one user
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": { "AWS": "arn:aws:iam::111122223333:user/user-with-no-permissions" },
      "Action": ["s3:ListBucket", "s3:GetObject", "s3:GetObjectVersion"],
      "Resource": [
        "arn:aws:s3:::awsf-iam-demo-bucket",
        "arn:aws:s3:::awsf-iam-demo-bucket/*"
      ]
    }
  ]
}

Key takeaways

  • Default deny; explicit deny always wins.
  • Managed policies for reuse, inline only for one-off needs.
  • Boundaries, SCPs and RCPs cap permissions; they never grant.
  • Session policies narrow a role for one session.
  • S3 needs both the bucket ARN and the /* object ARN.

Self-check

An identity policy allows s3:GetObject and an SCP denies it. What happens?

Denied. An explicit deny anywhere overrides any allow.

What does an Allow statement in a permission boundary do?

It only sets the maximum permissions available; it grants nothing by itself.

Which element must resource policies include that identity policies do not?

Principal.

Name a resource type that forces you to write a resource policy at creation.

A KMS key (its key policy).

Why does an S3 read policy need two resource ARNs?

ListBucket acts on the bucket itself; GetObject and GetObjectVersion act on objects (bucket/*).

Lesson 3

Accessing AWS Services

How identities actually reach AWS: the console, CLI, CloudShell, language SDKs and raw APIs. Includes installing the CLI, using Boto3, assuming roles programmatically and a real-world least-privilege review.

8 lessons · 42 min · 4 demos · 1 scenario
STS, SigV4, CLI, CloudShell, Boto3, confused deputy
3.1Concept2:45

AWS access options

  • Authenticate with sign-in credentials (console) or access keys (programmatic).
  • Static identities: IAM users, principal identities. Temporary identities: not principals, created through federation with an external IdP or directly with STS.
  • Console: sign-in credentials plus MFA (especially for root). If AWS is your IdP, apply a password policy that matches company requirements.
  • Programmatic: every request must be signed with a generated signature; that is the proof of authentication. The CLI and SDKs sign automatically.
  • Everything is built on service API endpoints: AWS is 100% REST API driven. You can call endpoints directly, but then you generate the signatures yourself (still with access keys).
  1. Identity: static (IAM user) or temporary (federation, STS)
  2. Vehicle: console, CLI, SDK or direct API
  3. Signed request
  4. Service REST API endpoint
3.2Concept4:20

AWS CLI

  • Open-source tool favoured by operations teams; run commands inline or in shell scripts.
  • Called the unified CLI: every control- and data-plane operation sits under one aws command.
  • Anatomy: aws → generic options (region, output format, environment, filtering server-side or client-side) → command (the service API) → subcommand (the action) → parameters.
  • One service may have several commands: S3 has s3, s3api, s3control and more. Do not assume one command per service.
  • Subcommands are actions: launching an instance, creating a DynamoDB table, uploading an object.
  • Many network actions use the EC2 endpoint for legacy reasons, e.g. creating a security group (only group name and description are required; rules are added with separate actions).
CLI examples from the lesson
# aws [global options] <command> <subcommand> [parameters]
aws s3 ls                                    # instructor's quick permission test
aws ec2 start-instances --instance-ids i-0abc1234def567890
aws s3 cp ./report.csv s3://my-bucket/reports/
aws iam list-users
aws ec2 create-security-group --group-name web-sg --description "Web tier"

# global options work with any command
aws ec2 describe-instances --region us-west-2 --output table --profile dev
3.3Demo4:24

Demo: AWS CloudShell (console)

  • Terminal access from the console icon with no local install of the CLI or SDKs. Requires AWSCloudShellFullAccess or a superset (e.g. administrator).
  • It runs a Linux container with tools preinstalled: AWS CLI, Python (not the newest), Node.js, git. It uses your console identity.
  • Demo: write a small Python script with cat, run it, check aws sts get-caller-identity, list buckets, make a date-stamped bucket and copy the script into it.
  • Home storage persists, but it is small and AWS cleans it up if you do not use CloudShell for a while.
  • Options: font size, safe paste, inline Amazon Q suggestions.
CloudShell session
aws --version; python3 --version; node --version; git --version
mkdir demo && cd demo
cat > hello.py <<'EOF'
import sys
print(f"Hello, {sys.argv[1]}")
EOF
python3 hello.py CloudShell
aws sts get-caller-identity
BUCKET=cloudshell-demo-$(date +%Y%m%d%H%M%S)
aws s3 mb s3://$BUCKET
aws s3 cp hello.py s3://$BUCKET/
3.4Demo4:59

Demo: Install and configure the AWS CLI (terminal)

  1. Target: an Amazon Linux EC2 instance (ARM). Instead of the small-font browser Session Manager, Amazon Q generates the CLI command to open a Session Manager session from the local terminal.
  2. Installers exist for Linux, macOS (GUI or command line) and Windows (MSI with msiexec, interactive or silent). On Linux use a package manager or the command-line installer, choosing x86_64 or aarch64.
  3. In /tmp: download the zip with curl, unzip, run the installer, check aws --version.
  4. aws configure: leave access key and secret empty. On EC2 the CLI falls back to instance profile credentials from the attached role. Set the default region to the instance's region; keep JSON output.
  5. Test with aws ec2 describe-regions, which shows every region and its opt-in status.
Install on Linux (ARM)
# from your laptop: open a shell on the instance
aws ssm start-session --target i-0abc1234def567890

cd /tmp
curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o awscliv2.zip   # x86: awscli-exe-linux-x86_64.zip
unzip awscliv2.zip
sudo ./aws/install
aws --version
aws configure          # keys blank on EC2 with a role; set region, output json
aws ec2 describe-regions
3.5Concept3:48

AWS programming language SDKs

  • Common SDKs: JavaScript, Python (Boto3), .NET, Ruby, Java, Go, Node.js and others.
  • The SDK handles request signing; you only supply credentials. It also helps with things like pagination, compared with calling REST endpoints directly.
  • Not every action has an SDK or CLI equivalent. Sometimes only the console or the raw REST API can do it.
  • Node.js example: load the SDK, optionally set a region (not strictly needed for S3), create an S3 service object, call listBuckets, return output with basic error checking.
  • Python example: import boto3 plus botocore's ClientError/BotoCoreError, create a DynamoDB resource, pick the table, scan and print each item. Scan reads everything, which is fine for listing a small table.
Python: list every item in a table
import boto3
from botocore.exceptions import BotoCoreError, ClientError

table = boto3.resource("dynamodb").Table("Orders")
try:
    response = table.scan()          # reads the whole table
    for item in response["Items"]:
        print(item)
except (BotoCoreError, ClientError) as err:
    print("Request failed:", err)
3.6Demo5:41

Demo: Install and test the AWS Python SDK (terminal)

  1. Create and activate a virtual environment, then install Boto3 (a shell script could automate this; the demo runs commands individually).
  2. check_credentials.py: STS get_caller_identity, handling NoCredentialsError and ClientError → prints the 12-digit account ID and the user/role ARN.
  3. list_buckets.py: S3 client in the default region (us-east-1) → list_buckets → checks there are buckets and credentials work.
  4. list_ec2.py: describe_instances → walks the JSON (reservations → instances) for instance ID, Name tag, type and state; handles zero instances.
  5. aws_services_demo.py: one script touching S3 (bucket count), EC2 (describe_regions), IAM (current user) and STS (caller identity).
Setup and a credentials check
python3 -m venv venv
source venv/bin/activate
pip install boto3

# check_credentials.py
import boto3
from botocore.exceptions import ClientError, NoCredentialsError
try:
    me = boto3.client("sts").get_caller_identity()
    print(me["Account"], me["Arn"])
except NoCredentialsError:
    print("No AWS credentials found")
except ClientError as err:
    print("Error:", err)
3.7Demo7:17

Demo: Assume an IAM role (terminal)

  1. A setup script builds a venv and creates DemoAssumeRole: trust policy lets the current account (looked up automatically) delegate assumption; permission = AmazonS3ReadOnlyAccess. Uses aws iam create-role then attach-role-policy. Verify in the console (trust relationship and permissions).
  2. aws sts get-caller-identity shows the IAM user (csmith).
  3. aws sts assume-role returns temporary credentials, but the caller identity does not change. You must keep and apply those credentials yourself.
  4. A helper script asks for role ARN, session name and duration (3600), assumes the role and shows the new identity; outside the script you are back to csmith.
  5. Python: sts.assume_role(...) returns temporary credentials and expiry; build a session from them.
  6. Least effort: a CLI profile with the role ARN, then --profile demo-role on any command. MFA can be required too, though MFA and programmatic automation pull against each other.
CLI: assume, use, or profile
aws sts assume-role \
  --role-arn arn:aws:iam::111122223333:role/DemoAssumeRole \
  --role-session-name my-session-1 \
  --duration-seconds 3600
# credentials are only returned; export them to act as the role
export AWS_ACCESS_KEY_ID=...  AWS_SECRET_ACCESS_KEY=...  AWS_SESSION_TOKEN=...

# ~/.aws/config
[profile demo-role]
role_arn = arn:aws:iam::111122223333:role/DemoAssumeRole
source_profile = default
# mfa_serial = arn:aws:iam::111122223333:mfa/csmith   (optional)

aws s3 ls --profile demo-role
Python: assume_role
import boto3

creds = boto3.client("sts").assume_role(
    RoleArn="arn:aws:iam::111122223333:role/DemoAssumeRole",
    RoleSessionName="my-session-1",
    DurationSeconds=3600,
)["Credentials"]

session = boto3.Session(
    aws_access_key_id=creds["AccessKeyId"],
    aws_secret_access_key=creds["SecretAccessKey"],
    aws_session_token=creds["SessionToken"],
)
print(session.client("sts").get_caller_identity()["Arn"], creds["Expiration"])
3.8Scenario8:16

Real-world scenario: identity and permissions management

Situation: an IAM specialist reviews a company's users, groups, roles and resource policies (deployed with AWS Organizations) and must apply least privilege to reduce vulnerabilities.

VulnerabilityImprovements
1. Static keys in plain text on an EC2 instance (anti-pattern)Weak: strip the user's permissions and let it only assume a role (security through obscurity). Best: attach an instance profile role; credentials come from instance metadata, no static keys.
1b. Static keys on on-premises serversSame assume-role abstraction; or federated identities that keep refreshing temporary credentials; or do the work in CloudShell instead of on local compute.
2. Confused deputy. Your role trusts the partner's whole account; the partner's roles may assume any role; the partner trusts its partner the same way.Add an external ID condition to the trust policy and protect the phrase; or use a bucket policy that grants only the partner's specific role. The partner must also tighten its own trust policies.
3. Bucket policy delegating to a whole account (…456)Broad. Minor improvement: deny any request without TLS using a Bool condition on aws:SecureTransport.
4. EC2 app reads DynamoDB: no guardrailsRole condition allowing only requests from the VPC ID; a permission boundary to stop expansion; gateway endpoint policy allowing only the app subnet; SCP denying the table except through that endpoint; KMS customer managed key with the EC2 role as sole key user; a DynamoDB resource policy reinforcing the endpoint restriction.
  1. Third-party IAM user
  2. Third-party role (may assume any role)
  3. Partner's access role
  4. Your shared role (trusts partner account root)
  5. Your S3 data
Bucket policy statement: require TLS
{
  "Sid": "DenyInsecureTransport",
  "Effect": "Deny",
  "Principal": "*",
  "Action": "s3:*",
  "Resource": [
    "arn:aws:s3:::shared-bucket",
    "arn:aws:s3:::shared-bucket/*"
  ],
  "Condition": { "Bool": { "aws:SecureTransport": "false" } }
}

Key takeaways

  • Every path ends at a signed REST call; CLI and SDKs sign for you.
  • CLI grammar: command = service API, subcommand = action.
  • CloudShell is the zero-install terminal with your console identity.
  • On EC2 never configure keys: the instance profile is picked up automatically.
  • AssumeRole returns credentials; profiles make roles painless.
  • External IDs and specific principals stop confused-deputy chains.

Self-check

In aws s3api put-object, which part is the command and which the subcommand?

s3api is the command (service API); put-object is the subcommand (action).

You ran sts assume-role but get-caller-identity still shows your user. Why?

assume-role only returns temporary credentials; you must export them or use a profile with role_arn.

What should you enter for keys when running aws configure on an EC2 instance with a role?

Nothing. The CLI falls back to instance profile credentials.

What is the best replacement for static keys stored on an EC2 instance?

An IAM role attached as an instance profile.

Name two fixes for the confused deputy problem.

An external ID condition in the role trust policy, or a resource policy granting only the partner's specific role.

Lesson 4

AWS CloudTrail and Config

Visibility for security, compliance and operations: CloudTrail records who called which API and the outcome; AWS Config records how resources are configured over time and evaluates them against rules.

4 lessons · 23 min · 2 demos
Trails, data events, event history, recorders, rules, aggregators
4.1Concept6:11

AWS CloudTrail basics

  • Never assume a feature is on by default: a persistent trail is not.
  • Purpose: track user activity and API usage on AWS and in hybrid/multicloud environments. Region-scoped, but a trail can cover an entire account or an entire organization. Needs an S3 bucket for delivery (it can be created during setup). Category: management & governance.
  • Use cases: requests and outcomes at service endpoints, account security and compliance monitoring, troubleshooting operational or security incidents, auditing, detecting unauthorized changes.
  • Trail → S3 is mandatory: cheap long-term storage, but poor for monitoring. Optionally also deliver to a CloudWatch Logs group for monitoring and alarms.
  • Event history: always a 90-day searchable history in each region, with or without a trail.
  • Insights events (opt-in): anomaly detection with basic machine learning.
Event typePlaneExamplesDefault
Management events: read and write (opt into either or both)Control plane: create, read, describe, update, delete, listRunInstances, CreateBucket, DescribeVpcsCaptured by a trail
Data eventsData plane: the service's primary functionS3 GetObject/PutObject/ListObjects, Lambda Invoke, DynamoDB GetItem/PutItem/ScanOff; opt in per service or resource; extra charge
Insights eventsUnusual API activitySpikes in write calls or error ratesOff; opt in

Considerations

  • Know the trail's scope: one region, one account or the whole organization.
  • Understand data event pricing before enabling it.
  • Expire old log objects with an S3 lifecycle rule and set CloudWatch Logs retention, so you do not pay twice for long.
  • Analysis options: Athena on S3, CloudWatch Logs Insights, or OpenSearch.

Watch out Multiple trails covering the same scope: you pay for the second and every further copy of overlapping events.

4.2Demo5:32

Demo: Enable CloudTrail features (console)

  1. The instructor already has one organization-wide trail; with no trail, nothing is delivered to S3 or CloudWatch Logs.
  2. Create trail S3DataEvents: new S3 bucket; log file SSE-KMS encryption (good to keep on; the demo turns it off when the console insists on choosing a key); log file validation (limited value when you have huge numbers of log files); no SNS delivery.
  3. Enable CloudWatch Logs delivery with a new IAM role (e.g. "demo-cloudtrail-cwl-role"); you can view the role's policy document, which only covers delivery to CloudWatch Logs.
  4. Add a cost-center tag, because a second overlapping trail is billed.
  5. Event types offered: management, data, Insights, network activity. Choose Data events → resource type S3 → log selector template (read, write, console, service-initiated, custom) → "All events". JSON view shows the advanced selector.
  6. Result: all S3 data events land in this trail only, so you can build targeted monitoring (SNS, a Lambda processor).
  7. Event history: filter the 90-day inventory by user name (federated user or IAM user), event name or resource name, useful for troubleshooting even without a trail.
4.3Concept6:04

AWS Config basics

  • Lives in the overlap of security and compliance: assess, audit and evaluate resource configurations. Region-scoped, no explicit dependencies, management & governance.
  • Use cases: track configurations, assess compliance against rules, audit change history, detect insecure settings, basic remediation (works only when the setting is effectively boolean: on or off).
FeatureWhat it gives you
Recording streamA transaction log of create, update and delete events for the chosen resource types
Resource timelineHistory of each resource's configuration (excellent for security groups)
RelationshipsSee every resource associated with, for example, an EC2 instance
Advanced querySQL over resource configurations; powerful across an organization with an aggregator
SnapshotsConfiguration snapshots delivered to S3, used to build the timeline
Config rulesEvaluate compliance. Arguably the most important feature

Enabling Config: choose recorded resource types (explicit list, all supported, or all with exclusions) → S3 bucket for snapshots/history → optional SNS topic for the stream (very noisy; needs a business reason) → service-linked role for S3 and SNS access.

Aggregator: with many accounts and regions, per-region rules become unsustainable. Aggregate into one account and region and run rules there. Trade-off: an aggregator cannot remediate, only audit.

Managed rule examples (hundreds exist; custom rules run your logic in Lambda): required tags · encrypted EBS volumes · restricted SSH (no 0.0.0.0/0 on port 22) · RDS storage encrypted · CloudTrail enabled · strong IAM password policy · EC2 instances with no public IP.

4.4Demo4:18

Demo: Enable Config and create Config rules (console)

  1. Config dashboard → Get started (instead of one-click setup).
  2. Recording: all resource types, no overrides. Continuous vs daily recording (daily records only if a change occurred) is a key cost discussion.
  3. Global IAM resource types are recorded in us-east-1 already, so in this us-west-2 recorder they are excluded, avoiding duplicates.
  4. Use the existing Config role (Config already runs in another region) and an existing S3 bucket; no SNS topic.
  5. Add an AWS managed rule. Many are also deployed by Security Hub standards. The rule list only supports keyword search and page size (no Bedrock rules found). Choose ec2-imdsv2-check: instance metadata must require tokens (IMDSv2).
  6. Confirm. Recording starts and the compliance dashboard shows compliant vs noncompliant resources, with drill-down toward remediation.

Key takeaways

  • Create a trail: event history alone lasts 90 days per region.
  • S3 for storage, CloudWatch Logs for monitoring.
  • Data events cost extra; enable them selectively.
  • Overlapping trails double-bill.
  • Config = timeline + rules; aggregate org-wide, but remediation stays local.
  • Daily recording and single-region IAM recording cut Config cost.

Self-check

With no trail at all, what can you still see?

The 90-day event history of management events in each region.

Are S3 GetObject calls logged by a new trail by default?

No. They are data events: opt in per service or resource, at extra cost.

What can a Config aggregator not do?

Remediation. It only audits compliance.

Give two ways to cut AWS Config cost.

Daily (periodic) recording instead of continuous, and recording global IAM resources in only one region.

Lesson 5

Multiple Account Management

Splitting workloads across accounts is best practice, and AWS Organizations, SCPs, IAM Identity Center, Control Tower and AWS Backup keep that sprawl governable. Ends with a fintech governance scenario.

10 lessons · 59 min · 4 demos · 1 scenario
OUs, SCPs, RCPs, tag and backup policies, permission sets, landing zone
5.1Concept3:32

AWS Organizations basics

  • Multiple accounts (for billing, security, compliance…) add operational overhead; Organizations, a multi-account management service, mitigates it.
  • Scope is effectively global: it manages accounts rather than regional resources. No dependencies. Management & governance.
  • Use cases: centralized account management, enforcing security policies across accounts and regions, simpler billing, automated account creation, controlling access to services.
  • Structure: the account where you enable Organizations becomes the management account at the root; OUs form an inverted tree like a file system.
  1. Root (management account)
  2. Workloads OU
  3. Prod OU / Test OU
  4. E-commerce, Web, Marketing accounts

Alternatives: invert it (environment first, then a workload OU each), and add operational OUs, e.g. Security (security audit account) and Business continuity (backup account). Any structure is allowed; each has benefits and drawbacks.

5.2Concept7:20

AWS Organizations features

  • OUs group accounts by function or purpose, support policy inheritance and visualize structure. Nesting is possible, but AWS guidance: beyond about two levels you hit diminishing returns.
  • Programmatic account creation needs only the root email (root may even be disabled) and an account name; contact information can be inherited from the management account.
  • Billing & cost governance: consolidated billing (simpler payment, cost visibility, cost allocation tags); aggregated usage lets Reserved Instances and Savings Plans be shared and fully used; Billing Conductor and cost categories for credits, discounts, cost splitting and chargeback; aggregated volume reaches cheaper pricing tiers sooner (data transfer out, S3 storage); Cost Explorer and Budgets at member and org level.
Create an account from the CLI
aws organizations create-account \
  --email aws+ecommerce-prod@example.com \
  --account-name "E-Commerce Prod"
Policy typeWhat it controls
Backup policiesEnable AWS Backup plans (schedule, lifecycle, target vaults, tag-based selection) across accounts and regions
Tag policiesAudit and enforce tag compliance, e.g. for cost attribution
Resource control policies (RCPs)Maximum permissions on resource policies: bucket policies, Backup vault policies, Lambda function policies…
Service control policies (SCPs)Maximum permissions for every IAM user and role, and the root user, in the targeted accounts or OUs

SCP rules of thumb

  • Inherited down the OU tree: a very restrictive SCP near the top cannot be overridden lower down.
  • Allow and Deny are supported; the instructor finds allow-all plus targeted denies far easier.
  • Affect IAM users, roles and root, but not the management account, not service-linked roles, and not certain root-only actions.

Centralized service governance: trusted access lets a service operate across all org accounts (e.g. CloudTrail organization trail). Delegated administrator authorizes a member account to administer a service for the whole org; most security services support it (GuardDuty, Inspector, Security Hub, Firewall Manager…).

5.3Demo4:56

Demo: Organizations configuration management (console)

  • Signed in to the management account. The organization ID (left side) is what you use in identity or resource policies scoped by org membership.
  • Structure: OUs Demo, Internal, Legacy (an externally created account that was invited) and Security; the management account sits at the root. Account details show root email, attached policies, contacts and settings.
  • Services page: which services have trusted access. A delegated administrator for GuardDuty also needs trusted access so it can manage every account without signing in to each. CloudTrail trusted access powers the org trail.
  • Policies page types: AI services opt-out, Backup, Chat applications, Declarative policies for EC2, RCPs, Security Hub policies, SCPs, Tag policies (the demo has temporary tag policies).
  • Settings: delegated administrator for Organizations itself, and Delete organization. Restrict that action every way you can; SCPs do not protect the management account.
  • Add account: just a name and email, then place it anywhere. Member root access can also be disabled centrally, a big operational win.
5.4Demo6:53

Demo: Deploy an Organizations SCP (console)

  1. Policies → Service control policies: FullAWSAccess (allow all actions, all resources) is attached by default everywhere. Keep it and add targeted denies; deny-all with allow-lists is harder to implement and troubleshoot.
  2. Policy DenyEC2Terminate (below) → attach to the Demo OU (via Targets, or by browsing the tree). A child account's policies show it as inherited.
  3. Sign in to the member account via IAM Identity Center with AdministratorAccess → launch a t3.micro Amazon Linux 2023 instance (no key pair, existing security group) → wait for running → terminate (even skipping OS shutdown).
  4. Error: not authorized, explicit deny in a service control policy, plus a long base64 encoded message. Amazon Q's diagnosis cannot add more.
  5. In CloudShell, decode it: the JSON reveals the statement ID of the SCP, so you can find exactly which SCP blocked you.
  6. Back in the management account, detach the SCP from the OU. The effect is almost immediate; terminate now works.
SCP and the decode command
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "SCPDenyEC2Terminate",
      "Effect": "Deny",
      "Action": "ec2:TerminateInstances",
      "Resource": "*"
    }
  ]
}

aws sts decode-authorization-message \
  --encoded-message "PASTE_BASE64_MESSAGE" \
  --query DecodedMessage --output text
5.5Concept5:10

AWS IAM Identity Center

  • Connect your existing workforce identity source and centrally manage access to AWS. Region-scoped (important for Control Tower). Requires AWS Organizations. Security, identity & compliance (with a nod to management & governance).
  • Formerly AWS SSO; programmatic endpoints still say sso.
  • Use cases: centralize access to accounts, single sign-on, integrate external IdPs, granular access across many accounts.
  1. Enable (Organizations first)
  2. Create permission sets
  3. Configure federation: SAML or OIDC
  4. SCIM provisioning (optional, recommended)
  5. Map users/groups → permission sets → accounts
  • Permission set: AWS managed plus custom permissions and a session timeout; it behaves like a role template.
  • Two timeouts: the access portal session and each permission set session, which can be hard to manage at scale.
  • SCIM propagates user and group creation and deactivation from the external IdP: offboarding in the primary IdP removes AWS access everywhere (great for compliance).
  • Each assignment provisions a role in the account; naming conventions help. One-to-one user assignments do not scale; group-based assignments do.
  • Applications: assign users and groups to registered apps such as Amazon Q Developer and Client VPN.
5.6Demo5:50

Demo: IAM Identity Center (console)

  1. Settings: identity source = external SAML 2.0 (Google Workspace), access portal URL; Authentication tab sets how long interactive sessions last. With an external identity source, the instructor turns on the setting that lets users use Amazon Q Developer Pro in the console rather than the free tier.
  2. Management tab: delegated administrator (to avoid using the management account) and tags.
  3. Dashboards: users, groups, AWS accounts (mirrors the org tree), permission sets.
  4. Create a custom permission set (predefined ones exist): AWS managed job functions ReadOnlyAccess + SupportUser, which can view configuration and create support cases. Name it "ReadOnlySupport".
  5. Session duration defaults to 1 hour (separate from the portal login); raise it to 8 hours.
  6. Assign: AWS accounts → account in the Security OU → Assign users or groups → pick user → pick permission set → submit. Assignment is a three-way link: permission set × accounts × users/groups.
  7. Provisioning takes a few moments; refreshing the portal shows the new option without signing in again.
5.7Concept4:46

AWS Control Tower

  • Built as a layer on top of other services (as Elastic Beanstalk and CDK are). Purpose: set up and govern a secure multi-account environment.
  • Regional. Requires Organizations; if IAM Identity Center exists, Control Tower must be enabled in the same region. Management & governance, with security and compliance aspects.
  • Use cases: automate multi-account governance, enforce compliance guardrails, landing zone setup, central security posture monitoring, streamlined account baselines. A new account has nothing enabled: no services, features, security options or best practices.
  • Landing zone: a preconfigured multi-account environment. Enables CloudTrail and AWS Config for the organization, creates a Security OU and an empty Sandbox OU, and creates Audit and Log Archive accounts that hold Config and CloudTrail resources. Existing OUs and accounts can be imported later.
  • Account Factory: enabled in the management account, but baselines can be run from a separate hub account. Uses Service Catalog (a layer over CloudFormation); the baseline is a CloudFormation template deployed as a StackSet, so one update reaches every relevant account.
5.8Concept5:34

AWS Backup

  • "Least interesting, most important." Centrally manage and automate data protection. Regional, supports cross-account activity, no dependencies. Category: storage.
  • Use cases: centralized backup management, automated schedules, retention per compliance, restore ("if you can't restore it, you couldn't back it up either"), cross-account copies.
Storage familySupported resources
BlockEBS snapshots, EC2 AMIs, Storage Gateway (volume gateway)
FileAll FSx modes, EFS
ObjectS3
RelationalRDS, Aurora, Redshift
NoSQLDynamoDB, DocumentDB, Timestream, Neptune
  1. Tag resources (backup = true)
  2. Backup plan on a schedule
  3. Backup job
  4. Recovery point in a vault
  5. Restore
  • Backup vault: holds recovery points, has a resource policy, and encryption at rest with a KMS key is mandatory.
  • Backup plan: the glue between resources, jobs and vaults. Over time you accrue restore points. A few resource types support point-in-time recovery (any second in the range); most do not.
  • Rule parameters: frequency (interval or cron) · backup window (start and completion; first backups take longer) · lifecycle (move to cheaper tiers or delete; long-term retention) · storage tier · target vault.
  • Copies to another region and/or account, each with its own destination vault, lifecycle and storage tier (cheaper DR copies) and extra tags not on the source.
5.9Demo9:17

Demo: Implement AWS Backup (console)

  1. Left menu tour: vaults, search, backup policies, audit (which resources are backed up).
  2. Create vault "DemoVault": not logically air-gapped (special use cases); choose the KMS key (mandatory; default backup key); vaults themselves cost nothing.
  3. Create backup plan "DemoPlan" from scratch. Rule "Daily-NoCopy-1Month": vault DemoVault, daily, a start time and window (a job is not guaranteed to start instantly), complete within 18 h, no PITR (not using S3, RDS or Aurora), no cold storage, retention 1 month, no index, no copy. Add a cost-center tag to recovery points; they are what you pay for.
  4. Resource assignment "DemoResource": EC2 only, filtered by tag backup = true.
  5. Second rule "Monthly-Copy-1Year": monthly on day 1 (cron also possible), different window, start as soon as possible, complete within 2 days, local retention 1 week; copy to another region's default vault with its own lifecycle: warm for just over a week, then cold, kept 1 year total; cost-center tag.
  6. On-demand backup exists (choose resource, retention, vault, role), but it may still take up to an hour to start.
  7. Backup policies (Organizations): enable the policy type → create "DemoPolicy" with the visual editor or JSON: regions us-east-1 and us-west-2, cron schedule, start window minutes, target vault, lifecycle days, selection by tag (backup-required = true). Also manageable from the Organizations console.

Watch out During a security incident when you must back something up right now, create an AMI directly from the EC2 console rather than waiting up to an hour for an on-demand AWS Backup job.

5.10Scenario4:38

Real-world scenario: AWS governance services

Situation: a fintech grew organically to 15 accounts across dev, test and prod with no consistent policies, and a compliance audit is coming. Problems: manual provisioning of users and permissions; no centralized access control or visibility; no accountability for API activity; inconsistent resource configuration; 15 separate bills.

  1. Choose one account, enable Organizations: it becomes the management account.
  2. Before accounts join: their billing history is wiped on joining, so export it first (e.g. a backfilled Cost and Usage Report) to keep it.
  3. Accounts join: billing is consolidated; members can still see their own bill, use Cost Explorer and create budgets.
  4. Enable trusted access for CloudTrail and create an organization trail covering all accounts and regions.
  5. Create OUs Dev, Test, Prod and move the accounts in.
  6. SCPs per environment that deny dangerous actions (e.g. deleting certain S3 buckets).
  7. Tag policies to evaluate and enforce tag compliance on resource types.
  8. Backup policies: consistent tags make org-wide, cross-region backups easy.
  9. IAM Identity Center with an external IdP, centralizing users and groups.
  10. AWS Config org-wide with an aggregator in one account and region, plus rules to find noncompliant resources.

Key takeaways

  • OUs carry policy inheritance; keep them about two levels deep.
  • SCPs: allow-all plus targeted denies; they never touch the management account or service-linked roles.
  • Decode authorization messages to find the blocking SCP statement.
  • Trusted access vs delegated administrator: service across the org vs member account administering it.
  • Identity Center: permission sets, SCIM, group assignments; region matters.
  • Control Tower = landing zone + controls + Account Factory (StackSets).
  • Backup = tags + plans + encrypted vaults + cross-region copies.

Self-check

Does an SCP restrict users in the management account?

No. SCPs do not affect the management account (or service-linked roles).

How do you find which SCP caused an access-denied error?

Run aws sts decode-authorization-message on the encoded message; the output includes the matching statement ID.

Trusted access or delegated administrator: which lets a member account run GuardDuty for the org?

Delegated administrator, which also requires trusted access for GuardDuty to be enabled.

Which two accounts does a Control Tower landing zone create?

Audit and Log Archive, plus a Security OU and an empty Sandbox OU.

What is the default permission set session duration?

1 hour, separate from the access portal session.

What must you do before inviting existing accounts into a new organization?

Export their billing history; it is wiped when they join.

Lesson 6

Secrets and Key Management

Encryption at rest with KMS, secrets storage and rotation with Secrets Manager, and encryption in transit with ACM certificates, each with a hands-on demo.

6 lessons · 31 min · 3 demos
KMS key types, rotation, key policies, secrets, TLS certificates
6.1Concept7:01

AWS KMS

  • Key Management Service: create and control keys used to encrypt or digitally sign data. Used directly and as the underlying encryption for many other services. Regional, with multi-region replication available. No dependencies. Security, identity & compliance.
  • Use cases: encrypt data at rest (the primary one), central key management at scale, key permissions, integration with many services, auditing key usage.
  • Multi-tenant: you share the service with other customers, which matters for tightly regulated workloads.
  • Mainly symmetric encryption; asymmetric keys supported.
  • KMS generates key material and data keys; it is not for bulk crypto. The integrated service storing the data does the encryption.
  • KMS key = a logical resource holding one or more key materials; the primary audit point. Every key has a key policy that must exist and not be empty.
  • Rotation: KMS creates new key material, which encrypts from then on; old material is kept to decrypt older data keys and can later be disabled or deleted.
Key typeWhere it lives and who controls itRotationPermissions
AWS ownedIn AWS's own administrative accounts; AWS owns the whole chain of trust. Only some services (e.g. S3, DynamoDB), often the default. Free.Varies by service; check the user guideNo customer configuration, no auditing
AWS managedIn your account with alias aws/<service>; the default key per service per region. You cannot modify it.Yearly, mandatory, not configurableRead-only key policy delegating to IAM; no cross-account use
Customer managedFully yours; you can own the full chain of trust, at an operational cost. AWS-generated or imported material.Optional yearly schedule plus on-demand (AWS-generated material). Imported material: create a new key and move the alias.Key policy required at creation, the main permission mechanism; needed for cross-account access
6.2Demo5:13

Demo: Create and use a KMS key (console)

  1. AWS managed keys show aliases such as aws/ebs, aws/lambda, aws/elasticfilesystem. The aws/ebs policy allows any principal in the account that is authorized to use EBS, i.e. it delegates to IAM and restricts little.
  2. Customer managed keys → Create key: symmetric, encrypt and decrypt (alternatives: asymmetric, generate and verify MAC).
  3. Advanced options: key material origin (KMS, external key store, CloudHSM key store, or import your own); single-region vs multi-region.
  4. Alias "demo-kms-customer-key"; add a tag (keys are priced).
  5. Step 3, key administrators: your SSO AdministratorAccess role (AWSReservedSSO_AdministratorAccess…) or an IAM user; allow administrators to delete the key.
  6. Step 4, key users (encrypt, decrypt, re-encrypt): same identities here, e.g. an application role in practice. Cross-account access can be added.
  7. Review the generated key policy. You cannot skip it; it can be edited now or later, e.g. limiting principals to your organization.
  8. Key actions: enable, disable, schedule deletion. Tabs: key policy, cryptographic configuration, key material and rotation (request on-demand rotation), aliases.
6.3Concept4:09

AWS Secrets Manager

  • Storing long-term credentials locally or in plain text is an anti-pattern. Secrets Manager centrally manages the lifecycle of secrets. Regional. Depends on KMS for encryption. Security, identity & compliance.
  • Use cases: secure storage, automatic rotation, access via IAM or resource policies, auditing through CloudTrail, programmatic retrieval and service integrations.
  • Features: multi-region secrets, up to 64 KB of structured or unstructured text, versioning, rotation, mandatory encryption in transit and at rest.
  • Provisioning: associate with RDS, Aurora, DocumentDB or Redshift (needs a valid ARN for that resource) or store generic JSON or plaintext → choose or create a KMS key → optional resource policy (or rely on IAM) → optional rotation.
  1. Rotation schedule (interval or cron)
  2. Lambda function (created for you) in the database's VPC
  3. NAT gateway or Secrets Manager interface endpoint
  4. New credential set on the database and in the secret

Watch out The rotation Lambda has only private networking, so its subnet needs outbound access through a NAT gateway or an interface VPC endpoint for Secrets Manager.

6.4Demo5:16

Demo: Create and use a secret (console + terminal)

  1. Secret types: credentials for RDS, DocumentDB, Redshift, other database, or other type of secret. The first three tie to a real resource and can create the rotation Lambda.
  2. Other type: key/value pairs (username, password, database) → default KMS key → name "test-secret" → cost-center tag (storage and API calls cost money) → permissions via IAM → no replication or rotation → store. The console shows sample code; Retrieve secret value shows key/value or plaintext.
  3. Second secret for RDS: same fields, select the database instance, name it like "demo/database/credentials", no rotation.
  4. Terminal scripts: list secrets; get only the password; describe (metadata, never values); update the value, then read it again to see the new version.
Secrets Manager CLI
aws secretsmanager list-secrets

aws secretsmanager get-secret-value \
  --secret-id demo/database/credentials \
  --query SecretString --output text | jq -r .password   # avoid echoing passwords in real use

aws secretsmanager describe-secret --secret-id demo/database/credentials

aws secretsmanager update-secret \
  --secret-id demo/database/credentials \
  --secret-string '{"username":"demouser","password":"N3w-Value-2026"}'
6.5Concept4:18

AWS Certificate Manager (ACM)

  • KMS covers data at rest; ACM covers data in transit: provision and manage TLS certificates (marketing says "SSL/TLS", but they are TLS) for AWS, hybrid and multicloud workloads.
  • Regional, though certificates can be used by global services with a restriction (CloudFront uses certificates from us-east-1). No dependencies. Security, identity & compliance.
  • Use cases: easy provisioning, automatic renewal (ends the classic expired-certificate outage), CloudFront (a primary use), HTTPS on ALB, NLB and API Gateway, securing endpoints.
  • AWS Private CA (PCA) has been split into its own service for managed private ("self-signed") certificates.
  1. Domains: single, wildcard, or several unrelated
  2. Exportable? No = free; yes = paid
  3. Validation: DNS or email
  4. Key algorithm, e.g. RSA 2048
  5. Attach to an integrated service
  • Non-exportable certificates are free but only usable through ACM's native integrations; exportable ones can be used anywhere and cost money.
  • With Route 53 in the same account, DNS validation records can be created automatically.
  • Integrations: ELB, CloudFront, API Gateway, Cognito, CloudFormation, Amplify, OpenSearch, Network Firewall and more.
6.6Demo4:33

Demo: Create and use a TLS certificate (console)

  1. Searching "ACM" also shows Private CA; open Certificate Manager. Request → public certificate (private is greyed out with no private CA).
  2. Names: the base subdomain (demo.awsf.brightkey.cloud) plus a wildcard of it, so one cert serves the base and anything under it.
  3. Leave export disabled; enabling it switches the cert from free to paid.
  4. DNS validation; Route 53 hosted zone is in the same account (an existing ACM validation record there is for the parent domain). RSA 2048, no tags → Request.
  5. Click Create records in Route 53 to add the CNAMEs automatically (or copy them manually to another DNS provider).
  6. Status stays Pending validation for a while, then Issued. Then attach to CloudFront, an ALB, API Gateway and other integrated services.

Watch out Issuance is not instantaneous. CloudFormation, Terraform or other automation must wait until the certificate is issued before using it.

Key takeaways

  • KMS makes keys and data keys; services do the bulk encryption.
  • Choose customer managed keys for control, auditing and cross-account access.
  • AWS managed keys rotate yearly automatically; imported material rotates by swapping keys behind an alias.
  • Secrets Manager: KMS-encrypted, versioned, 64 KB, rotation via Lambda in the VPC.
  • ACM: free auto-renewing certs for integrated services; Private CA for internal TLS.

Self-check

Which KMS key type is required for cross-account encryption?

A customer managed key, shared through its key policy.

How often are AWS managed keys rotated, and can you change it?

Every year, automatically; it is not configurable.

How do you rotate a key with imported material?

Create a new key with new material and repoint the alias to it.

A rotation Lambda in a private subnet times out. What is missing?

A route to the Secrets Manager endpoint: a NAT gateway or a Secrets Manager interface VPC endpoint.

How do you keep an ACM certificate free?

Leave export disabled and use it only with ACM-integrated services.

Lesson 7

Security Reporting Services

Detective services that surface threats, vulnerabilities and compliance gaps: GuardDuty for threats, Inspector for software vulnerabilities, Security Hub to aggregate and score it all, plus event-driven alerting.

6 lessons · 34 min · 3 demos
Findings, severity, protection plans, CVEs, standards, EventBridge
7.1Concept6:56

Amazon GuardDuty

  • Intelligent threat detection with almost no configuration. The tagline says "protect", but it is detective only: it prevents nothing. Regional, no explicit dependencies. Security, identity & compliance.
  • Use cases: malicious account activity, unusual API calls, compromised EC2 instances, anomalous network behaviour in VPC flows, suspicious logins.
  • How: an ML model per account, seeded with known threat vectors (bad IPs, actions that always produce findings such as root sign-in), then gradually trained on your normal behaviour; anomalies in certain categories become findings.
  • Foundational data sources: CloudTrail management events, VPC Flow Logs, Route 53 Resolver DNS query logs. GuardDuty consumes them directly; you do not need to enable a trail or flow logs. A brand-new account gets threat detection immediately.
  • Extended threat detection / runtime monitoring: EC2, ECS on Fargate and EKS, each needing an agent on the resource.
  • Protection plans (opt-in): S3 data events; Malware Protection for S3 (separate); EKS audit logs; Malware Protection for EC2 (EBS); RDS/Aurora login activity; Lambda network activity.

Watch out EBS malware scanning snapshots your volume, restores it as a volume in an AWS administrative account, and scans it from an instance you do not control. Plain-text sensitive data on those volumes could potentially be read by AWS, so weigh that.

  1. EC2 in public subnet, SSH 22 open to the world
  2. Attackers scan AWS's published IP ranges; brute force within hours
  3. Flow logs and DNS logs show a recognizable signature
  4. GuardDuty finding
  5. Notification or automated response
7.2Demo5:40

Demo: Deliver GuardDuty findings to SNS (console)

  1. Findings in a member account: e.g. "invoked using root credentials", "S3 public access granted". A delegated administrator account holds the org-wide findings and may be the better place for monitoring.
  2. Severity is a number from 1 to 10 (table below).
  3. In the delegated admin account, Protection plans enable S3, EKS, runtime monitoring and extended threat detection, with a table view to add or remove accounts.
  4. EventBridge is the integration point: Rules → Create → event pattern → source GuardDuty, type "GuardDuty Finding". The form cannot filter further.
  5. From the documentation, edit the pattern JSON with a numeric severity filter ≥ 7 (high and critical) → target an SNS topic → create.
  6. Scripted version (bash, AWS CLI): create the topic if missing → define the pattern → put-rule → put-targets (rule and target are separate calls) → permission for EventBridge to publish to SNS → optional email subscription. End-to-end event-driven monitoring.
SeverityRange
Low1.0 – 3.9
Medium4.0 – 6.9
High7.0 – 8.9
Critical9.0 – 10.0
Pattern and CLI wiring
{
  "source": ["aws.guardduty"],
  "detail-type": ["GuardDuty Finding"],
  "detail": {
    "severity": [{ "numeric": [">=", 7] }]
  }
}

aws sns create-topic --name guardduty-high-findings
aws events put-rule --name guardduty-high --event-pattern file://pattern.json
aws events put-targets --rule guardduty-high \
  --targets Id=sns,Arn=arn:aws:sns:us-east-1:111122223333:guardduty-high-findings
aws sns subscribe --topic-arn arn:aws:sns:us-east-1:111122223333:guardduty-high-findings \
  --protocol email --notification-endpoint secops@example.com
7.3Concept4:25

Amazon Inspector

  • The only AWS service for software vulnerability scanning: automated, continual vulnerability management at scale. Regional, no explicit dependencies (but needs compute to scan). Security, identity & compliance.
  • Use cases: scan EC2 for vulnerabilities, detect newly disclosed (zero-day) CVEs, prioritize with risk scores (combine with how exploitable the issue is in your infrastructure), scan container images, compliance.
Scan typeCoverage
EC2 automated scansLinux and Windows OS packages by version; deep inspection adds language libraries and dependencies (Linux)
ECR image scanningContainer images, mapped to the running containers that use them
LambdaPackage vulnerability scans and code scans of functions
CIS scansCenter for Internet Security OS benchmarks, Linux and Windows
Code securityExternal repositories such as GitHub
  1. Instance in a private subnet
  2. SSM Agent (no dedicated agent)
  3. IAM role with Systems Manager permissions
  4. Route to SSM: NAT → IGW, or SSM interface endpoints
  5. Inventory via SSM associations, near real time
7.4Demo4:30

Demo: Explore Inspector findings (console)

  1. Work from the delegated administrator account; a member account hides much of the configuration.
  2. Menu: findings, code security, software bill of materials (SBOM), on-demand CIS scans (Windows and Linux), resource coverage, general settings.
  3. General settings: activate or deactivate Inspector; EC2 scanning mode (agent-based or not) and deep inspection; ECR settings; usage page with a month-end cost estimate.
  4. Dashboard coverage: accounts, instances, repositories, Lambda functions. Fewer Lambda functions are covered because only recently invoked or updated functions are scanned (the instructor says roughly the last couple of weeks; AWS documentation states 90 days).
  5. Findings by Lambda function: a deliberately vulnerable function shows CVEs in dependencies → open a critical → CVE details → remediation ("upgrade the installed package").
  6. EC2 findings: remediation such as updating the kernel. Everything (compute and container repos) is in one dashboard.
  7. All findings → filter severity = Critical → export, giving a work inventory.
7.5Concept6:45

AWS Security Hub

  • One dashboard aggregating findings from the other security services, to prioritize and respond at scale. Entirely passive: no built-in mitigation or remediation. Regional. Depends on AWS Config, which implements its controls. Security, identity & compliance.
  • Use cases: aggregate findings, prioritize by severity, integrate the security ecosystem, automate security checks and centralize results, choose standards.
  • Standards: AWS Foundational Security Best Practices · CIS AWS Foundations Benchmark (several versions) · NIST SP 800-53 Rev 5 · NIST SP 800-171 Rev 2 · PCI DSS · AWS Resource Tagging Standard.

Watch out Do not enable every standard by reflex. Identical checks across standards are not deduplicated (more Config cost); only findings can be consolidated, and too many standards make it hard to see what is truly critical.

DirectionIntegrations
InboundFirewall Manager, GuardDuty, IAM Access Analyzer, Inspector, Macie, AWS Config, Patch Manager, AWS Health (abuse notices can signal compromise)
OutboundChatbot notifications, Detective (forensics), Security Lake, Audit Manager (audit reports)

Example: Jira workflow

  1. Finding on a control
  2. EventBridge rule
  3. Lambda: Jira creds from Secrets Manager, creates ticket
  4. Developer recommends accept or remediate
  5. Security engineer approves
  6. Scheduled Lambda: suppress finding, or remediate
7.6Demo4:48

Demo: Enable Security Hub standards (console)

  1. The console now shows Security Hub and Security Hub CSPM; standards live in CSPM. The security score also appears as a widget on the console home.
  2. Enabled standards: AWS Foundational Security Best Practices (a couple of hundred checks), CIS v3 (much lower score), NIST 800-53 Rev 5. Overlapping checks are all paid for.
  3. Settings → General → Consolidated control findings: one finding per control across standards, vastly fewer findings.
  4. Drill into a standard (333 controls in the demo): pass/fail dashboard. Critical examples: security groups allowing unrestricted access to high-risk ports; S3 general purpose buckets not blocking public read; SSM documents not blocking public sharing.
  5. Open a control: every resource across the org with status, account and ARN, plus the Config rule behind it. Standards rely on your Config recorder; if Config only feeds Security Hub, daily recording may be enough.
  6. Summary widgets: assets with most findings, findings by region, common threats, software vulnerabilities (from the Inspector integration).
  7. Integrations page: make sure GuardDuty, Inspector, Detective, Firewall Manager and others are enabled.
  8. Enabling a standard (e.g. NIST 800-171) is one click, but findings can take up to 24 hours to populate.

Key takeaways

  • GuardDuty: detective only, zero-setup data sources, opt-in protection plans.
  • Route findings with EventBridge, filtering severity numerically.
  • Inspector rides on the SSM Agent; use the delegated admin for an org view.
  • Security Hub aggregates, scores and integrates, but does not remediate.
  • Pick standards deliberately and turn on consolidated control findings.

Self-check

Do you need to enable VPC Flow Logs for GuardDuty to analyse network traffic?

No. GuardDuty reads flow logs, DNS logs and CloudTrail management events directly.

What is the privacy consideration with GuardDuty malware protection for EC2?

Volumes are snapshotted and scanned in an AWS-owned account on an instance you do not control.

How do you alert only on high and critical GuardDuty findings?

An EventBridge rule with a numeric filter severity >= 7, targeting SNS.

What agent does Inspector use on EC2?

The Systems Manager (SSM) Agent, with an IAM role and network access to SSM.

Which service must be enabled for Security Hub controls to run?

AWS Config.

Lesson 8

Edge Protection Services

Stop attacks before they reach the application: AWS WAF web ACLs for layer-7 filtering and bot control, AWS Shield for DDoS, and a final scenario combining every service in the course.

5 lessons · 33 min · 2 demos · 1 scenario
Web ACLs, WCUs, managed rule groups, Bot Control, Shield Advanced
8.1Concept7:40

AWS WAF

  • A web ACL is a "dangling" resource, useless until associated (like EBS volumes, target groups or IAM policies). Web Application Firewall protects web apps from common exploits. Regional or global depending on the associated resource. Security, specifically layer 7.
  • Use cases: block malicious traffic, OWASP Top 10, rate-limit abusive requests (deliberately vague: "abusive" differs per workload), reject bots and scrapers, secure edge services.
  • Features: labels (extraordinarily powerful), Bot Control, account takeover/fraud protection, real-time visibility, IP sets, regex pattern sets for filter reuse.
  • Integrations: CloudFront, API Gateway, ALB, AppSync (GraphQL), Cognito, App Runner, Verified Access, Amplify.

Example rule flow on CloudFront (a second distribution serves a Lambda-generated "turnaway" page explaining blocks):

  1. Label everything (bot signals, IP reputation, headers, path)
  2. Allow trusted IP sets
  3. Allow known user agents, headers, auth
  4. Block bad IP sets → turnaway
  5. Managed rules: OWASP core, known exploits
  6. Bot Control: allow, challenge or block
  7. Default action
Client typeTreatment
Legitimate browsersAllowed via user agent, headers, authentication, or by Bot Control
Legitimate mobile appsAllowed via user agent, headers or authentication
Partner APIsAllowed by IP ranges, possibly a static partner header
Good bots and crawlersExplicitly allowed
Bad bots and scrapersDenied by IP or Bot Control
Break-in fingerprintsGrouped by traffic fingerprint and blocked with a managed rule

Rate limiting overrides most of the above: per path, per distribution, regional, global or by geo-IP. It is a safety lever so even legitimate traffic cannot overwhelm the backend and hurt availability.

8.2Demo7:06

Demo: Create a WAF web ACL (console)

  1. Searching "WAF" shows WAF, Shield, Shield network security director and Firewall Manager. Open WAF → Create web ACL.
  2. Choose regional (ALB, API Gateway…) or global (CloudFront). Demo: CloudFront, name "test-waf-with-bot-ctrl", no association yet.
  3. Request body inspection: by default no more than 16 KB is inspected, so attackers can pad requests. You can raise it up to 64 KB at extra cost.
  4. Capacity is measured in WCUs: limit 5,000; anything over 1,500 increases cost.
  5. Add managed rule groups (AWS; third parties sell others). Paid: account creation fraud prevention, account takeover prevention, anti-DDoS (L7), Bot Control.
  6. Bot Control inspection level: Common (self-identifying bots, scrapers, search engines, automated browsers) vs Targeted (several ML models, rate limits, challenge and CAPTCHA; enterprise production, needing weeks to months of tuning). Common adds 50 WCU. Scope-down statements are possible; per-rule overrides to Challenge are the least invasive, letting browsers through while breaking bots. Targeted checks include missing tokens, volumetric sessions, token reuse.
  7. Free groups: Amazon IP reputation list, Anonymous IP list (e.g. VPNs from unexpected places), Core rule set (think OWASP Top 10), Known bad inputs, Linux OS, PHP, SQL database, Windows, WordPress.
  8. Default action Allow (demo totals 825 WCU) → set priority: IP reputation first, Bot Control last → CloudWatch metrics and sampled requests (handy for troubleshooting without full logs) → review → create, then associate.
8.3Demo4:46

Demo: Associate WAF with edge services (console)

  1. WAF & Shield → Web ACLs → the Global (CloudFront) section. A us-east-1 regional web ACL will not work with CloudFront.
  2. An existing web ACL's Associated AWS resources lists its distribution; check logging, metrics and sampled requests to monitor behaviour.
  3. CloudFront → distribution without protection → Security tab → Manage protections → Enable WAF → let CloudFront create a web ACL or use an existing one ("Demo-ACL-ready") → Save.
  4. Status shows Deploying; allow 5–10 minutes to propagate. Then sampling or full logs show allowed, blocked, challenged, CAPTCHA and labelled requests.
  5. Test script against a distribution with Bot Control: 100 requests each with browser, python-requests, curl, wget, Scrapy and search-engine user agents. Browser gets 200; scripted clients get 403 from Bot Control; even the Googlebot imitation is possibly rate limited. A practical way to validate the web ACL.
8.4Concept5:11

AWS Shield

  • Rare in AWS: the basic version is on by default for every account. Analyses network security configuration and provides managed DDoS (distributed denial of service) protection. Regional and global scope by resource. No dependencies. Security, identity & compliance.
  • Use cases: defend against DDoS at different OSI layers, protect the edge together with CloudFront and WAF, 24/7 threat monitoring; Advanced adds more sophisticated monitoring and automatic mitigation.
Shield StandardShield Advanced
OSI layers3 and 4 (network, transport)3 to 7
CostFree, on by defaultHigh base subscription plus opt-in per protected resource
ResourcesCloudFront, Route 53, Global Accelerator; essentially AWS protecting its own infrastructure from a noisy neighbourCloudFront distributions, Route 53 hosted zones, Global Accelerator, Elastic IPs (indirectly EC2 in public subnets, and NLB with an EIP), ALB, Classic Load Balancer
Protects your scaling costs?NoYes: cost protection credits if you scaled to absorb an attack before mitigation
VisibilityNoneAttack notifications, real-time metrics dashboard, view of attacks on AWS infrastructure for correlation
PeopleNoneShield Response Team (SRT) of DDoS specialists
WAFSeparateIntegrated with WAF on CloudFront, ALB, API Gateway
8.5Scenario7:16

Real-world scenario: AWS security services

Situation: a SaaS project-management company serving healthcare, finance and government has fragmented, hard-to-audit security and a costly incident behind it. Goals: handle PII and financial records; comply with SOC 2, HIPAA and PCI DSS; scale 10× in 12 months (10,000 to 100,000 users); a 99.9% uptime SLA.

Current state: manual certificate management · database passwords hard-coded in the app · threat detection not centralized · many tools with no unified view · DDoS-vulnerable at peaks. Impact: two incidents in six months, a failed enterprise client audit, $50K revenue lost to downtime.

Step 1: protect application data and credentials

  1. Client → CloudFront: ACM cert, auto-renewed
  2. CloudFront → ALB: same ACM cert
  3. ALB → app: cert from ACM Private CA
  4. EBS: KMS at rest
  5. EFS: TLS via mount helper + KMS
  6. RDS: Secrets Manager creds, TLS + KMS

Step 2: protect the edge

WAF web ACL on CloudFront to label, allow and deny; Shield Advanced enabled on the distribution.

Step 3: protect the account

  1. CloudTrail audit log
  2. GuardDuty (uses CloudTrail)
  3. Security Hub + standards via Config rules
  4. EventBridge
  5. SNS
  6. Chatbot → Slack or Teams

Scenario outcomes as presented: no security incidents in the 12 months after; much better compliance; 99.9% uptime achieved; 75% less security-management overhead; certificates and credentials almost fully automated; mean time to detect down to 2 minutes; all enterprise audits passed; scaled to 150,000 users with better trust and retention.

Key takeaways

  • Web ACLs do nothing until associated; CloudFront needs the global scope.
  • Label first, allow known-good, block known-bad, then Bot Control, with rate limits on top.
  • Watch the body-inspection size and WCU budget, for both security and cost.
  • Shield Standard protects AWS; Shield Advanced protects you (L7, SRT, cost credits).
  • Defence in depth: ACM/KMS/Secrets Manager for data, WAF/Shield at the edge, CloudTrail/GuardDuty/Security Hub for the account.

Self-check

What scope must a web ACL have to attach to CloudFront?

Global (CloudFront), not a regional web ACL.

How much of a request body does a CloudFront web ACL inspect by default?

16 KB, adjustable up to 64 KB at extra cost.

What are the WCU limit and the cost threshold?

5,000 WCUs maximum; above 1,500 costs more.

Which Bot Control action is least invasive for real users?

Challenge: browsers pass silently, scripted clients fail.

How can Shield Advanced protect a Network Load Balancer?

By associating an Elastic IP with it and protecting the EIP.

Reference

Service cheat sheet

The instructor introduces each service the same way: purpose, scope, dependencies and category. Here they are side by side.

ServiceWhat it doesScopeDepends onLesson
IAMIdentities, credentials and permission policiesGlobal within a partitionNothing1.3, 2.x
CloudTrailAudit log of API calls and outcomesRegion; trails can span an account or orgS3 bucket4.1
AWS ConfigConfiguration history, relationships, rulesRegion (aggregators span accounts)Nothing explicit4.3
OrganizationsAccounts, OUs, policies, consolidated billingGlobal (account level)Nothing5.1
IAM Identity CenterWorkforce SSO and permission setsRegionOrganizations5.5
Control TowerLanding zone, guardrails, Account FactoryRegion (Identity Center's)Organizations5.7
AWS BackupCentral backup plans, encrypted vaults, copiesRegion, cross-account capableNothing (vault needs a KMS key)5.8
KMSKeys and data keys for encryption at restRegion (multi-region keys)Nothing6.1
Secrets ManagerStore, version, rotate secretsRegion (replication)KMS6.3
ACMPublic TLS certificates with auto-renewalRegion (CloudFront: us-east-1)Nothing6.5
GuardDutyML threat detection (detective only)RegionNothing explicit7.1
InspectorVulnerability scanning: EC2, ECR, Lambda, CIS, codeRegionSSM Agent for EC27.3
Security HubAggregated findings, standards, scoresRegionAWS Config7.5
WAFLayer-7 filtering with web ACLsRegional or globalAn associated resource8.1
ShieldDDoS protection, Standard and AdvancedRegion and globalNothing8.4
Reference

Numbers to remember

8MFA devices allowed on root (more than one loses the Support unlock path, per the course)
32characters in the random root password of Organizations-created accounts
< 10tasks that genuinely require root
90 daysCloudTrail event history per region, even without a trail
2OU levels before nesting hits diminishing returns
1 hdefault permission set session (demo raises it to 8 h)
64 KBmaximum size of a Secrets Manager secret
1 yearautomatic rotation of AWS managed KMS keys
≥ 7GuardDuty severity that means high or critical (scale 1–10)
16 KBdefault WAF body inspection on CloudFront; 64 KB max at extra cost
5,000WCUs per web ACL; above 1,500 costs more
5–10 minfor a WAF association to propagate across CloudFront
1 hpossible delay before an on-demand AWS Backup job starts
24 hfor a newly enabled Security Hub standard to populate findings
$0for a non-exportable ACM certificate