Project of deploying simple cloud infrastructure as code with Aws Cloudformation.
Tags: aws, development, cloud, coding
Published: 2024-06-11 10:39:08

**Project objective:**

- To deploy a basic cloud infrastructure as a code on Aws based on specification defined in the Cloudformation template. 

- This infrastructure will be provisioned automatically, hence reduced manual intervention and ensuring consistency across deployment process.

**What is AWS CloudFormation?**
AWS cloudformation helps companies/developers to easily define and manage infrastructure as a code by simplifying the process of provisioning and managing AWS resources in an automated matter.

**Instructions Steps of provisioning resources**

1. After logging into your Aws account, on **management console**, search for **_CloudFormation_** into the **search bar** at the top-left corner.
• Click on CloudFormation to open CloudFormation dashboard.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/svcbgiufo5vyl7zohgkf.png)

2. Click on **create stack** button to choose prerequisite prepare template options.
• Under **prepare template**, choose an **_existing template_**.
• Under **specify template**, choose _**upload a template file**_.
• Under an **upload file** click on choose **_file to upload_** from your local pc file.
• At the bottom click on **next **button.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/914pngylqhoh1y26qwvp.png)

3. Under provide a **stack name**, enter your **stack name.
**• Under **parameter **leave the default details as they already provisioned based resources in template.
• At the bottom click **next** button.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pseb5nqgemqqabu828zu.png)


4. Under **configure** options step, leave everything by **default **and click **next** button at the bottom.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/26l1hr3wa2jaya265bni.png)

5. Under **review **and **create **step, at the bottom click **create **to initiate stack creation.
6. On the **Event** button, wait for all resources to be created by changing the **status **from **create_in_progess **to **create_ompleste**.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/taj2x1y35ywyjfx8r4rm.png)


• You refresh after 50 seconds by clicking on **refresh **button.
7. Click on resource button to validate all resources you specified in template are created.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9q376qn900vg1u5qvcr7.png)

8. To validate **EC2** is provisioned, search it to see if it’s **running **and **checked**.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ciud1lr5aijmdipbx6j7.png)

• Do so to validate **VPC**, **security group **and **subnet**.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p037hkpn0ganimzcg9wv.png)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9dpj24clglhmsfe1hv10.png)



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w8oyb6tj750ypjidq6pt.png)


**conclusion**

As a group of seven people there were some challenge we face in creation of template to provision the specified infrastructure in the template.

We were able to provision the required resources of this project of our Aws restart Aws certified cloud practitioner.

As group, we learn the important of CloudFormation as service in amazon web service, it help in automation of resources for Aws customers instead of manual provisioning resources which will decrease global reach and agility as benefits of Aws for customers who to deploy their infrastructure in the Aws cloud.