0% found this document useful (0 votes)
17 views

Module 5

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Module 5

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Cloud Automation Tools and

Applications -Introduction

Course Code-CCA2006

Subject: Cloud Automation Tools and Applications Subject Code: CCA3001


Module-5
• Load Balancing and Auto scaling in Cloud
Introduction to AWS CloudFormation, AWS CloudFormation
Features and Components, Working of AWS CloudFormation,
setting up AWS CloudFormation, building a Pipeline for Test
and Production Stacks, AWS CloudFormation Artefacts,
Parameter Override Functions with Code Pipeline, Using AWS
CLI

2
AWS Cloud Formation
• AWS Cloud Formation is a service that helps you model and set up
your AWS resources so that you can spend less time managing those
resources and more time focusing on your applications that run in
AWS.

•You create a template that describes all the AWS resources that you
want (like Amazon EC2 instances or Amazon RDS DB instances),
and CloudFormation takes care of provisioning and configuring
those resources for you.

•CloudFormation can help in following points


•Simplify infrastructure management
•Quickly replicate your infrastructure
•Easily control and track changes to your infrastructure
3
AWS Cloud Formation Template
• A CloudFormation template is a JSON or YAML formatted text
file.

•You can save these files with any extension, such as .json, .yaml,
.template, or .txt.

•CloudFormation uses these templates as blueprints for building your


AWS resources.

•For example, in a template, you can describe an Amazon EC2 instance,


such as the instance type, the AMI ID, key pair name etc.

4
AWS CloudFormation Features and Components

Template:
A CloudFormation template is a JSON or YAML-formatted text file that
describes the set of AWS resources and their configurations. The template
serves as the blueprint for your infrastructure.
Stack:
A stack is a collection of AWS resources created and managed as a single
unit. When you use CloudFormation to deploy a template, it creates a
stack. Stacks can be easily managed as a single entity, allowing you to
create, update, or delete entire environments.
Resource:
Resources are the individual AWS components defined in the
CloudFormation template. Examples include EC2 instances, S3 buckets,
RDS databases, and more. Each resource is declared with its type and
properties in the template.

5
AWS CloudFormation Features and Components
Stack Set:
For managing stacks across multiple accounts and regions,
CloudFormation provides a feature called Stack Sets. This allows you to
create, update, or delete stacks across multiple AWS accounts and regions
with a single CloudFormation template.
Change Sets:
Before making changes to a stack, CloudFormation allows you to preview
the changes using a feature called Change Sets. This helps you understand
the impact of changes before they are applied, reducing the risk of
unintended modifications.
Parameters:
Parameters are inputs that allow you to customize your CloudFormation
template. They enable you to provide values at runtime, making your
templates more flexible and reusable across different environments.

6
AWS CloudFormation Features and Components
Rollback:
CloudFormation has a rollback feature that automatically reverses changes to a
stack if any part of the update fails. This helps maintain consistency and avoid
leaving the stack in an inconsistent state.

•AWS CloudFormation simplifies and streamlines the process of managing


AWS resources by allowing you to define, deploy, and update your
infrastructure in a declarative and automated manner. This helps improve
consistency, reduce manual errors, and enhance overall infrastructure
management efficiency.

7
AWS Pipeline Formation

8
AWS Pipeline Formation steps
When setting up a pipeline for test and production stacks that involve
S3 buckets, you'll want to automate the creation and management of
these buckets using AWS CloudFormation. Below is a simple
example that outlines the key steps:

1. CloudFormation Templates:
Create separate CloudFormation templates for your test and production
environments. Include the S3 bucket resource definitions within these
templates.
Resources:
TestS3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: MyTestBucket
AccessControl: Private
9
AWS Pipeline Formation steps
2. Pipeline Configuration:
Configure your CI/CD pipeline using AWS CodePipeline. This
example assumes you are using CodeCommit for source control and
CodeBuild for the build stage. Modify the pipeline definition to suit
your needs.

3. Execute the Pipeline:


Commit your CloudFormation templates and pipeline configuration
to the CodeCommit repository. AWS CodePipeline will
automatically trigger the pipeline, which will create/update the S3
buckets based on the templates.

10
AWS Pipeline Formation steps
4. Monitoring and Troubleshooting:
Monitor the pipeline execution in the AWS CodePipeline console.
Check CloudWatch Logs and CloudWatch Events for any issues
during the deployment process.

5. Environment Cleanup:
Implement a process to delete resources when they are no longer
needed. This may involve updating CloudFormation templates or
adding a separate pipeline stage for resource deletion.
.

11
AWS CloudFormation Artefacts
In the context of AWS CloudFormation, artifacts refer to the
deployable units or resources created during the CloudFormation
stack deployment.

These artifacts are typically defined in CloudFormation templates


and represent AWS resources such as EC2 instances, S3 buckets,
Lambda functions, and more.

12

You might also like