MCQs Questions on Managing Infrastructure with CloudFormation | AWS CloudFormation Multiple Choice Questions

Explore AWS CloudFormation MCQ questions and answers designed to deepen your understanding of infrastructure management. Covering critical topics such as stack management (create, update, delete), stack drift detection, change sets, CloudFormation Designer, and stack policies and rollbacks, this set of questions is perfect for cloud professionals and certification aspirants.


Chapter 4: Managing Infrastructure with CloudFormation


1-10: Stack Management (Create, Update, Delete)
  1. What is the primary function of AWS CloudFormation?
    a) To deploy applications on EC2
    b) To automate the creation and management of resources
    c) To monitor application logs
    d) To perform data analytics
  2. What is the first step in creating a stack in CloudFormation?
    a) Define the stack’s resources using a template
    b) Configure IAM roles
    c) Set up CloudWatch alarms
    d) Assign a name to the stack
  3. How can you update an existing CloudFormation stack?
    a) Modify the stack template and update the stack
    b) Delete the stack and create a new one
    c) Edit the stack parameters directly
    d) Manually add resources to the stack
  4. What happens if an error occurs during a stack update?
    a) The stack is automatically rolled back to its previous state
    b) The stack update is skipped
    c) Only the new resources are updated
    d) The stack is deleted
  5. What must you define in a CloudFormation template to create resources?
    a) Parameters, resources, and outputs
    b) Only parameters
    c) Only resources
    d) Only outputs
  6. Which AWS service is often integrated with CloudFormation to automate the creation of resources?
    a) AWS Lambda
    b) AWS CodeDeploy
    c) AWS CloudTrail
    d) AWS Elastic Beanstalk
  7. Which AWS resource is used for organizing multiple CloudFormation stacks?
    a) CloudFormation StackSet
    b) Amazon RDS
    c) AWS Config
    d) Amazon EC2
  8. When deleting a stack, which resources are automatically deleted?
    a) Only the resources created by CloudFormation
    b) All AWS resources in the account
    c) Only S3 buckets
    d) Only EC2 instances
  9. What is the benefit of using CloudFormation StackSets?
    a) It allows managing CloudFormation stacks across multiple accounts and regions
    b) It enhances template validation
    c) It increases the speed of resource creation
    d) It automates the rollback of resources
  10. How does CloudFormation handle dependencies between resources during stack creation?
    a) It creates resources in a sequential order based on dependencies
    b) It creates resources in parallel, regardless of dependencies
    c) It ignores dependencies during resource creation
    d) It requires manual intervention

11-15: Stack Drift Detection and Change Sets
  1. What is the purpose of Stack Drift Detection in CloudFormation?
    a) To identify changes made to stack resources outside of CloudFormation
    b) To remove unused resources from the stack
    c) To check for billing anomalies in the stack
    d) To track deployment logs
  2. What is a Change Set in AWS CloudFormation?
    a) A set of updates to be applied to a stack
    b) A backup of the stack template
    c) A history of stack updates
    d) A report of resource usage
  3. How can Stack Drift Detection help with troubleshooting?
    a) By identifying configuration drift and differences between the stack’s expected and actual state
    b) By providing application logs
    c) By rolling back changes automatically
    d) By optimizing resource allocation
  4. How does a CloudFormation Change Set improve deployment safety?
    a) By showing what changes will be made before applying them
    b) By automatically applying changes to all resources
    c) By limiting stack creation to specific regions
    d) By reducing the number of resources
  5. How can you review the changes proposed by a Change Set?
    a) By reviewing the changes in the AWS Management Console or AWS CLI
    b) By contacting AWS support
    c) By using Amazon QuickSight
    d) By creating a new stack

16-20: AWS CloudFormation Designer
  1. What is AWS CloudFormation Designer used for?
    a) To visually design and modify CloudFormation templates
    b) To deploy stacks
    c) To analyze CloudFormation logs
    d) To configure IAM roles
  2. Which feature of AWS CloudFormation Designer allows you to create resource relationships?
    a) Visual diagram editor
    b) CloudFormation Template Builder
    c) Resource Summary Panel
    d) AWS Config Visualizer
  3. How does CloudFormation Designer help with template creation?
    a) By providing drag-and-drop functionality for resource creation
    b) By generating IAM roles automatically
    c) By checking template syntax errors in real-time
    d) By setting up CloudWatch metrics
  4. In CloudFormation Designer, what does the “Validate” button do?
    a) It checks for syntax errors in the CloudFormation template
    b) It starts the stack creation process
    c) It initiates the CloudFormation update
    d) It executes a drift detection
  5. Which file format does AWS CloudFormation Designer support for saving templates?
    a) JSON and YAML
    b) CSV and TSV
    c) XML and HTML
    d) TXT and PDF

21-25: Stack Policies and Rollbacks
  1. What is the purpose of a Stack Policy in AWS CloudFormation?
    a) To define which resources are protected from changes during stack updates
    b) To provide monitoring for the stack
    c) To define rollback settings
    d) To enable stack scaling
  2. When is a rollback triggered in CloudFormation?
    a) When an error occurs during stack creation or update
    b) When resources are deleted manually
    c) When the stack’s health is marked as “unhealthy”
    d) When a template is modified
  3. How does CloudFormation ensure that stack updates do not cause resource destruction?
    a) By using stack policies to prevent changes to certain resources
    b) By applying the updates to all resources without restriction
    c) By disabling all resource modifications
    d) By automatically scaling down resources
  4. What happens when a rollback occurs during a stack update?
    a) CloudFormation restores the stack to its previous state
    b) All resources are permanently deleted
    c) A new stack is created
    d) The update process is paused indefinitely
  5. Which resource type is most likely to require a stack policy for protection during updates?
    a) Amazon S3 buckets
    b) Amazon EC2 instances
    c) Elastic Load Balancers
    d) IAM roles

Answer Key

QnoAnswer (Option with Text)
1b) To automate the creation and management of resources
2a) Define the stack’s resources using a template
3a) Modify the stack template and update the stack
4a) The stack is automatically rolled back to its previous state
5a) Parameters, resources, and outputs
6a) AWS Lambda
7a) CloudFormation StackSet
8a) Only the resources created by CloudFormation
9a) It allows managing CloudFormation stacks across multiple accounts and regions
10a) It creates resources in a sequential order based on dependencies
11a) To identify changes made to stack resources outside of CloudFormation
12a) A set of updates to be applied to a stack
13a) By identifying configuration drift and differences between the stack’s expected and actual state
14a) By showing what changes will be made before applying them
15a) By reviewing the changes in the AWS Management Console or AWS CLI
16a) To visually design and modify CloudFormation templates
17a) Visual diagram editor
18a) By providing drag-and-drop functionality for resource creation
19a) It checks for syntax errors in the CloudFormation template
20a) JSON and YAML
21a) To define which resources are protected from changes during stack updates
22a) When an error occurs during stack creation or update
23a) By using stack policies to prevent changes to certain resources
24a) CloudFormation restores the stack to its previous state
25b) Amazon EC2 instances

Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

X
error: Content is protected !!
Scroll to Top