Nic Acton
  • My Gitbook
  • My Favorite Things
    • Podcasts
    • Newsletters
  • Monthly Summaries
    • May 2019
    • June 2019
  • Cloud Computing
    • Cloud Concepts
    • AWS
      • Certified Solutions Architect
      • Well Architected Framework
        • Operational Excellence
        • Reliability
        • Performance Efficiency
        • Cost Optimization
        • Security
      • Analytics
        • Elasticsearch Service
        • Kinesis
        • Elastic MapReduce (EMR)
      • Compute Services
        • Elastic Beanstalk
        • Elastic Container Service (ECS)
      • Deployment
        • CloudFormation
      • Application Services
        • Key Management Service (KMS)
        • Simple Queue Service (SQS)
        • API Gateway
        • Simple Work Flow (SWF)
        • Amazon MQ
        • Simple Notification Service (SNS)
      • Simple Storage Service (S3)
        • Macie
      • Databases
        • RDS
        • DynamoDB
        • ElastiCache
        • Neptune
        • Redshift
      • Cloudfront
      • IAM
      • Monitoring
        • Trusted Advisor
        • Amazon Inspector
        • AWS Config
        • AWS Shield
        • CloudWatch
          • VPC Flow Logs
        • CloudTrail
        • Guard Duty
      • Route53
      • Serverless Architectures
        • Lambda
      • VPC
        • Highly Available & Fault Tolerant VPCs
        • Hybrid Environments
          • VPC Peering
          • Direct Connect
        • Cloud HSM
    • GCP
    • Azure
    • HashiCorp
    • Red Hat
      • RHEL
        • Basics
        • Grep & Regex
        • SSH
      • Ansible
    • Tutorials/Guides
      • Linux
        • Admin
  • Software Engineering
    • Machine Learning
      • Deep Learning
        • Tensorflow
      • Training and Loss
    • Programming
      • APIs
    • Security
    • Web Development
      • OSI 7 Layer Model
    • Tutorials/Guides
      • Apache Server
    • Virtualization
      • Virtual Machines
      • Containers
      • Serverless
  • Fitness
    • Nutrition
      • Diets
      • Macronutrients
      • Supplements
      • Miscellaneous
    • Strength Training
    • BodyBuilding
  • Miscellaneous
    • Technology Ethics
      • Education
    • Interesting Concepts
      • Libertarian Paternalism
Powered by GitBook
On this page
  • Essentials
  • Benefits
  • CloudFormation Engine
  • Template
  • Help Scripts

Was this helpful?

  1. Cloud Computing
  2. AWS
  3. Deployment

CloudFormation

Infrastructure as Code on AWS

Essentials

  • Pure definition of Infrastructure as Code:

    • You can "convert" you application's architecture into a JSON or YAML formatted template (architecture is literally code)

    • You can then use that JSON/YAML to deploy out updated or replicated copies of that architecture to multiple regions

  • Can be built off JSON/YAML templates, either fed in or built in a WYSIWYG tool called the Cloudformation Designer

  • Also has many templates with wizards for popular deployments like WordPress or LAMP stack

Benefits

  • Saves time - You don't have to manually duplicate architectures

  • Version control your infrastructure, allowing for rollbacks to previous versions.

  • Backups of infrastructure

  • Disaster recovery

CloudFormation Engine

  • Create Stack

  • Update Stack - Change Sets

    • Has a "diff-ing" tool that allows you to approve suggested changes

    • Templates stack, smaller templates can live in one big template.

  • Delete Stack

  • Nested Stacks

Template

  • Resources

    • Services to deploy, attributes

    • EC2, VPC, Subnet, Security Groups...

    • User Data Script

    • Custom Resources

  • Parameters

    • Variables in template

    • User prompted for values at run time

    • Key Pair, Instance Type, DB Password, etc.

  • Mappings

    • Lookup Table

    • AMIs by Region

  • Conditions

    • Define if a resource will be created

    • Environment = PROD

  • Outputs

    • Information to Return about Stack

    • ELB DNS Name

Help Scripts

  • cfn-init (CloudFormation Init)

    • packages

    • users, groups

    • files

    • commands, services

  • cfn-signal

    • user with wait conditions and creation policies

    • Signals that will be sent back to CloudFormation

  • cfn-hup

    • in place instance update of packages and software

    • changes to metadata

PreviousDeploymentNextApplication Services

Last updated 6 years ago

Was this helpful?