AWS for Backend Developers (EC2, S3, RDS, Lambda) · Pelajaran

Infrastruktur sebagai Kode dengan CloudFormation

Pelajari cara mendefinisikan, menyediakan, dan memberi versi pada infrastruktur AWS secara deklaratif menggunakan templat dan stack AWS CloudFormation.

Pelajaran 4 dari 413 langkah

Infrastruktur sebagai Kode dengan CloudFormation adalah pelajaran AWS for Backend Developers (EC2, S3, RDS, Lambda) gratis di CoddyKit. Ini adalah pelajaran 4 dari 4. Kamu bisa membaca pelajaran lengkapnya di bawah secara gratis — lalu praktikkan langsung di browser dengan editor kode bawaan dan tutor AI 24/7. Ini adalah bagian dari jalur belajar AWS for Backend Developers (EC2, S3, RDS, Lambda), dan progresmu tersinkronisasi di web dan aplikasi CoddyKit. Kursus AWS for Backend Developers (EC2, S3, RDS, Lambda) mencakup 4 pelajaran total.

Bagian dari pelajaran ini belum diterjemahkan dan ditampilkan dalam bahasa Inggris.

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.

Gratis untuk memulai

Belajar AWS for Backend Developers (EC2, S3, RDS, Lambda) dengan tutor AI — gratis

Tulis dan jalankan kode asli di browser kamu, dapatkan bantuan instan dari tutor AI 24/7, dan lanjutkan di mana kamu tinggalkan di web atau aplikasi.

Kursus
12
Pelajaran
48

Pertanyaan yang Sering Diajukan

Apakah pelajaran “Infrastruktur sebagai Kode dengan CloudFormation” gratis?

Ya — teks lengkap “Infrastruktur sebagai Kode dengan CloudFormation” gratis dibaca di sini di web. Untuk praktiknya secara interaktif (editor kode bawaan dan tutor AI 24/7) dan buka sisa kursus AWS for Backend Developers (EC2, S3, RDS, Lambda), upgrade ke CoddyKit PRO. Kursus AWS for Backend Developers (EC2, S3, RDS, Lambda) mencakup 4 pelajaran total.

Apa yang akan aku pelajari di “Infrastruktur sebagai Kode dengan CloudFormation”?

Pelajari cara mendefinisikan, menyediakan, dan memberi versi pada infrastruktur AWS secara deklaratif menggunakan templat dan stack AWS CloudFormation. Kamu berlatih AWS for Backend Developers (EC2, S3, RDS, Lambda) dengan kode praktik yang langsung kamu jalankan di browser, dan tutor AI 24/7 menjawab pertanyaanmu saat kamu mengerjakan pelajaran ini.

Apakah aku perlu pengalaman untuk memulai AWS for Backend Developers (EC2, S3, RDS, Lambda)?

Tidak diperlukan pengalaman sebelumnya. AWS for Backend Developers (EC2, S3, RDS, Lambda) di CoddyKit dirancang untuk pemula hingga pelajar tingkat lanjut, jadi kamu bisa memulai di sini atau dari awal dan belajar sesuai kecepatan kamu sendiri. Ini adalah pelajaran 4 dari 4.

Berapa lama pelajaran “Infrastruktur sebagai Kode dengan CloudFormation” memakan waktu?

Sebagian besar pelajaran CoddyKit memakan waktu sekitar 5–10 menit. Setiap pelajaran ringkas dan interaktif, jadi kamu membuat kemajuan stabil dan melanjutkan dari tempat kamu tinggalkan di web dan aplikasi.

Bisakah aku menulis dan menjalankan kode dalam pelajaran AWS for Backend Developers (EC2, S3, RDS, Lambda) ini?

Ya. Setiap pelajaran AWS for Backend Developers (EC2, S3, RDS, Lambda) menyertakan editor kode bawaan, jadi kamu menulis dan menjalankan kode nyata langsung di browser dan mendapatkan umpan balik AI instan — tidak diperlukan penyiapan lokal.

Semua pelajaran dalam kursus ini

  1. Dasar-Dasar CodeCommit dan CodeBuild
  2. CodeDeploy untuk EC2/Lambda
  3. Serverless Application Model (SAM)
  4. Infrastruktur sebagai Kode dengan CloudFormation
← Kembali ke AWS for Backend Developers (EC2, S3, RDS, Lambda)