In this blog, I will share some quick tips, including Q/A and useful links from Day 4 of AWS DevOps Professional covering Module 4: Automating Infrastructure With CloudFormation.
We also covered hands-on, lab 9, and Lab 10out of our 30+ extensive labs.
The previous week, In Day 3 session, we covered topics CI/CD, AWS CodeCommit, AWS CodePipeline, AWS CodeBulid, AWS CodeDeploy, and AWS CodeStar.
A week before, In Day 2 session, we introduced DevOps, DevOps on AWS, DevOps Lifecycle, Security Management, and IT Resources.
Two weeks before, In Day 1 session, we got an overview of Cloud Concepts, Cloud Service Models, Cloud Deployment Models, AWS Global Infrastructure, AWS Services, AWS DevOps Tools.
Infrastructure As Code
It is the process of provisioning and managing your cloud resources by writing a template file that is both human-readable and machine consumable. For Amazon Web Service cloud development, the built-in choice for infrastructure as code is AWS CloudFormation.
Q1. What are the benefits of Infrastructure As Code?
The benefits of Infrastructure as code are:
- Visibility: An infrastructure as a code template serves as an apparent reference of what resources are on your account and their settings.
- Scalability: Using infrastructure as code, you can write code once and then reuse it many times.
- Stability: You can break things if you accidentally changed the wrong setting or deleted the wrong resource in the web console. Infrastructure as code helps solve this, especially when combined with version control, such as Git.
- Security: Infrastructure as code gives you a unified template for how to deploy your architecture. If you create one well-secured architecture, you can reuse it multiple times and know that each deployed version follows the same settings.
- Transactional: CloudFormation not only creates resources on your AWS account but also waits for them to stabilize while they start. It verifies that provisioning was successful, and if there is a failure, it can gracefully roll the infrastructure back to a last known good state.
AWS CloudFormation
AWS CloudFormation is an AWS service that helps the user provision and configuring resources via declarative templates to save time on managing resources and focus only on the application running on AWS.
Read More: AWS CloudFormation.
Q2. What is CloudFormation Template?
Template in AWS CloudFormation is the formatted text files represented in JSON or YAML, which describes your AWS Infrastructure.
Q3. What are the Major Elements of AWS CloudFormation Template?
A3. The Major elements are:
Q4. Explain the working of CloudFormation?
A4. AWS CloudFormation can perform the actions only if the user has permission to do.
CloudFormation Stack
Stack is a collection of Amazon Web Service resources that are managed as a whole single unit. The stack’s CloudFormation template defines all the AWS resources in a stack. A stack can include all the resources required to run a web application, such as a web server, a database, and networking rules.
Q5. What is the difference between stack and template in CloudFormation?
A5. When you use AWS CloudFormation, you work with templates and stacks. You create templates to describe your AWS resources and their properties. Whenever you create a stack, CloudFormation provisions the resources that are described in your template.
Q6. What are Nested CloudFormation Stacks?
A6. Nested stacks are stacks created as part of other stacks. You create a nested stack within another stack by using the AWS::CloudFormation::Stack resource. As your infrastructure grows, common patterns can emerge in which you declare the same components in multiple templates.
CloudFormation Designer
AWS CloudFormation Designer (Designer) is a graphic tool for creating, viewing, and modifying AWS CloudFormation templates. Easily create the template using a drag-and-drop interface, and then edit their details using the integrated JSON and YAML editor. It Designer helps to quickly see the interrelationship between a template’s resources and easily modify templates.
Q7. What are the benefits of using CloudFormation Designer?
A7. The benefits are:
- Allows you to see the graphical representations of the resources in your template, simplifies template authoring, and simplifies template editing.
- Graphical representation of the resources included in a template and how they relate to each other provides.
- The designer defines the information about your resources in template metadata, such as their size and relative position. When you open a template, CloudFormation Designer automatically adds this metadata to preserve the current layout when you save your template. When you reopen a template, it displays the diagram exactly as it appeared when you last saved the template.
Q8. What is Resource Deletion Policy?
A8. It can be defined as:
- Deletion Policy is used to preserve the resources when a stack is being deleted.
- During Stack update operations, deletion policy is applicable on resources if you remove the resources from the template and later update the stack.
- Deletion policy does not apply to the resources if you update the properties of those resources during stack updates.
- If the resources are not associated with Deletion Policy, then CloudFormation can delete the resources by default while deleting the stack.
Q9. What are the CloudFormation Best Practices?
A9. The best practices are:-
Quiz Time (Sample Exam Questions)!
Our AWS DevOps Professional training program covers 250+ sample exam questions to help you prepare for the certification DOP-C01.
Check out one of the questions and see if you can crack this…
Ques. Which AWS service allows users to provision infrastructure as code?
A. AWS CloudFormation
B. AWS CodeCommit
C. AWS CodeBuild
D. AWS Codepipeline
Comment your answer.
The right answer will be revealed in next week’s blog.
Here is the answer to the question shared last week (Scroll down at the end of this post for the question).
Ques: Your organization is trying to store its website using git, which will then be deployed to your servers. Which AWS service would be suitable for storing the code?
A. AWS CodeCommit
B. AWS CodePipeline
C. AWS CodeDeploy
D. GitHub
Correct Answer: A
Explanation:- AWS CodeCommit is AWS’s fully-managed source control service that hosts Git-based repositories.
Feedback
We always work on improving and being the best version of ourselves from the previous session hence constantly ask feedback from our attendees.
Here’s the feedback that we received from our trainees who had attended the session…
Related Links/References:
- AWS Certified DevOps Engineer Professional
- Overview of Amazon Web Services & Concepts
- How to create a free tier account in AWS
- Top 50 AWS Interview Questions
- AWS Networking Fundamentals: Introduction and Basics
- AWS RDS: Introduction and Tutorial
- AWS Certified Solutions Architect Associate SAA-CO2
- AWS Management Console Walkthrough
Next Task For You
Begin your journey towards becoming an AWS Certified DevOps Engineer Professional by checking our FREE CLASS. Click on the below image to register for our FREE CLASS.
The post AWS Certified DevOps Professional | Day 4 Review and Q/A: Automating Infrastructure With CloudFormation appeared first on Cloud Training Program.