BLACK FRIDAY SALE – Unlock Up to 25% OFF on All Exam Prep! - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Amazon SOA-C03 Exam - Topic 1 Question 21 Discussion

Posted by Lennie on Oct 15, 2026 at 09:09 PM

A CloudOps engineer is examining the following AWS CloudFormation template:

AWSTemplateFormatVersion: '2010-09-09'

Description: 'Creates an EC2 Instance'

Resources:

EC2Instance:

Type: AWS::EC2::Instance

Properties:

ImageId: ami-79fd7eee

InstanceType: m5n.large

SubnetId: subnet-1abc3d3fg

PrivateDnsName: ip-10-24-34-0.ec2.internal

Tags:

- Key: Name

Value: !Sub "${AWS::StackName} Instance"

Why will the stack creation fail?

Suggested Answer: C

The PrivateDnsName attribute of an EC2 instance is automatically assigned by AWS at launch time and is a read-only property. CloudFormation does not allow users to specify this value manually.

Including PrivateDnsName in the EC2 instance properties causes validation to fail during stack creation. Outputs and Parameters sections are optional, and the VPC is implicitly defined through the subnet ID.

Therefore, attempting to set PrivateDnsName results in stack creation failure.


Get Premium SOA-C03 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
20 comments · newest first
KA
Karen White 7 days ago
B makes the most sense here because many think missing Parameters cause failure, but the tricky part is PrivateDnsName is read-only and cannot be set.
SU
Sunita Nair 2 days ago
↳ replying to Karen White
I had the same understanding, and one more point is that SubnetId ties the instance to a VPC, so you don't need a VPC parameter.
PI
Pierre Sanchez 3 days ago
↳ replying to Karen White
Doesn't the read-only PrivateDnsName rule point to C instead of B, since you can't set it in the instance properties?
NI
Nicolas Novikov 3 days ago
↳ replying to Karen White
Makes sense, I landed on the same conclusion as well.
SU
Sunita Patel 23 days ago
A makes the most sense here because Outputs are optional, and the tricky part is that PrivateDnsName is read only and cannot be set.
MA
Magnus Popov 20 days ago
↳ replying to Sunita Patel
Why does stating Outputs are optional justify A rather than considering B or D as possible blockers?
SA
Salman Nawaz 21 days ago
↳ replying to Sunita Patel
The wording points directly to A, so I agree.
AA
Aarav Reddy 1 month ago
C makes the most sense here because the tricky part is that PrivateDnsName is read-only and CloudFormation cannot set it.
RI
Richard Smith 14 days ago
↳ replying to Aarav Reddy
Why does the read-only PrivateDnsName make C correct here, rather than A or D also causing failure?
KA
Kazuki Tanaka 24 days ago
↳ replying to Aarav Reddy
Also you can’t specify PrivateDnsName in a template because it’s an AWS assigned attribute.
MI
Ming Han 1 month ago
↳ replying to Aarav Reddy
Option D is less likely because the SubnetId ties the instance to a VPC, so you don't need a separate VPC parameter.
LA
Lai 3 days ago
Outputs and Parameters are optional, so they won't cause a failure.
YU
Yuonne 8 days ago
Missing the VPC is a big deal too, could be the issue.
WI
William 13 days ago
Wait, are you sure about that? I thought it was allowed.
GA
Galen 18 days ago
Totally agree, that's a known limitation!
CA
Cassandra 24 days ago
The PrivateDnsName can't be set in CloudFormation.
LI
Lili 29 days ago
Could it be related to the Parameters section? I feel like some templates require it, but I'm not confident about this one.
SC
Scarlet 1 month ago
I recall that the Outputs section is often optional, so I don't think that's the reason for the failure.
CE
Ceola 1 month ago
I'm not entirely sure, but I feel like the VPC needs to be specified somewhere. It seems like a common requirement in similar questions we've practiced.
BL
Blossom 1 month ago
I think the issue might be with the PrivateDnsName. I remember reading that it can't be set directly in CloudFormation templates.
0/2000 characters

Save Cancel