0
0
AWScloud~10 mins

Why managed databases matter in AWS - Test Your Understanding

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

Complete the code to create a managed database instance in AWS.

AWS
resource "aws_db_instance" "mydb" {
  allocated_storage = 20
  engine           = "mysql"
  instance_class   = "[1]"
  db_name          = "mydatabase"
  username         = "admin"
  password         = "password123"
  parameter_group_name = "default.mysql5.7"
}
Drag options to blanks, or click blank then click option'
Adb.m5.large
Bt2.micro
Cdb.t2.micro
Dm5.large
Attempts:
3 left
💡 Hint
Common Mistakes
Using instance types without the 'db.' prefix.
Choosing instance classes that don't exist in RDS.
2fill in blank
medium

Complete the code to enable automatic backups for the managed database.

AWS
resource "aws_db_instance" "mydb" {
  allocated_storage    = 20
  engine              = "mysql"
  instance_class      = "db.m5.large"
  db_name             = "mydatabase"
  username            = "admin"
  password            = "password123"
  backup_retention_period = [1]
}
Drag options to blanks, or click blank then click option'
A0
B30
C-1
D7
Attempts:
3 left
💡 Hint
Common Mistakes
Setting backup retention to 0 disables backups.
Using negative numbers is invalid.
3fill in blank
hard

Fix the error in the code to enable Multi-AZ deployment for high availability.

AWS
resource "aws_db_instance" "mydb" {
  allocated_storage    = 20
  engine              = "mysql"
  instance_class      = "db.m5.large"
  db_name             = "mydatabase"
  username            = "admin"
  password            = "password123"
  multi_az            = [1]
}
Drag options to blanks, or click blank then click option'
A"false"
B"true"
Ctrue
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes around boolean values causes errors.
Using numbers instead of booleans is invalid.
4fill in blank
hard

Fill both blanks to configure the database to be publicly accessible and set the storage type.

AWS
resource "aws_db_instance" "mydb" {
  allocated_storage    = 20
  engine              = "mysql"
  instance_class      = "db.m5.large"
  publicly_accessible = [1]
  storage_type        = "[2]"
  username            = "admin"
  password            = "password123"
}
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
Cgp2
Dstandard
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'false' for public access when external access is needed.
Choosing 'standard' storage which is slower.
5fill in blank
hard

Fill all three blanks to configure the database with encryption, backup window, and maintenance window.

AWS
resource "aws_db_instance" "mydb" {
  allocated_storage       = 20
  engine                 = "mysql"
  instance_class         = "db.m5.large"
  storage_encrypted      = [1]
  backup_window          = "[2]"
  maintenance_window     = "[3]"
  username               = "admin"
  password               = "password123"
}
Drag options to blanks, or click blank then click option'
Atrue
B03:00-04:00
Csun:05:00-sun:06:00
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using false for encryption when security is required.
Incorrect time format for windows causes errors.