SlideShare una empresa de Scribd logo
1 de 32
28-01-2019
Ahmad El Gohary
@aalgohary85
ELGOHARY AHMAD
aalgohary85@gmail.com
24
Agenda
• Infrastructure as Code
• What is AWS CloudFormation?
• Our Use Case
• JSON & YAML
• Template Anatomy
• CFN Actions
• Learn by Example
• Other Topics and Features
• CloudFormation vs Terraform
Infrastructure as Code (IaaC)
• A process of managing and provisioning data centers through
machine readable definition files.
• IaaC grew as a response to the difficulty posed from two pieces
of technology – utility computing (AWS EC2) and second-
generation web frameworks (1st Version of Ruby on Rails).
• IaaC ≠ IaaS
• Reduced Cost, Faster Execution, Less Errors
• Approaches: Declarative (Functional), Imperative (Procedural),
Intelligent (Env. Aware)
• Methods: Push and Pull
• AWS CloudFormation is a service that helps you model and set up your Amazon Web
Services resources so that you can spend less time managing those resources and
more time focusing on your applications that run in AWS.
• Initial Release 25th Feb 2011
What is AWS CloudFormation (CFN)?
• A LAMP Stack is a set of open-source software
that can be used to create websites and web
applications. LAMP is an acronym, and these
stacks typically consist of the Linux operating
system, the Apache HTTP Server, the MySQL
relational database management system, and
the PHP programming language.
Linux
Operating System Layer
Apache
Web Server Layer
MySQL
Database Layer
PHP/Perl/Python
Scripting Layer
WordPress
Web Application
LAMPStack
Use Case: WordPress Instance
• JavaScript Object Notation
• A syntax for storing and exchanging data.
• Lightweight, self-describing and easy to understand.
• Consists of “Name : Value” pairs separated by “,”
enclosed between “{}”.
• Names are unique inside the object.
• Names and Strings are wrapped by double quotes.
JSON
JSON Syntax Examples
• YAML Ain’t Markup Language
• A syntax for storing and exchanging data.
• Human friendly, self-describing and easy to understand.
• A superset of JSON.
• Consists of “Name : Value” pairs separated by “New
Lines”.
• Allows in-line comments – begin with ‘#’ -> EOL
• Indentation (white spaces) controls the structure.
• Avoid using Tabs.
YAML
YAML Syntax Examples
YAML Syntax Examples
YAML Syntax Examples
YAML Vs JSON
Template Anatomy
CFN Actions
WP-Demo-01: MySQL, EC2 & S3
• What will happen if we created
another stack in the same or any
other region with the same
template?
• Stack will succeed
• Stack will fail
• Stack will partially succeed
WP-Demo-01: Question 1
• What will happen if we created
another stack in the same or any
other region with the same
template?
• Stack will succeed
• Stack will fail
• Stack will partially succeed
Bucket name is unique
across all regions
WP-Demo-01: Question 1
• What will happen if we deleted
this stack and created another
stack in another region with the
same template?
• Stack will succeed
• Stack will fail
• Stack will partially succeed
WP-Demo-01: Question 2
• What will happen if we deleted
this stack and created another
stack in another region with the
same template?
• Stack will succeed
• Stack will fail
• Stack will partially succeed
AMI Id is different
across regions
WP-Demo-01: Question 2
• Not reusable – hard coded S3
bucket name
• Not portable – hard coded AMI Id
• Not reusable – hard coded
instance size for EC2 and DB
WP-Demo-01 Template Issues
• Not reusable – hard coded S3
bucket name
• Not portable – hard coded AMI Id
• Not reusable – hard coded
instance size for EC2 and DB
• Solution:
• Dynamic S3 Bucket Name
WP-Demo-01 Template Solutions
• Not reusable – hard coded S3
bucket name
• Not portable – hard coded AMI Id
• Not reusable – hard coded
instance size for EC2 and DB
• Solution:
• Dynamic S3 Bucket Name
• Dynamic Mapping + Pseudo
Parameters + Intrinsic Functions
WP-Demo-01 Template Solutions
• Not reusable – hard coded S3
bucket name
• Not portable – hard coded AMI Id
• Not reusable – hard coded
instance size for EC2 and DB
• Solution:
• Dynamic S3 Bucket Name
• Dynamic Mapping + Pseudo
Parameters + Intrinsic Functions
• Dynamic Mapping + Parameters +
Pseudo Parameters + Intrinsic
Functions
WP-Demo-01 Template Solutions
• Reusability in same region
• Portability to different regions
• Stack Update and Change Set
WP-Demo-02: Reusability and Portability
• Install PHP
• Install MySQL
• Install Apache
• Install WordPress & Configure
• Update System
User Data
User Data In Normal Case
User Data in CFN
WP-Demo-03: User Data & Dependencies
WP-Demo-04: Outputs
References
• https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html
• https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html
• https://acloud.guru/learn/intro-aws-cloudformation
• https://acloud.guru/learn/aws-advanced-cloudformation
• https://www.w3schools.com/js/js_json_intro.asp
• https://www.tutorialspoint.com/yaml/index.htm
• https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-
reference.html
• https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-
reference.html
• https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-
structure.html#aws-specific-parameter-types
• https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-
dependson.html
Questions?
Thank You!
See You Next Meetup

Más contenido relacionado

La actualidad más candente

STG204 Using the AWS Storage Gateway - AWS re:Invent 2012
STG204 Using the AWS Storage Gateway - AWS re:Invent 2012STG204 Using the AWS Storage Gateway - AWS re:Invent 2012
STG204 Using the AWS Storage Gateway - AWS re:Invent 2012
Amazon Web Services
 

La actualidad más candente (20)

AWS re:Invent 2016: Hybrid Architectures: Bridging the Gap to the Cloud( ARC2...
AWS re:Invent 2016: Hybrid Architectures: Bridging the Gap to the Cloud( ARC2...AWS re:Invent 2016: Hybrid Architectures: Bridging the Gap to the Cloud( ARC2...
AWS re:Invent 2016: Hybrid Architectures: Bridging the Gap to the Cloud( ARC2...
 
Compute Services con AWS
Compute Services con AWSCompute Services con AWS
Compute Services con AWS
 
AWS Kinesis
AWS KinesisAWS Kinesis
AWS Kinesis
 
Containers on AWS
Containers on AWSContainers on AWS
Containers on AWS
 
Cloud Data Migration Strategies - AWS May 2016 Webinar Series
Cloud Data Migration Strategies - AWS May 2016 Webinar SeriesCloud Data Migration Strategies - AWS May 2016 Webinar Series
Cloud Data Migration Strategies - AWS May 2016 Webinar Series
 
AWS re:Invent 2016: How to Launch a 100K-User Corporate Back Office with Micr...
AWS re:Invent 2016: How to Launch a 100K-User Corporate Back Office with Micr...AWS re:Invent 2016: How to Launch a 100K-User Corporate Back Office with Micr...
AWS re:Invent 2016: How to Launch a 100K-User Corporate Back Office with Micr...
 
Serverless Architecture on AWS
Serverless Architecture on AWSServerless Architecture on AWS
Serverless Architecture on AWS
 
AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...
AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...
AWS re:Invent 2016: Get Technically Inspired by Container-Powered Migrations ...
 
AWS Lambda and the Serverless Cloud -Pop-up Loft
AWS Lambda and the Serverless Cloud -Pop-up LoftAWS Lambda and the Serverless Cloud -Pop-up Loft
AWS Lambda and the Serverless Cloud -Pop-up Loft
 
Serverless Realtime Backup
Serverless Realtime BackupServerless Realtime Backup
Serverless Realtime Backup
 
Data Storage for the Long Haul: Compliance and Archive
Data Storage for the Long Haul: Compliance and ArchiveData Storage for the Long Haul: Compliance and Archive
Data Storage for the Long Haul: Compliance and Archive
 
AWS Batch: Simplifying batch computing in the cloud
AWS Batch: Simplifying batch computing in the cloudAWS Batch: Simplifying batch computing in the cloud
AWS Batch: Simplifying batch computing in the cloud
 
Trustpilot
TrustpilotTrustpilot
Trustpilot
 
Module 1 cloud computing
Module 1   cloud computingModule 1   cloud computing
Module 1 cloud computing
 
Amazon Aurora
Amazon AuroraAmazon Aurora
Amazon Aurora
 
Meetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practicesMeetup #4: AWS ELB Deep dive & Best practices
Meetup #4: AWS ELB Deep dive & Best practices
 
Hands-On With Amazon Web Services (AWS) - part 3
Hands-On With Amazon Web Services (AWS) - part 3Hands-On With Amazon Web Services (AWS) - part 3
Hands-On With Amazon Web Services (AWS) - part 3
 
STG204 Using the AWS Storage Gateway - AWS re:Invent 2012
STG204 Using the AWS Storage Gateway - AWS re:Invent 2012STG204 Using the AWS Storage Gateway - AWS re:Invent 2012
STG204 Using the AWS Storage Gateway - AWS re:Invent 2012
 
Serverless Stream Processing with Bill Bejeck
Serverless Stream Processing with Bill BejeckServerless Stream Processing with Bill Bejeck
Serverless Stream Processing with Bill Bejeck
 
Introduction to AWS Kinesis
Introduction to AWS KinesisIntroduction to AWS Kinesis
Introduction to AWS Kinesis
 

Similar a AWS Cloudformation Session 01

Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
Amazon Web Services
 

Similar a AWS Cloudformation Session 01 (20)

ORM Methodology
ORM MethodologyORM Methodology
ORM Methodology
 
(ARC301) Scaling Up to Your First 10 Million Users
(ARC301) Scaling Up to Your First 10 Million Users(ARC301) Scaling Up to Your First 10 Million Users
(ARC301) Scaling Up to Your First 10 Million Users
 
SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013
SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013
SmugMug: From MySQL to Amazon DynamoDB (DAT204) | AWS re:Invent 2013
 
Deep Dive: Scaling Up to Your First 10 Million Users
Deep Dive: Scaling Up to Your First 10 Million UsersDeep Dive: Scaling Up to Your First 10 Million Users
Deep Dive: Scaling Up to Your First 10 Million Users
 
Scaling the Platform for Your Startup
Scaling the Platform for Your StartupScaling the Platform for Your Startup
Scaling the Platform for Your Startup
 
AWS re:Invent 2016: Busting the Myth of Vendor Lock-In: How D2L Embraced the...
AWS re:Invent 2016: Busting the Myth of Vendor Lock-In:  How D2L Embraced the...AWS re:Invent 2016: Busting the Myth of Vendor Lock-In:  How D2L Embraced the...
AWS re:Invent 2016: Busting the Myth of Vendor Lock-In: How D2L Embraced the...
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
 
ENT309 scaling up to your first 10 million users
ENT309 scaling up to your first 10 million usersENT309 scaling up to your first 10 million users
ENT309 scaling up to your first 10 million users
 
"Serverless Java Applications" at Froscon 2018 by Vadym Kazulkin/Elmar Warken
"Serverless Java Applications" at Froscon 2018 by Vadym Kazulkin/Elmar Warken"Serverless Java Applications" at Froscon 2018 by Vadym Kazulkin/Elmar Warken
"Serverless Java Applications" at Froscon 2018 by Vadym Kazulkin/Elmar Warken
 
Big Data Day LA 2015 - Lessons learned from scaling Big Data in the Cloud by...
Big Data Day LA 2015 -  Lessons learned from scaling Big Data in the Cloud by...Big Data Day LA 2015 -  Lessons learned from scaling Big Data in the Cloud by...
Big Data Day LA 2015 - Lessons learned from scaling Big Data in the Cloud by...
 
ENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million UsersENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million Users
 
ENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million UsersENT309 Scaling Up to Your First 10 Million Users
ENT309 Scaling Up to Your First 10 Million Users
 
[Jun AWS 201] Technical Workshop
[Jun AWS 201] Technical Workshop[Jun AWS 201] Technical Workshop
[Jun AWS 201] Technical Workshop
 
AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)
AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)
AWS Summit London 2014 | Scaling on AWS for the First 10 Million Users (200)
 
NoSQL
NoSQLNoSQL
NoSQL
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
 
Yes sql08 inmemorydb
Yes sql08 inmemorydbYes sql08 inmemorydb
Yes sql08 inmemorydb
 
Scaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million UsersScaling on AWS for the First 10 Million Users
Scaling on AWS for the First 10 Million Users
 
Scaling on AWS to the First 10 Million Users
Scaling on AWS to the First 10 Million Users Scaling on AWS to the First 10 Million Users
Scaling on AWS to the First 10 Million Users
 
Scaling the Platform for Your Startup
Scaling the Platform for Your StartupScaling the Platform for Your Startup
Scaling the Platform for Your Startup
 

Más de AWS Riyadh User Group

Más de AWS Riyadh User Group (18)

AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul MaddoxAWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
 
AWS reinvent 2019 recap - Riyadh - Database and Analytics - Assif Abbasi
AWS reinvent 2019 recap - Riyadh - Database and Analytics - Assif AbbasiAWS reinvent 2019 recap - Riyadh - Database and Analytics - Assif Abbasi
AWS reinvent 2019 recap - Riyadh - Database and Analytics - Assif Abbasi
 
AWS reinvent 2019 recap - Riyadh - Network and Security - Anver Vanker
AWS reinvent 2019 recap - Riyadh - Network and Security - Anver VankerAWS reinvent 2019 recap - Riyadh - Network and Security - Anver Vanker
AWS reinvent 2019 recap - Riyadh - Network and Security - Anver Vanker
 
AWS reinvent 2019 recap - Riyadh - AI And ML - Ahmed Raafat
AWS reinvent 2019 recap - Riyadh - AI And ML - Ahmed RaafatAWS reinvent 2019 recap - Riyadh - AI And ML - Ahmed Raafat
AWS reinvent 2019 recap - Riyadh - AI And ML - Ahmed Raafat
 
Demistifying serverless on aws
Demistifying serverless on awsDemistifying serverless on aws
Demistifying serverless on aws
 
Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...
Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...
Cutting to the chase for Machine Learning Analytics Ecosystem & AWS Lake Form...
 
Amazon SageMaker Build, Train and Deploy Your ML Models
Amazon SageMaker Build, Train and Deploy Your ML ModelsAmazon SageMaker Build, Train and Deploy Your ML Models
Amazon SageMaker Build, Train and Deploy Your ML Models
 
AWS Technical Day Riyadh Nov 2019 - The art of mastering data protection on aws
AWS Technical Day Riyadh Nov 2019 - The art of mastering data protection on awsAWS Technical Day Riyadh Nov 2019 - The art of mastering data protection on aws
AWS Technical Day Riyadh Nov 2019 - The art of mastering data protection on aws
 
AWS Technical Day Riyadh Nov 2019 - Scaling threat detection and response in aws
AWS Technical Day Riyadh Nov 2019 - Scaling threat detection and response in awsAWS Technical Day Riyadh Nov 2019 - Scaling threat detection and response in aws
AWS Technical Day Riyadh Nov 2019 - Scaling threat detection and response in aws
 
AWS Technical Day Riyadh Nov 2019 [Migration]
AWS Technical Day Riyadh Nov 2019 [Migration]AWS Technical Day Riyadh Nov 2019 [Migration]
AWS Technical Day Riyadh Nov 2019 [Migration]
 
AWS Amplify
AWS AmplifyAWS Amplify
AWS Amplify
 
Devops on AWS
Devops on AWSDevops on AWS
Devops on AWS
 
Blockchain on AWS
Blockchain on AWSBlockchain on AWS
Blockchain on AWS
 
AWS AI Services
AWS AI ServicesAWS AI Services
AWS AI Services
 
AWS Cloud Security
AWS Cloud SecurityAWS Cloud Security
AWS Cloud Security
 
AWS Messaging
AWS MessagingAWS Messaging
AWS Messaging
 
Amazon Virtual Private Cloud - VPC 2
Amazon Virtual Private Cloud - VPC 2Amazon Virtual Private Cloud - VPC 2
Amazon Virtual Private Cloud - VPC 2
 
Amazon relational database service (rds)
Amazon relational database service (rds)Amazon relational database service (rds)
Amazon relational database service (rds)
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

AWS Cloudformation Session 01

  • 1. 28-01-2019 Ahmad El Gohary @aalgohary85 ELGOHARY AHMAD aalgohary85@gmail.com 24
  • 2. Agenda • Infrastructure as Code • What is AWS CloudFormation? • Our Use Case • JSON & YAML • Template Anatomy • CFN Actions • Learn by Example • Other Topics and Features • CloudFormation vs Terraform
  • 3. Infrastructure as Code (IaaC) • A process of managing and provisioning data centers through machine readable definition files. • IaaC grew as a response to the difficulty posed from two pieces of technology – utility computing (AWS EC2) and second- generation web frameworks (1st Version of Ruby on Rails). • IaaC ≠ IaaS • Reduced Cost, Faster Execution, Less Errors • Approaches: Declarative (Functional), Imperative (Procedural), Intelligent (Env. Aware) • Methods: Push and Pull
  • 4. • AWS CloudFormation is a service that helps you model and set up your Amazon Web Services resources so that you can spend less time managing those resources and more time focusing on your applications that run in AWS. • Initial Release 25th Feb 2011 What is AWS CloudFormation (CFN)?
  • 5. • A LAMP Stack is a set of open-source software that can be used to create websites and web applications. LAMP is an acronym, and these stacks typically consist of the Linux operating system, the Apache HTTP Server, the MySQL relational database management system, and the PHP programming language. Linux Operating System Layer Apache Web Server Layer MySQL Database Layer PHP/Perl/Python Scripting Layer WordPress Web Application LAMPStack Use Case: WordPress Instance
  • 6. • JavaScript Object Notation • A syntax for storing and exchanging data. • Lightweight, self-describing and easy to understand. • Consists of “Name : Value” pairs separated by “,” enclosed between “{}”. • Names are unique inside the object. • Names and Strings are wrapped by double quotes. JSON
  • 8. • YAML Ain’t Markup Language • A syntax for storing and exchanging data. • Human friendly, self-describing and easy to understand. • A superset of JSON. • Consists of “Name : Value” pairs separated by “New Lines”. • Allows in-line comments – begin with ‘#’ -> EOL • Indentation (white spaces) controls the structure. • Avoid using Tabs. YAML
  • 16. • What will happen if we created another stack in the same or any other region with the same template? • Stack will succeed • Stack will fail • Stack will partially succeed WP-Demo-01: Question 1
  • 17. • What will happen if we created another stack in the same or any other region with the same template? • Stack will succeed • Stack will fail • Stack will partially succeed Bucket name is unique across all regions WP-Demo-01: Question 1
  • 18. • What will happen if we deleted this stack and created another stack in another region with the same template? • Stack will succeed • Stack will fail • Stack will partially succeed WP-Demo-01: Question 2
  • 19. • What will happen if we deleted this stack and created another stack in another region with the same template? • Stack will succeed • Stack will fail • Stack will partially succeed AMI Id is different across regions WP-Demo-01: Question 2
  • 20. • Not reusable – hard coded S3 bucket name • Not portable – hard coded AMI Id • Not reusable – hard coded instance size for EC2 and DB WP-Demo-01 Template Issues
  • 21. • Not reusable – hard coded S3 bucket name • Not portable – hard coded AMI Id • Not reusable – hard coded instance size for EC2 and DB • Solution: • Dynamic S3 Bucket Name WP-Demo-01 Template Solutions
  • 22. • Not reusable – hard coded S3 bucket name • Not portable – hard coded AMI Id • Not reusable – hard coded instance size for EC2 and DB • Solution: • Dynamic S3 Bucket Name • Dynamic Mapping + Pseudo Parameters + Intrinsic Functions WP-Demo-01 Template Solutions
  • 23. • Not reusable – hard coded S3 bucket name • Not portable – hard coded AMI Id • Not reusable – hard coded instance size for EC2 and DB • Solution: • Dynamic S3 Bucket Name • Dynamic Mapping + Pseudo Parameters + Intrinsic Functions • Dynamic Mapping + Parameters + Pseudo Parameters + Intrinsic Functions WP-Demo-01 Template Solutions
  • 24. • Reusability in same region • Portability to different regions • Stack Update and Change Set WP-Demo-02: Reusability and Portability
  • 25. • Install PHP • Install MySQL • Install Apache • Install WordPress & Configure • Update System User Data
  • 26. User Data In Normal Case
  • 28. WP-Demo-03: User Data & Dependencies
  • 30. References • https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/ReleaseHistory.html • https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html • https://acloud.guru/learn/intro-aws-cloudformation • https://acloud.guru/learn/aws-advanced-cloudformation • https://www.w3schools.com/js/js_json_intro.asp • https://www.tutorialspoint.com/yaml/index.htm • https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function- reference.html • https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter- reference.html • https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section- structure.html#aws-specific-parameter-types • https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute- dependson.html
  • 32. See You Next Meetup

Notas del editor

  1. You can safely remove this slide. This slide design was provided by SlideModel.com – You can download more templates, shapes and elements for PowerPoint from http://slidemodel.com
  2. You can safely remove this slide. This slide design was provided by SlideModel.com – You can download more templates, shapes and elements for PowerPoint from http://slidemodel.com