0
0
AWScloud~30 mins

Resources section in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
AWS CloudFormation Resources Section
📖 Scenario: You are setting up a simple AWS CloudFormation template to create infrastructure automatically. This template will define resources like an S3 bucket and an EC2 instance.
🎯 Goal: Build the Resources section of a CloudFormation template with two resources: an S3 bucket named MyBucket and an EC2 instance named MyInstance.
📋 What You'll Learn
Create a CloudFormation template dictionary named template with a Resources key.
Add an S3 bucket resource with logical ID MyBucket and type AWS::S3::Bucket.
Add an EC2 instance resource with logical ID MyInstance and type AWS::EC2::Instance.
Set the EC2 instance property InstanceType to t2.micro.
💡 Why This Matters
🌍 Real World
CloudFormation templates automate AWS infrastructure setup, saving time and reducing errors.
💼 Career
Understanding how to define resources in CloudFormation is essential for cloud engineers and DevOps professionals managing AWS environments.
Progress0 / 4 steps
1
Create the initial CloudFormation template dictionary
Create a dictionary called template with an empty Resources dictionary inside it.
AWS
Need a hint?

Start by creating a dictionary named template with a key Resources set to an empty dictionary.

2
Add the S3 bucket resource
Add a resource to template["Resources"] with the key MyBucket. Set its Type to AWS::S3::Bucket.
AWS
Need a hint?

Inside the Resources dictionary, add a key MyBucket with a dictionary value that has a Type key set to AWS::S3::Bucket.

3
Add the EC2 instance resource with properties
Add a resource to template["Resources"] with the key MyInstance. Set its Type to AWS::EC2::Instance and add a Properties dictionary with InstanceType set to t2.micro.
AWS
Need a hint?

Add a new key MyInstance in Resources with the specified type and properties.

4
Complete the CloudFormation template
Ensure the template dictionary includes both MyBucket and MyInstance resources correctly structured under Resources.
AWS
Need a hint?

Review the entire template dictionary to confirm both resources are present and correctly defined.