0
0
AWScloud~30 mins

AWS global infrastructure (regions, AZs) - Mini Project: Build & Apply

Choose your learning style9 modes available
AWS Global Infrastructure: Regions and Availability Zones
📖 Scenario: You are working as a cloud architect for a company that wants to understand how AWS organizes its data centers worldwide. AWS uses Regions and Availability Zones (AZs) to provide reliable and scalable cloud services.Regions are separate geographic areas, and each Region contains multiple AZs, which are isolated locations within that Region. This setup helps keep applications running even if one AZ has a problem.
🎯 Goal: You will create a simple data structure to represent AWS Regions and their Availability Zones. Then, you will add a configuration variable to select a specific Region. Next, you will write code to list all AZs in the selected Region. Finally, you will complete the setup by adding a summary count of AZs in that Region.
📋 What You'll Learn
Create a dictionary named aws_infrastructure with exactly these Regions and AZs:
us-east-1: ['us-east-1a', 'us-east-1b', 'us-east-1c']
eu-west-1: ['eu-west-1a', 'eu-west-1b']
ap-southeast-1: ['ap-southeast-1a', 'ap-southeast-1b', 'ap-southeast-1c']
Create a variable selected_region set to 'us-east-1'
Write a loop to create a list az_list containing all AZs in selected_region
Add a variable az_count that stores the number of AZs in selected_region
💡 Why This Matters
🌍 Real World
Understanding AWS Regions and AZs helps design cloud applications that are reliable and available even if one data center fails.
💼 Career
Cloud architects and engineers must know AWS global infrastructure to plan deployments and disaster recovery strategies.
Progress0 / 4 steps
1
Create AWS Regions and Availability Zones dictionary
Create a dictionary called aws_infrastructure with these exact entries: 'us-east-1' mapped to ['us-east-1a', 'us-east-1b', 'us-east-1c'], 'eu-west-1' mapped to ['eu-west-1a', 'eu-west-1b'], and 'ap-southeast-1' mapped to ['ap-southeast-1a', 'ap-southeast-1b', 'ap-southeast-1c'].
AWS
Need a hint?

Use curly braces {} to create a dictionary. Each Region is a key with a list of AZ strings as its value.

2
Select a Region to work with
Create a variable called selected_region and set it exactly to the string 'us-east-1'.
AWS
Need a hint?

Assign the string 'us-east-1' to the variable selected_region.

3
List all Availability Zones in the selected Region
Create a list called az_list that contains all Availability Zones from aws_infrastructure[selected_region] using a for loop with the variable az.
AWS
Need a hint?

Start with an empty list az_list. Use a for loop with az to add each AZ from the selected Region.

4
Count the number of Availability Zones in the selected Region
Create a variable called az_count and set it to the length of az_list using the len() function.
AWS
Need a hint?

Use len(az_list) to get the number of AZs and assign it to az_count.