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
In AWS CloudFormation, what is a stack?
- The JSON or YAML file that describes resources
- A set of resources created from a template and managed as one unit
- A summary of changes proposed before an update
- 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.
Which are benefits of managing infrastructure as code?
- Environments are created the same way every time
- Templates can be versioned and reviewed like code
- Environments can be rebuilt quickly after a failure
- IAM permissions are no longer needed to create resources
- 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.
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.
