Bird
Raised Fist0
AWScloud~10 mins

Why defense in depth matters in AWS - Test Your Understanding

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a security group that allows SSH access.

AWS
resource "aws_security_group" "example" {
  name        = "example"
  description = "Allow SSH access"

  ingress {
    from_port   = 22
    to_port     = 22
    protocol    = "tcp"
    cidr_blocks = [[1]]
  }
}
Drag options to blanks, or click blank then click option'
A"::/0"
B"192.168.1.1/32"
C"10.0.0.0/16"
D"0.0.0.0/0"
Attempts:
3 left
💡 Hint
Common Mistakes
Using an IP address without CIDR notation
Using an IPv6 CIDR block when IPv4 is expected
2fill in blank
medium

Complete the code to enable encryption on an S3 bucket.

AWS
resource "aws_s3_bucket" "example" {
  bucket = "my-bucket"

  server_side_encryption_configuration {
    rule {
      apply_server_side_encryption_by_default {
        sse_algorithm = [1]
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
A"AES256"
B"aws:kms"
C"RSA"
D"none"
Attempts:
3 left
💡 Hint
Common Mistakes
Using unsupported encryption algorithms
Leaving encryption disabled
3fill in blank
hard

Fix the error in the IAM policy statement to allow only read access to S3 buckets.

AWS
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [1],
      "Resource": "arn:aws:s3:::example-bucket/*"
    }
  ]
}
Drag options to blanks, or click blank then click option'
A"s3:PutObject"
B"s3:*"
C["s3:GetObject"]
D["s3:DeleteObject"]
Attempts:
3 left
💡 Hint
Common Mistakes
Using wildcard actions that allow more than read
Not using a list for the Action field
4fill in blank
hard

Fill both blanks to create a VPC with a public subnet and enable internet access.

AWS
resource "aws_vpc" "main" {
  cidr_block = [1]
}

resource "aws_subnet" "public" {
  vpc_id            = aws_vpc.main.id
  cidr_block        = [2]
  map_public_ip_on_launch = true
}
Drag options to blanks, or click blank then click option'
A"10.0.0.0/16"
B"10.0.1.0/24"
C"192.168.0.0/16"
D"192.168.1.0/24"
Attempts:
3 left
💡 Hint
Common Mistakes
Using subnet CIDR outside the VPC range
Not enabling public IP mapping on subnet
5fill in blank
hard

Fill all three blanks to define an IAM role with a trust policy for EC2 and attach a policy.

AWS
resource "aws_iam_role" "example" {
  name = "example-role"

  assume_role_policy = jsonencode({
    "Version": "2012-10-17",
    "Statement": [
      {
        "Effect": "Allow",
        "Principal": {"Service": [1],
        "Action": [2]
      }
    ]
  })
}

resource "aws_iam_role_policy_attachment" "example_attach" {
  role       = aws_iam_role.example.name
  policy_arn = [3]
}
Drag options to blanks, or click blank then click option'
A"ec2.amazonaws.com"
B"sts:AssumeRole"
C"arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess"
D"lambda.amazonaws.com"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong service in Principal
Using incorrect action in trust policy
Attaching wrong or missing policy ARN

Practice

(1/5)
1. Why is defense in depth important in AWS cloud security?
easy
A. It only uses encryption without other security measures.
B. It relies on a single strong password to secure all resources.
C. It removes all security layers to improve performance.
D. It uses multiple layers to protect resources, so if one fails, others still protect.

Solution

  1. Step 1: Understand defense in depth concept

    Defense in depth means using several security layers to protect cloud resources.
  2. Step 2: Recognize the benefit of multiple layers

    If one layer fails, other layers still protect the data, increasing overall security.
  3. Final Answer:

    It uses multiple layers to protect resources, so if one fails, others still protect. -> Option D
  4. Quick Check:

    Multiple layers = safer protection [OK]
Hint: Multiple layers protect better than one [OK]
Common Mistakes:
  • Thinking one strong password is enough
  • Believing encryption alone is full protection
  • Ignoring the need for backup security layers
2. Which AWS service is NOT typically part of a defense in depth strategy?
easy
A. AWS Identity and Access Management (IAM)
B. AWS Key Management Service (KMS)
C. Amazon Simple Notification Service (SNS)
D. AWS Web Application Firewall (WAF)

Solution

  1. Step 1: Identify services used for security layers

    IAM controls access, KMS manages encryption keys, WAF protects web apps.
  2. Step 2: Recognize SNS purpose

    SNS is for messaging and notifications, not a security control layer.
  3. Final Answer:

    Amazon Simple Notification Service (SNS) -> Option C
  4. Quick Check:

    SNS is messaging, not security [OK]
Hint: SNS is for notifications, not security [OK]
Common Mistakes:
  • Confusing SNS with security services
  • Assuming all AWS services add security layers
  • Ignoring the role of IAM and WAF
3. Given this AWS setup: IAM roles restrict access, data is encrypted with KMS, and VPC security groups limit traffic. What happens if an attacker bypasses the security group?
medium
A. The attacker is blocked by IAM roles and encrypted data remains protected.
B. The attacker can access data without any other barriers.
C. The attacker can change encryption keys easily.
D. The attacker can disable KMS encryption remotely.

Solution

  1. Step 1: Analyze the layered security setup

    Security groups limit traffic, IAM controls access, KMS encrypts data.
  2. Step 2: Consider bypassing security group

    If security group is bypassed, IAM roles still restrict access and encryption protects data.
  3. Final Answer:

    The attacker is blocked by IAM roles and encrypted data remains protected. -> Option A
  4. Quick Check:

    Multiple layers block attacker even if one fails [OK]
Hint: Bypass one layer, others still protect [OK]
Common Mistakes:
  • Assuming bypassing one layer means full access
  • Thinking encryption keys can be changed easily
  • Believing KMS can be disabled remotely
4. You configured AWS WAF rules but still see unwanted traffic reaching your application. What is the most likely mistake?
medium
A. Not attaching the WAF to the correct resource like CloudFront or ALB.
B. Using IAM roles instead of WAF for traffic filtering.
C. Encrypting data with KMS before applying WAF rules.
D. Disabling CloudTrail logging.

Solution

  1. Step 1: Understand WAF role and attachment

    WAF must be attached to resources like CloudFront or Application Load Balancer to filter traffic.
  2. Step 2: Identify common misconfiguration

    If WAF is not attached properly, it won't filter traffic, allowing unwanted requests.
  3. Final Answer:

    Not attaching the WAF to the correct resource like CloudFront or ALB. -> Option A
  4. Quick Check:

    WAF must be attached to filter traffic [OK]
Hint: Attach WAF to resource to filter traffic [OK]
Common Mistakes:
  • Confusing IAM roles with traffic filtering
  • Thinking encryption affects WAF filtering
  • Ignoring resource attachment for WAF
5. You want to design a defense in depth strategy for an AWS web app. Which combination of layers provides the best protection?
hard
A. Encrypt data but allow open access to all resources for easy management.
B. Use IAM for access control, encrypt data with KMS, enable VPC security groups, and enable CloudTrail logging.
C. Rely on security groups alone to block all unwanted traffic.
D. Use only IAM roles and skip encryption and logging to reduce complexity.

Solution

  1. Step 1: Identify key defense layers for AWS security

    IAM controls who can access, KMS protects data, security groups limit network traffic, CloudTrail logs actions for auditing.
  2. Step 2: Evaluate options for best defense in depth

    Use IAM for access control, encrypt data with KMS, enable VPC security groups, and enable CloudTrail logging, which combines multiple layers, providing strong protection and monitoring.
  3. Final Answer:

    Use IAM for access control, encrypt data with KMS, enable VPC security groups, and enable CloudTrail logging. -> Option B
  4. Quick Check:

    Multiple layers + monitoring = best defense [OK]
Hint: Combine access, encryption, network, and logging layers [OK]
Common Mistakes:
  • Skipping encryption or logging
  • Relying on one security layer only
  • Allowing open access for convenience
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard