AWS Certified Cloud Practitioner / Question #1072 of 719

Question #1072

Which AWS service enables companies to define and provision infrastructure using declarative templates?

A

AWS CodeBuild

B

AWS Service Catalog

C

AWS Systems Manager

D

AWS CloudFormation

Explanation

The correct answer is D. AWS CloudFormation enables infrastructure-as-code (IaC) by using declarative templates (JSON/YAML) to define and provision AWS resources. Users specify the desired state of their infrastructure, and CloudFormation handles dependencies, sequencing, and error handling during provisioning.

Why other options are incorrect:
- A. AWS CodeBuild: A CI/CD service for building and testing code, not infrastructure provisioning.
- B. AWS Service Catalog: Manages approved IT service catalogs but does not use declarative templates for infrastructure.
- C. AWS Systems Manager: Focuses on operational tasks like patch management and configuration, not infrastructure provisioning.

Key Points:
- Declarative templates define what to provision, not how.
- CloudFormation ensures idempotency and consistency.
- Infrastructure-as-code (IaC) is a core AWS best practice for scalability and compliance.

Answer

The correct answer is: D