AWS Cloud Practitioner · Cloud Technology and Services · medium

A DevOps engineer wants to provision a repeatable stack of VPCs, subnets, security groups, and RDS databases across development and production accounts using declarative YAML templates. Which AWS service provides native infrastructure as code?

Published · Last updated · checked before publication — how we verify questions

Options

  • AAWS Trusted Advisor for reviewing account service quota utilization
  • BAWS CodeArtifact for hosting private Maven and npm software packages
  • CAmazon CloudWatch for graphing CPU utilization metrics and alarms
  • DAWS CloudFormation for template-driven infrastructure provisioningCorrect answer

Answer: D. AWS CloudFormation for template-driven infrastructure provisioning

AWS CloudFormation is the AWS-native infrastructure as code service. You describe the desired resources, such as VPCs, subnets, security groups, and RDS databases, in a JSON or YAML template, and CloudFormation creates, updates, and deletes them together as a stack. Because the template is declarative, you state what you want rather than the steps to build it, so the same template can be deployed repeatedly to development and production accounts, and across accounts and Regions with StackSets. Related features include change sets to preview updates, rollback on failure, and drift detection. The common trap is choosing a service that sounds operational or developer-oriented, such as Trusted Advisor, CloudWatch, or CodeArtifact. These observe, advise on, or store things, but none of them provisions resources from templates. Whenever a question mentions declarative templates and repeatable stacks, think CloudFormation.

Why the other options are wrong

  • A. AWS Trusted Advisor for reviewing account service quota utilization — AWS Trusted Advisor inspects an account and gives recommendations on cost, performance, security, fault tolerance, and service quotas. It reports on existing resources and does not create or manage resources from templates.
  • B. AWS CodeArtifact for hosting private Maven and npm software packages — AWS CodeArtifact is a managed artifact repository that stores and shares software packages such as Maven and npm for developers. It handles package dependencies, not provisioning of VPCs, subnets, or databases.
  • C. Amazon CloudWatch for graphing CPU utilization metrics and alarms — Amazon CloudWatch collects metrics, logs, and events and drives alarms and dashboards for monitoring resources. It observes infrastructure after it exists and cannot define or deploy it from templates.

All Cloud Technology and Services questions and the topic overview →

AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.