📖 Scenario: You are setting up a cloud database service using Amazon RDS. Amazon RDS supports several database engines. You want to create a list of these supported engines and then filter them based on your project needs.
🎯 Goal: Create a list of supported RDS engines, add a filter configuration, select only the engines that are open source, and finally prepare the list for deployment.
📋 What You'll Learn
Create a list variable named rds_engines with exact engine names and their open source status.
Add a configuration variable named open_source_only set to True.
Use a list comprehension to create a new list named filtered_engines containing only open source engines from rds_engines.
Add a final variable named deployment_engines that holds the filtered_engines list.
💡 Why This Matters
🌍 Real World
Cloud architects often need to select database engines supported by cloud services like Amazon RDS. Filtering engines by license type helps in compliance and cost planning.
💼 Career
Understanding how to manage and filter cloud infrastructure options is essential for cloud engineers and architects when designing scalable and compliant systems.
Progress0 / 4 steps
1
Create the initial list of RDS engines
Create a list called rds_engines with these exact dictionaries: {'name': 'MySQL', 'open_source': True}, {'name': 'PostgreSQL', 'open_source': True}, {'name': 'Oracle', 'open_source': False}, {'name': 'SQL Server', 'open_source': False}, {'name': 'MariaDB', 'open_source': True}.
AWS
Hint
Use a list of dictionaries with keys 'name' and 'open_source'.
2
Add a configuration variable for filtering
Add a variable called open_source_only and set it to True.
AWS
Hint
Just assign True to the variable named open_source_only.
3
Filter the list for open source engines
Use a list comprehension to create a list called filtered_engines that includes only the engines from rds_engines where the 'open_source' key is True.
AWS
Hint
Use a list comprehension with a condition checking engine['open_source'].
4
Prepare the final deployment list
Create a variable called deployment_engines and assign it the value of filtered_engines.
AWS
Hint
Just assign filtered_engines to deployment_engines.
Practice
(1/5)
1. Which of the following database engines is supported by AWS RDS?
easy
A. MySQL
B. MongoDB
C. Cassandra
D. Redis
Solution
Step 1: Recall AWS RDS supported engines
AWS RDS supports popular relational database engines like MySQL, PostgreSQL, Oracle, SQL Server, and Aurora.
Step 2: Identify which option matches supported engines
Among the options, only MySQL is a supported RDS engine. MongoDB, Cassandra, and Redis are not supported by RDS but by other AWS services.
Final Answer:
MySQL -> Option A
Quick Check:
RDS supports MySQL = A [OK]
Hint: Remember RDS supports relational engines like MySQL, not NoSQL [OK]
Common Mistakes:
Confusing NoSQL databases as RDS engines
Assuming Redis is supported by RDS
Thinking Cassandra is supported by RDS
2. Which of the following is the correct way to specify the engine when creating an RDS instance using AWS CLI?
easy
A. --engine mongodb
B. --engine mysql
C. --engine redis
D. --engine cassandra
Solution
Step 1: Understand AWS CLI engine parameter
The AWS CLI uses the parameter --engine to specify the database engine when creating an RDS instance.
Step 2: Identify valid engine names
Valid engine names include mysql, postgres, oracle, sqlserver, aurora. MongoDB, Redis, and Cassandra are not valid for RDS engine parameter.
Final Answer:
--engine mysql -> Option B
Quick Check:
Correct engine name for MySQL is mysql [OK]
Hint: Use lowercase engine names like mysql, not unsupported ones [OK]
Common Mistakes:
Using unsupported engines like mongodb or redis
Capitalizing engine names incorrectly
Confusing engine parameter with instance type
3. Given the following AWS CLI command to create an RDS instance: