ladderlore
  • 输入服务名称,例如 S3 或 IAM。

服务 · Management and Governance · 基于 CLF-C02

AWS CloudFormation

Change sets, drift detection, StackSets, nested stacks and deletion policies keep infrastructure correct and repeatable.

本课尚未翻译,暂以英文显示。

你在云从业者中已学过

  • CloudFormation builds resources from a template, as one unit called a stack.
  • A change set previews changes. A failed update rolls back by default.
  • Drift detection finds changes made outside it. StackSets deploy to many accounts and Regions.
阅读云从业者课程
  • Change set

    Surprise changes from an update
  • Drift detection

    Manual edits outside CloudFormation
  • Stack policy

    Updates to critical resources
  • Termination protection

    Deleting a stack by mistake
  • DeletionPolicy

    Losing data when a stack is deleted
  • Rollback

    A half-built or half-updated stack
Each feature guards against one kind of mistake.

1 / 2

  • Change set

    Surprise changes from an update
  • Drift detection

    Manual edits outside CloudFormation
  • Stack policy

    Updates to critical resources
  • Termination protection

    Deleting a stack by mistake

2 / 2

  • DeletionPolicy

    Losing data when a stack is deleted
  • Rollback

    A half-built or half-updated stack
Each feature guards against one kind of mistake.
Template
CloudFormation
Stack, Region A
Stack, Region B
Stack, account 2
One template, many stacks: new accounts, Regions or a DR site.

是什么

Infrastructure integrity means the real environment matches the design. CloudFormation helps you keep it that way. Review every update with a change set before you run it. Run drift detection to find resources that someone changed by hand. A stack policy blocks updates to critical resources, and termination protection stops a stack from being deleted by mistake.

是什么

A DeletionPolicy decides what happens to a resource when its stack is deleted: Delete (the usual default), Retain (keep it) or Snapshot (take a snapshot first, for volumes and databases). Use Retain or Snapshot for data. If a create fails, the stack rolls back and removes what it built. If an update fails, it rolls back to the last good state.

是什么

To scale a design, split a big template into nested stacks, which are reusable parts such as a network stack. StackSets deploy the same stack to many accounts and Regions from one place. For DR, keep the same template ready for the recovery Region, so you can build the whole environment there in minutes with only parameters changed. Parameters, mappings and conditions let one template serve development and production.

是什么

Related services: AWS Service Catalog lets administrators publish approved products, often CloudFormation templates, that teams launch themselves. The AWS Serverless Application Repository is a catalog of ready-made serverless applications to find, deploy and publish.

要记住

  • Change set: preview before you update.
  • Drift detection: find manual changes.
  • DeletionPolicy: Delete, Retain or Snapshot. Use Retain or Snapshot for data.
  • A failed create or update rolls back by default.
  • Nested stacks reuse parts. StackSets deploy to many accounts and Regions.

要记住

  • The same template builds a DR environment in another Region.

考试中

  • “Find out whether someone changed resources outside the template” points to drift detection.
  • “Keep the database when the stack is deleted” points to DeletionPolicy Retain or Snapshot.
  • “Deploy the same resources to every account and Region in the organization” points to StackSets.
  • “Preview the effect of an update” points to a change set.