SOA-C02 Deployment, Provisioning, and Automation Practice Question
A DevOps engineer needs to automate the creation of an Amazon RDS for MySQL DB instance in a VPC. The solution must use infrastructure as code. Which AWS service should be used to provision the database?
⚠ Common exam trap
SOA-C02 often tests the distinction between infrastructure-as-code services and application deployment or configuration management services, causing candidates to confuse Elastic Beanstalk or OpsWorks with CloudFormation for provisioning databases.
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 infrastructure-as-code service that allows you to define and provision AWS resources, including RDS DB instances, using declarative templates. It supports the full lifecycle management of RDS instances, including creation, updates, and deletion, and integrates with other AWS services for automation. The other options are not designed for general-purpose infrastructure as code provisioning of databases.
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 OpsWorks
Why it's wrong here
AWS OpsWorks is a configuration management service that uses Chef or Puppet to automate the setup and patching of EC2 instances. While you could theoretically use a custom recipe or a lifecycle hook to call the RDS API, OpsWorks does not provide native, declarative resources for creating and managing RDS databases. Its primary focus is on instance lifecycle and configuration, not on provisioning managed services like RDS as first-class infrastructure components.
- ✗
AWS Elastic Beanstalk
Why it's wrong here
AWS Elastic Beanstalk is a Platform-as-a-Service that deploys application code and automatically provisions the underlying compute, networking, and sometimes database resources as part of an application environment. Although Elastic Beanstalk can attach an RDS database to an environment, it couples the database to the application lifecycle and is not designed as a standalone automation tool for creating RDS instances independently. The question asks for automating the creation of a database resource, not deploying an application that happens to use one.
- ✓
AWS CloudFormation
Why this is correct
AWS CloudFormation is an Infrastructure as Code service that lets you define resources declaratively in a JSON or YAML template. You can specify an AWS::RDS::DBInstance resource, along with all its properties such as engine, instance class, storage, and security groups, and CloudFormation will create the database reproducibly and manage its lifecycle. It supports change sets, rollback on failure, and drift detection, making it the ideal service for automating RDS provisioning.
- ✗
EC2 Auto Scaling
Why it's wrong here
EC2 Auto Scaling is designed solely to maintain a healthy fleet of EC2 instances by automatically adjusting capacity based on policies, schedules, or health checks. It has no native ability to create or manage Amazon RDS databases; RDS instances are not part of the EC2 Auto Scaling model. RDS has its own scaling capabilities, such as storage autoscaling or Aurora Serverless, but those are separate from EC2 Auto Scaling and not intended for initial database provisioning.
Go deeper
Related to this question
About these practice questions
This SOA-C02 question is part of Courseiva's 1,169-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
2 more ways this is tested on SOA-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A DevOps engineer wants to automate the creation of an Amazon EC2 instance with a specific security group and IAM role. Which AWS service should be used to define the infrastructure as code?
easy- A.AWS Elastic Beanstalk
- B.AWS CodeDeploy
- ✓ C.AWS CloudFormation
- D.AWS OpsWorks
Why C: AWS CloudFormation is the infrastructure-as-code (IaC) service that allows you to define AWS resources such as EC2 instances, security groups, and IAM roles in declarative JSON or YAML templates. It automates provisioning and management of the entire stack, ensuring consistent and repeatable deployments. This directly matches the requirement to define infrastructure as code.
Variation 2. A company uses AWS CloudFormation to deploy a stack that includes an Amazon S3 bucket. The stack creation fails because the S3 bucket name already exists. What should the administrator do to resolve this issue?
easy- A.Add a tag to the existing bucket to make it available for the stack.
- ✓ B.Change the S3 bucket name in the CloudFormation template to a unique name.
- C.Delete the existing S3 bucket and recreate the stack.
- D.Update the bucket policy to allow the stack to use the bucket.
Why B: S3 bucket names are globally unique across all AWS accounts and regions, so CloudFormation cannot create a bucket whose name is already taken by another account. The correct fix is to change the BucketName property in the template to a name that is not in use, then re-run the stack. This resolves the naming collision without touching resources owned by other accounts.
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
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.