SOA-C02 Deployment, Provisioning, and Automation Practice Question
A SysOps administrator needs to deploy a set of AWS Lambda functions and an Amazon API Gateway API using infrastructure as code. The administrator wants to manage the deployment across multiple environments (dev, test, prod) with consistent resource configurations. Which AWS service should the administrator use?
⚠ Common exam trap
It's easy for candidates to confuse AWS CodeDeploy (which deploys application code) with CloudFormation (which provisions infrastructure), leading them to choose CodeDeploy because they think of 'deploying' Lambda functions, but the question specifically requires managing infrastructure as code across environments, which is CloudFormation's role.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
AWS CloudFormation
AWS CloudFormation is the correct choice because it is an Infrastructure as Code (IaC) service that allows you to define and provision AWS resources, including Lambda functions and API Gateway APIs, using templates. It supports managing deployments across multiple environments (dev, test, prod) by using parameters, mappings, and stacks, ensuring consistent resource configurations through repeatable, version-controlled templates.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
AWS CloudFormation
Why this is correct
AWS CloudFormation is the correct choice because it is a declarative infrastructure-as-code service that provisions and manages AWS resources through a template. You can define Lambda functions, API Gateway REST APIs, IAM roles, and all related dependencies in a single stack template, then deploy them consistently across development, test, and production environments. CloudFormation also handles resource ordering, rollback on failure, and drift detection, giving you repeatable and auditable deployments.
- ✗
AWS CodeDeploy
Why it's wrong here
AWS CodeDeploy is an application deployment service that automates code releases to running compute services like EC2 instances, ECS clusters, and on-premises systems. Although CodeDeploy can manage Lambda deployment strategies (e.g., canary or linear) for updating function versions, it does not create or provision Lambda functions, API Gateway endpoints, or other infrastructure resources. Its purpose is the final stage of deploying application code, not the initial provisioning of the underlying AWS service stack.
- ✗
AWS Elastic Beanstalk
Why it's wrong here
AWS Elastic Beanstalk is a platform-as-a-service (PaaS) that simplifies deploying web applications by automatically handling capacity provisioning, load balancing, and auto scaling for EC2 instances. While it supports Docker and can host custom applications, it does not natively model serverless components like Lambda functions and API Gateway resources. Trying to use Elastic Beanstalk for a serverless architecture would require running a custom container with an API framework, losing the benefits of native Lambda integration, built-in scaling, and the declarative resource definition that CloudFormation provides.
- ✗
AWS OpsWorks
Why it's wrong here
AWS OpsWorks is a configuration management service that leverages Chef and Puppet to automate server configuration on EC2 instances, but it is not designed for declarative infrastructure provisioning of serverless services. OpsWorks uses recipes and cookbooks to manage installed software and system state, which is an imperative, state-management approach unfamiliar for defining Lambda functions, API Gateway APIs, and their event source mappings. Furthermore, OpsWorks does not natively support creating serverless resources; you would need to decouple resource creation from configuration management, making it a poor fit for this task compared with CloudFormation's template-driven IaC.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
One of 1,169 original SOA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SOA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SOA-C02 exam.