AWS for Backend Developers (EC2, S3, RDS, Lambda) · レッスン

CloudFormationによるInfrastructure as Code

AWS CloudFormationのテンプレートとスタックを使い、AWSインフラを宣言的に定義、プロビジョニング、バージョン管理する方法を学びます。

レッスン 4/413 ステップ

「CloudFormationによるInfrastructure as Code」はCoddyKit上の無料AWS for Backend Developers (EC2, S3, RDS, Lambda)レッスンです。 これはレッスン4/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはAWS for Backend Developers (EC2, S3, RDS, Lambda)学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 AWS for Backend Developers (EC2, S3, RDS, Lambda)コースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

Why Infrastructure as Code?

Clicking through the console to create resources is slow, error-prone, and impossible to reproduce reliably.

Infrastructure as Code (IaC) defines your infrastructure in files you can version, review, and deploy repeatedly.

What Is CloudFormation?

AWS CloudFormation provisions AWS resources from a declarative template. You describe the desired end state and CloudFormation figures out how to create it.

Templates and Stacks

Key terms:

  • A template is a YAML or JSON file describing resources
  • A stack is a deployed instance of a template
  • Updating the template updates the stack

A Minimal Template

This template creates a single S3 bucket.

AWSTemplateFormatVersion: '2010-09-09'
Resources:
  MyBucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: my-iac-bucket

Parameters

Parameters make templates reusable by accepting input at deploy time, like an environment name or instance size.

Parameters:
  EnvName:
    Type: String
    Default: dev

Outputs

Outputs export useful values from a stack, such as a bucket name or endpoint URL, so other stacks or operators can reference them.

Outputs:
  BucketName:
    Value: !Ref MyBucket

Deploying a Stack

Create or update a stack from the CLI.

aws cloudformation deploy \
  --template-file template.yaml \
  --stack-name my-app

Change Sets

A change set previews exactly what an update will add, modify, or delete before you apply it — a safety net against accidental data loss.

Automatic Rollback

If a stack update fails partway, CloudFormation rolls back to the last known good state, so you are never left with half-broken infrastructure.

Drift Detection

Drift detection tells you when someone changed a resource manually outside CloudFormation, so you can bring reality back in line with the template.

CloudFormation in CI/CD

In a pipeline, CodePipeline can deploy CloudFormation stacks automatically on every commit, making infrastructure changes follow the same review-and-deploy flow as your application code.

Quick Check

Test your IaC knowledge.

Recap

You learned Infrastructure as Code:

  • Templates declare resources; stacks deploy them
  • Parameters and outputs make templates reusable
  • Change sets preview updates safely
  • Drift detection and rollback keep infrastructure consistent

IaC makes your infrastructure repeatable, reviewable, and version-controlled.

無料で開始

AI チューターと学ぶ AWS for Backend Developers (EC2, S3, RDS, Lambda) — 無料

ブラウザでリアルコードを書いて実行し、24/7 の AI チューターから瞬時にサポートを受け、ウェブまたはアプリで続きから学習できます。

コース
12
レッスン
48

よくある質問

「CloudFormationによるInfrastructure as Code」レッスンは無料ですか?

はい。「CloudFormationによるInfrastructure as Code」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、AWS for Backend Developers (EC2, S3, RDS, Lambda)コースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 AWS for Backend Developers (EC2, S3, RDS, Lambda)コースには全4レッスンが含まれています。

「CloudFormationによるInfrastructure as Code」で何を学びますか?

AWS CloudFormationのテンプレートとスタックを使い、AWSインフラを宣言的に定義、プロビジョニング、バージョン管理する方法を学びます。 ブラウザで直接実行するハンズオンコードでAWS for Backend Developers (EC2, S3, RDS, Lambda)を演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

AWS for Backend Developers (EC2, S3, RDS, Lambda)を始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのAWS for Backend Developers (EC2, S3, RDS, Lambda)は初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン4/4です。

「CloudFormationによるInfrastructure as Code」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このAWS for Backend Developers (EC2, S3, RDS, Lambda)レッスンでコードを書いて実行できますか?

はい。すべてのAWS for Backend Developers (EC2, S3, RDS, Lambda)レッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. CodeCommit と CodeBuild の基礎
  2. EC2/Lambda 向け CodeDeploy
  3. Serverless Application Model(SAM)
  4. CloudFormationによるInfrastructure as Code
← AWS for Backend Developers (EC2, S3, RDS, Lambda)に戻る