{"id":42704,"date":"2024-01-20T07:10:42","date_gmt":"2024-01-20T07:10:42","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=42704"},"modified":"2024-01-20T07:10:45","modified_gmt":"2024-01-20T07:10:45","slug":"what-is-cloudformation-and-use-cases-of-cloudformation","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/what-is-cloudformation-and-use-cases-of-cloudformation\/","title":{"rendered":"What is CloudFormation and use cases of CloudFormation?"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What is CloudFormation?<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-317-1024x512.png\" alt=\"\" class=\"wp-image-42709\" style=\"width:628px;height:auto\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-317-1024x512.png 1024w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-317-300x150.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-317-768x384.png 768w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-317.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong><em>What is CloudFormation<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p><strong>AWS CloudFormation<\/strong> is an Infrastructure as Code (IaC) service provided by Amazon Web Services (AWS). It enables users to define and provision AWS infrastructure resources in a predictable and scalable manner. CloudFormation uses a declarative template format, written in JSON or YAML, to describe the resources and their dependencies. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Top 10 use cases of CloudFormation?<\/h2>\n\n\n\n<p>Here are ten common use cases for AWS CloudFormation:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Infrastructure Provisioning:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Define and provision AWS resources such as EC2 instances, Amazon RDS databases, S3 buckets, and more using CloudFormation templates.<\/li>\n\n\n\n<li>Automate the creation of infrastructure to ensure consistency and reduce manual errors.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Application Stacks:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Create application stacks that consist of multiple AWS resources, ensuring that all components are provisioned together as a single unit.<\/li>\n\n\n\n<li>Manage the complete lifecycle of an application stack, including creation, updating, and deletion.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Environment Replication:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Replicate development, testing, and production environments consistently by using CloudFormation templates to define the infrastructure for each environment.<\/li>\n\n\n\n<li>Ensure that the same configuration is applied across different environments.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Scalable Architectures:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Design and implement scalable architectures by using CloudFormation to define Auto Scaling Groups, Elastic Load Balancers, and other components that can automatically scale based on demand.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>High Availability Configurations:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Implement high availability and fault-tolerant configurations by defining resources in multiple Availability Zones using CloudFormation templates.<\/li>\n\n\n\n<li>Create redundancy and improve the reliability of applications.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Network Infrastructure:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Define and provision network infrastructure such as Virtual Private Clouds (VPCs), subnets, route tables, and security groups.<\/li>\n\n\n\n<li>Enable secure and isolated network configurations for applications.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Custom Resource Creation:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Extend CloudFormation capabilities by creating custom resources using AWS Lambda functions. This allows for the integration of third-party services or resources not directly supported by CloudFormation.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Rollback and Drift Detection:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Automatically roll back changes if there are errors during resource creation or updates, ensuring that the stack remains in a consistent state.<\/li>\n\n\n\n<li>Detect and identify any configuration drift between the desired and actual stack configurations.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Compliance as Code:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Enforce security and compliance policies by defining infrastructure in a secure and compliant manner within CloudFormation templates.<\/li>\n\n\n\n<li>Implement security best practices consistently across environments.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>DevOps Automation:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Integrate CloudFormation into DevOps pipelines for continuous integration and continuous delivery (CI\/CD).<\/li>\n\n\n\n<li>Automate the deployment and management of infrastructure as part of the software delivery lifecycle.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Resource Tagging:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Apply consistent resource tagging across AWS resources created using CloudFormation, facilitating resource management, cost allocation, and organization.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Stack Update and Rollback:<\/strong>\n<ul class=\"wp-block-list\">\n<li>Efficiently update existing stacks by modifying CloudFormation templates and applying changes.<\/li>\n\n\n\n<li>Automatically roll back to the previous stack state in case of errors during updates.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>CloudFormation simplifies the process of managing and scaling AWS infrastructure by providing a standardized and version-controlled approach. It&#8217;s a powerful tool for automating infrastructure deployment and management in a reliable and repeatable manner.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What are the feature of CloudFormation?<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"386\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-321.png\" alt=\"\" class=\"wp-image-42713\" style=\"width:684px;height:auto\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-321.png 750w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-321-300x154.png 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><figcaption class=\"wp-element-caption\"><strong><em>feature of CloudFormation<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p>AWS CloudFormation offers a comprehensive set of features designed to simplify infrastructure provisioning and management. Here are some key highlights:<\/p>\n\n\n\n<p><strong>1. Infrastructure as Code (IaC):<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Templates:<\/strong> You define your desired infrastructure using YAML or JSON templates, specifying resources and their configurations. This promotes consistency, repeatability, and version control.<\/li>\n\n\n\n<li><strong>Stacks:<\/strong> Groups of related resources treated as a single unit for creation, update, and deletion. Allows easy rollbacks and environment management.<\/li>\n<\/ul>\n\n\n\n<p><strong>2. Automation and Orchestration:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Automated provisioning:<\/strong> Define dependencies between resources, enabling their creation in order with proper configuration. Avoids manual steps and reduces errors.<\/li>\n\n\n\n<li><strong>Change sets:<\/strong> Preview resource changes before deploying them, facilitating controlled updates and rollbacks if needed.<\/li>\n\n\n\n<li><strong>Conditional logic and loops:<\/strong> Use control flow mechanisms within templates to automate complex deployments based on specific conditions.<\/li>\n<\/ul>\n\n\n\n<p><strong>3. Resource Management:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Support for numerous AWS services:<\/strong> Create, update, and delete resources from various AWS services like EC2 instances, S3 buckets, DynamoDB tables, etc.<\/li>\n\n\n\n<li><strong>Custom resources:<\/strong> Extend CloudFormation to manage resources from other providers or your own applications through custom resource providers.<\/li>\n\n\n\n<li><strong>Stack sets:<\/strong> Deploy and manage collections of stacks across multiple accounts and regions, streamlining multi-environment deployments.<\/li>\n<\/ul>\n\n\n\n<p><strong>4. Security and Governance:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>IAM integration:<\/strong> Use IAM roles to control access to CloudFormation actions and resources, ensuring proper authorization and security.<\/li>\n\n\n\n<li><strong>Stack policy and resource policies:<\/strong> Define granular access controls for stacks and individual resources to maintain security and compliance.<\/li>\n\n\n\n<li><strong>Rollbacks and rollback triggers:<\/strong> Roll back failed deployments or trigger specific actions based on alarms during stack creation or updates.<\/li>\n<\/ul>\n\n\n\n<p><strong>5. Integration and Scalability:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>CLI and SDKs:<\/strong> Use the CloudFormation CLI or SDKs to automate deployments and manage stacks programmatically.<\/li>\n\n\n\n<li><strong>CloudFormation Registry:<\/strong> Find and share public templates for common infrastructure patterns and services.<\/li>\n\n\n\n<li><strong>Third-party integrations:<\/strong> Extend CloudFormation beyond AWS services with integrations for various tools and platforms.<\/li>\n<\/ul>\n\n\n\n<p>These are just some of the key features of AWS CloudFormation. Its flexibility, automation capabilities, and focus on security make it a powerful tool for managing and scaling your infrastructure on the AWS platform.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How CloudFormation works and Architecture?<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"844\" height=\"448\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-319.png\" alt=\"\" class=\"wp-image-42711\" style=\"width:644px;height:auto\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-319.png 844w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-319-300x159.png 300w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-319-768x408.png 768w\" sizes=\"auto, (max-width: 844px) 100vw, 844px\" \/><figcaption class=\"wp-element-caption\"><strong><em>CloudFormation works and Architecture<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p>CloudFormation provides a way to define and manage your AWS infrastructure through templates and scripts. Here&#8217;s a breakdown of its workings and architecture:<\/p>\n\n\n\n<p><strong>1. Templates:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You define your desired infrastructure using YAML or JSON templates. These templates specify resources like EC2 instances, S3 buckets, IAM roles, etc., along with their configurations and dependencies.<\/li>\n\n\n\n<li>Think of them as blueprints for your infrastructure.<\/li>\n<\/ul>\n\n\n\n<p><strong>2. Stacks:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A collection of related resources is called a stack. It&#8217;s treated as a single unit for creation, update, and deletion. This allows for easier management and rollbacks.<\/li>\n\n\n\n<li>Each template can create one stack, and you can have multiple stacks for different environments or components.<\/li>\n<\/ul>\n\n\n\n<p><strong>3. Deployment Process:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When you create a stack, CloudFormation reads the template and performs the following steps:\n<ul class=\"wp-block-list\">\n<li><strong>Validates the template:<\/strong> Checks for syntax errors and resource compatibility.<\/li>\n\n\n\n<li><strong>Estimates the cost:<\/strong> Provides an upfront estimate of the resources used by the stack.<\/li>\n\n\n\n<li><strong>Creates the resources:<\/strong> Calls the relevant AWS APIs to create each resource specified in the template, following the defined dependencies.<\/li>\n\n\n\n<li><strong>Monitors the creation process:<\/strong> Tracks the progress and reports any errors.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><strong>4. Architecture:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CloudFormation has a layered architecture:\n<ul class=\"wp-block-list\">\n<li><strong>Client:<\/strong> This can be the AWS Management Console, CLI, or SDKs.<\/li>\n\n\n\n<li><strong>CloudFormation service:<\/strong> This service manages templates, stacks, and orchestrates resource creation with AWS APIs.<\/li>\n\n\n\n<li><strong>AWS services:<\/strong> These are the individual services like EC2, S3, and others that provide the actual infrastructure components.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><strong>5. Key Features:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Infrastructure as Code (IaC):<\/strong> Allows for consistent and repeatable deployments.<\/li>\n\n\n\n<li><strong>Automation and Orchestration:<\/strong> Automates resource creation and updates.<\/li>\n\n\n\n<li><strong>Resource Management:<\/strong> Provides fine-grained control over individual resources and stacks.<\/li>\n\n\n\n<li><strong>Security and Governance:<\/strong> Offers IAM integration and resource policies for access control.<\/li>\n\n\n\n<li><strong>Integration and Scalability:<\/strong> Integrates with various tools and allows for programmatic management.<\/li>\n<\/ul>\n\n\n\n<p><strong>Benefits:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Reduced complexity:<\/strong> Simplifies infrastructure management by eliminating manual configuration.<\/li>\n\n\n\n<li><strong>Increased efficiency:<\/strong> Automates tasks and reduces deployment time.<\/li>\n\n\n\n<li><strong>Improved consistency:<\/strong> Ensures consistent deployments across environments.<\/li>\n\n\n\n<li><strong>Enhanced security:<\/strong> Provides granular control and auditability.<\/li>\n\n\n\n<li><strong>Scalability:<\/strong> Makes scaling and managing large infrastructures easier.<\/li>\n<\/ul>\n\n\n\n<p>Overall, CloudFormation provides a powerful and flexible way to manage your AWS infrastructure. Its template-based approach and automation capabilities make it a valuable tool for developers and DevOps engineers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Install CloudFormation it?<\/h2>\n\n\n\n<p><strong>CloudFormation is a fully managed service within AWS, so you don&#8217;t need to install any software to use it.<\/strong> It&#8217;s available in all AWS regions and can be accessed through various methods:<\/p>\n\n\n\n<p><strong>1. AWS Management Console:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in to the AWS Management Console and navigate to the CloudFormation service.<\/li>\n\n\n\n<li>You can create, update, and manage stacks directly from the console&#8217;s user interface.<\/li>\n<\/ul>\n\n\n\n<p><strong>2. AWS Command Line Interface (CLI):<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install and configure the AWS CLI on your local machine.<\/li>\n\n\n\n<li>Use <code class=\"\">aws cloudformation<\/code> commands to interact with CloudFormation programmatically.<\/li>\n<\/ul>\n\n\n\n<p><strong>3. AWS Software Development Kits (SDKs):<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Download and install the AWS SDK for your preferred programming language (Python, Java, JavaScript, etc.).<\/li>\n\n\n\n<li>Use the SDK&#8217;s CloudFormation API to manage stacks within your applications or scripts.<\/li>\n<\/ul>\n\n\n\n<p><strong>4. CloudFormation Designer (Optional):<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install the CloudFormation Designer (a plugin for Visual Studio Code or as a standalone application) to visually create and edit templates.<\/li>\n<\/ul>\n\n\n\n<p><strong>Setting Up Permissions:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure your IAM user or role has the necessary permissions to create and manage CloudFormation stacks.\n<ul class=\"wp-block-list\">\n<li>The <code class=\"\">AWSCloudFormationFullAccess<\/code> policy provides full access, but you can create more granular policies as needed.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><strong>No Additional Installation Required:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CloudFormation doesn&#8217;t require any local software installation beyond these tools.<\/li>\n\n\n\n<li>It&#8217;s a managed service, so AWS handles the underlying infrastructure and maintenance.<\/li>\n<\/ul>\n\n\n\n<p><strong>Key Points:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Access CloudFormation through the console, CLI, SDKs, or Designer.<\/li>\n\n\n\n<li>Manage stacks directly from the console or programmatically with the CLI\/SDKs.<\/li>\n\n\n\n<li>Ensure appropriate IAM permissions for using CloudFormation.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Basic Tutorials of CloudFormation: Getting Started<\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"680\" height=\"423\" src=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-320.png\" alt=\"\" class=\"wp-image-42712\" style=\"width:645px;height:auto\" srcset=\"https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-320.png 680w, https:\/\/www.devopsschool.com\/blog\/wp-content\/uploads\/2024\/01\/image-320-300x187.png 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><figcaption class=\"wp-element-caption\"><strong><em>Basic Tutorials of CloudFormation<\/em><\/strong><\/figcaption><\/figure>\n<\/div>\n\n\n<p>AWS CloudFormation lets you provision and manage your AWS resources in a templatized and automated way. Here&#8217;s a step-by-step guide to your first CloudFormation stack, creating a basic web server:<\/p>\n\n\n\n<p><strong>1. Understand the Template:<\/strong><\/p>\n\n\n\n<p>CloudFormation uses JSON or YAML templates defining the resources you want to create. Here&#8217;s a basic example for a web server:<\/p>\n\n\n\n<p>JSON<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\">AWSTemplateFormatVersion: <span class=\"hljs-string\">'2010-09-09'<\/span>\nResources:\n  MyInstance:\n    Type: AWS::EC2::Instance\n    Properties:\n      ImageId: ami<span class=\"hljs-number\">-09<\/span>df212956a297c2d\n      InstanceType: t2.micro\n      Tags:\n        Name: MyWebServer\n\n  MySecurityGroup:\n    Type: AWS::EC2::SecurityGroup\n    Properties:\n      GroupDescription: Allow HTTP <span class=\"hljs-keyword\">for<\/span> my web server\n      SecurityGroupIngress:\n        - CidrBlock: <span class=\"hljs-number\">0.0<\/span><span class=\"hljs-number\">.0<\/span><span class=\"hljs-number\">.0<\/span>\/<span class=\"hljs-number\">0<\/span>\n          FromPort: <span class=\"hljs-number\">80<\/span>\n          ToPort: <span class=\"hljs-number\">80<\/span>\n          Protocol: tcp\n\n  MyWebServer:\n    Type: AWS::EC2::Instance\n    Properties:\n      ImageId: ami<span class=\"hljs-number\">-00<\/span>fc52b0c3632df53\n      InstanceType: t2.micro\n      SecurityGroupIds:\n        - !Ref MySecurityGroup\n      UserData:\n        Fn::Base64: |\n          <span class=\"hljs-comment\">#!\/bin\/bash<\/span>\n          yum update -y\n          yum install httpd -y\n          systemctl start httpd\n          systemctl enable httpd\n\nOutputs:\n  PublicIP:\n    Value: !GetAtt MyInstance.PublicIp\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><strong>Explanation:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Version:<\/strong> Specifies the CloudFormation template version.<\/li>\n\n\n\n<li><strong>Resources:<\/strong> Defines the resources you want to create:\n<ul class=\"wp-block-list\">\n<li><strong>MyInstance:<\/strong> An EC2 instance running the web server.<\/li>\n\n\n\n<li><strong>MySecurityGroup:<\/strong> Allows inbound HTTP traffic on port 80.<\/li>\n\n\n\n<li><strong>MyWebServer:<\/strong> Another EC2 instance with the security group and user data to install and run Apache.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Outputs:<\/strong> Provides a reference to the instance&#8217;s public IP for accessing the web server.<\/li>\n<\/ul>\n\n\n\n<p><strong>2. Create the Stack:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to the CloudFormation console and click &#8220;Create Stack.&#8221;<\/li>\n\n\n\n<li>Select &#8220;With new resources (standard)&#8221; and &#8220;Upload a template file.&#8221;<\/li>\n\n\n\n<li>Upload your JSON\/YAML file and click &#8220;Next.&#8221;<\/li>\n\n\n\n<li>Give your stack a name and configure any optional parameters.<\/li>\n\n\n\n<li>Review and confirm the changes, then click &#8220;Create.&#8221;<\/li>\n<\/ul>\n\n\n\n<p><strong>3. Monitor and Access the Stack:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The console will show the stack being created and its status.<\/li>\n\n\n\n<li>Once creation is complete, you can see the Public IP output value under &#8220;Outputs.&#8221;<\/li>\n\n\n\n<li>Open the Public IP in your web browser to access the web server!<\/li>\n<\/ul>\n\n\n\n<p><strong>4. (Optional) Cleanup:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To avoid charges, delete the stack by selecting it and clicking &#8220;Delete.&#8221;<\/li>\n<\/ul>\n\n\n\n<p><strong>Bonus Tips:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use parameter values instead of hard-coded references for flexibility.<\/li>\n\n\n\n<li>Add environment variables to the user data for configuration.<\/li>\n\n\n\n<li>Explore CloudFormation documentation for more advanced features like templates, conditions, and functions.<\/li>\n<\/ul>\n\n\n\n<p>This basic tutorial gives you a taste of CloudFormation&#8217;s power. Remember, this is just the beginning, and you can create complex multi-tier applications with it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is CloudFormation? AWS CloudFormation is an Infrastructure as Code (IaC) service provided by Amazon Web Services (AWS). It enables users to define and provision AWS infrastructure&#8230; <\/p>\n","protected":false},"author":41,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[2],"tags":[],"class_list":["post-42704","post","type-post","status-publish","format-standard","hentry","category-uncategorised"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/42704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=42704"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/42704\/revisions"}],"predecessor-version":[{"id":42714,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/42704\/revisions\/42714"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=42704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=42704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=42704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}