Bitzu

CLF-C02 ยท Deploying on AWS and global infrastructure

Infrastructure as code: CloudFormation and Elastic Beanstalk

Benefits of infrastructure as code, AWS CloudFormation templates and stacks, and AWS Elastic Beanstalk as a managed way to deploy applications.

Key points

  • Infrastructure as code (IaC): resources in text files; repeatable, version-controlled, quickly rebuilt.
  • AWS CloudFormation: a template (JSON or YAML) creates a stack, resources managed as one unit.
  • Change set: previews what an update will change.
  • Failed creation: CloudFormation rolls back.
  • AWS Elastic Beanstalk: upload code; it provisions capacity, load balancing, scaling, health monitoring; no extra charge beyond resources.

Source: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-overview.html

Practice questions

Single choice

In AWS CloudFormation, what is a stack?

  1. The JSON or YAML file that describes resources
  2. A set of resources created from a template and managed as one unit
  3. A summary of changes proposed before an update
  4. A group of data centers in one geographic area
Show answer

Answer: B. A set of resources created from a template and managed as one unit

A stack is the collection of resources CloudFormation creates from a template and manages as a single unit. The template is the text file itself; a change set is a preview of an update; a Region is a geographic location.

Select all that apply

Which are benefits of managing infrastructure as code?

  1. Environments are created the same way every time
  2. Templates can be versioned and reviewed like code
  3. Environments can be rebuilt quickly after a failure
  4. IAM permissions are no longer needed to create resources
  5. Resources created from templates are not billed
Show answer

Answer: A. Environments are created the same way every time, B. Templates can be versioned and reviewed like code, C. Environments can be rebuilt quickly after a failure

IaC makes deployments repeatable and consistent, lets you keep templates in version control with review history, and speeds up rebuilding environments, for example in a recovery Region. It does not remove the need for IAM permissions (CloudFormation needs rights to create the resources), and it does not make the resources free.

True or false

AWS Elastic Beanstalk carries its own hourly service fee on top of the resources it creates.

Show answer

Answer: False

False. There is no additional charge for Elastic Beanstalk itself; you pay only for the underlying resources, such as EC2 instances and load balancers, that your application uses.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More CLF-C02 topics in this module