Explanation
AWS CloudFormation is the correct service for this requirement because:
- Infrastructure as Code (IaC): CloudFormation allows you to define AWS infrastructure using templates in JSON or YAML format
- Repeatable Deployments: You can create identical environments by using the same CloudFormation template multiple times
- Resource Management: CloudFormation handles the creation, updating, and deletion of AWS resources in a safe and predictable manner
- Template-Based: Uses infrastructure templates exactly as described in the question
Why the other options are incorrect:
- AWS Directory Service: Used for directory management (like Microsoft AD integration), not infrastructure deployment
- Amazon Lightsail: A simplified VPS service for basic web applications, not designed for complex infrastructure templates
- AWS CodeDeploy: A deployment service for application code, not infrastructure resources
CloudFormation provides the repeatable, template-based infrastructure deployment capability that the cloud practitioner needs.