服务 · 管理与监管
AWS CloudFormation
Builds and manages AWS resources from a template, as a single unit called a stack.
本课尚未翻译,暂以英文显示。
- 1You write a template and give it to CloudFormation.
- 2CloudFormation creates every resource in the right order, as one stack.
分步说明
- 1You write a template and give it to CloudFormation.
- 2CloudFormation creates every resource in the right order, as one stack.
Template
A JSON or YAML file that describes the resources you want.
Stack
The resources built from one template, managed as one unit.
Change set
A preview of what an update will change, before it runs.
Rollback
By default, if creating or updating a stack fails, the changes are undone.
Drift detection
Finds resources that were changed outside CloudFormation.
StackSets
One template deployed to many accounts and Regions in one operation.
1 / 2
Template
A JSON or YAML file that describes the resources you want.
Stack
The resources built from one template, managed as one unit.
Change set
A preview of what an update will change, before it runs.
Rollback
By default, if creating or updating a stack fails, the changes are undone.
2 / 2
Drift detection
Finds resources that were changed outside CloudFormation.
StackSets
One template deployed to many accounts and Regions in one operation.
是什么
AWS CloudFormation is the AWS service for infrastructure as code. You write a template, a text file in JSON or YAML, that lists the resources you want, such as a VPC, EC2 instances and a database. CloudFormation works out the right order and creates them all for you, as one unit called a stack.
To change the environment, you edit the template and update the stack. A change set shows what will change before anything happens. By default, if creating or updating a stack fails, CloudFormation rolls the changes back. Deleting the stack deletes its resources, so nothing is left running by mistake.
是什么
There is no extra charge for CloudFormation itself when it manages AWS resources. You pay for the resources that the stack creates. With StackSets, one template can be deployed to many accounts and Regions in a single operation.
要记住
- Template = the plan. Stack = the resources built from it.
- The same template gives the same result in any account or Region.
- It works out the order for you, for example the network before the servers inside it.
- Drift detection finds resources that someone changed outside CloudFormation.
要记住
- No extra charge for AWS resources: you pay for what the stack creates.
考试中
- “Provision AWS resources from a template” or “model infrastructure as code” points to AWS CloudFormation.
- “Upload application code and let AWS handle the servers, scaling and load balancing” is AWS Elastic Beanstalk. CloudFormation is for describing the infrastructure yourself.
别和这些弄混
AWS Elastic BeanstalkUpload your code, and AWS deploys and runs the web application for you.
AWS Service CatalogA catalog of approved AWS products that people launch themselves, within the rules administrators set.
- Infrastructure as code (IaC)Describing your infrastructure in files, so that a tool can build it the same way every time.