exam questions

Exam AWS-SysOps All Questions

View all questions & answers for the AWS-SysOps exam

Exam AWS-SysOps topic 1 question 739 discussion

Exam question from Amazon's AWS-SysOps
Question #: 739
Topic #: 1
[All AWS-SysOps Questions]

A company is deploying a web service to Amazon EC2 instances behind an Elastic Load Balancer. All resources will be defined and created in a single AWS
CloudFormation stack using a template. The creation of each EC2 instance will not be considered complete until an initialization script has been run successfully on the EC2 instance. The Elastic Load Balancer cannot be created until all EC2 instances have been created.
Which CloudFormation resource will coordinate the Elastic Load Balancer creation in the CloudFormation stack template?

  • A. CustomResource
  • B. DependsOn
  • C. Init
  • D. WaitCondition
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
fyzzzz
Highly Voted 2 years, 7 months ago
D is the answer. DependsOn is an attribute not a resource and AWS::CloudFormation::Init is used to include metadata on an EC2 for the cfn-init helper script. Although there are other options for this particular case, if we relate only to the questions the answer can be found here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-waitcondition.html "You can use the wait condition and wait condition handle to make AWS CloudFormation pause the creation of a stack and wait for a signal before it continues to create the stack. For example, you might want to download and configure applications on an Amazon EC2 instance before considering the creation of that Amazon EC2 instance complete."
upvoted 11 times
CT_n_me
2 years, 7 months ago
I believe the answer is B. Rationale: "Note the DependsOn property in the WaitCondition. The DependsOn property ensures that the WaitCondition is created after the EC2 instance is launched and guarantees that the timer that is associated with the WaitCondition does not start until the instance is running and the configuration scripts can run. Without the DependsOn, the WaitCondition could be created at any time during the stack creation process, making the timer nondeterministic." https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-waitcondition.html - See page 12
upvoted 5 times
Akinwaleo
1 year ago
ok, but from the link. the answer is actually D - Wait Condition. this is because the question asked "Which CloudFormation RESOURCE " and not "Property". WaitCondition is the Resource, and DependOn is an Attribute in the Resource.
upvoted 1 times
...
...
...
Winfield
Highly Voted 2 years, 6 months ago
D: The WaitCondition CloudFormation "resource" might look similar to the DependsOn attribute, but they’re actually different. DependsOn controls the order in which your CloudFormation resources are created, i.e., creation of a specific resource follows another. DependsOn doesn’t wait for success or failure signals from AWS resources before moving forward. While, on the other hand, WaitCondition waits for success signals from your AWS resources and resumes the execution of the CloudFormation template
upvoted 10 times
sapien45
2 years, 6 months ago
Great Explanation
upvoted 1 times
...
...
albert_kuo
Most Recent 10 months ago
Selected Answer: D
The WaitCondition resource in CloudFormation allows you to delay the creation of dependent resources until a specific condition is met. In this scenario, you can use a WaitCondition to delay the creation of the Elastic Load Balancer until the initialization script on the EC2 instances has been successfully executed.
upvoted 1 times
albert_kuo
8 months, 3 weeks ago
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waitcondition.html
upvoted 1 times
...
...
gulu73
1 year, 3 months ago
Selected Answer: D
D is the answer
upvoted 2 times
...
awsnerd13
1 year, 11 months ago
Selected Answer: D
I'll go with D
upvoted 1 times
...
[Removed]
2 years, 2 months ago
Selected Answer: C
C is correct. WaitforCondition is recommended for waiting external resource. Dependson is not used during a creating process. we need here cfn-signal in init()
upvoted 1 times
...
[Removed]
2 years, 2 months ago
C is correct. WaitforCondition is recommended for waiting external resource. Dependson is not used during a creating process. we need here cfn-signal in init()
upvoted 2 times
...
TroyMcLure
2 years, 6 months ago
Correct Answer: D
upvoted 1 times
...
RicardoD
2 years, 6 months ago
D is the answer At first I would say " depends ON" would be enough but question states that "The creation of each EC2 instance will not be considered complete until an initialization script has been run successfully on the EC2 instance" and based on that, I would then choose D
upvoted 1 times
...
Kimle
2 years, 6 months ago
D as fyzzzz mentioned DependsOn is an attribute not a resource , as per link below depend on basically needed for VPC-gateway attachment "when a resource like ec2 instance is depending on a gateway to be created" https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html#gatewayattachment
upvoted 1 times
...
abhishek_m_86
2 years, 6 months ago
D. WaitCondition Seem correct
upvoted 2 times
...
jackdryan
2 years, 6 months ago
I'll go with D
upvoted 1 times
...
ming98
2 years, 6 months ago
B With the DependsOn attribute you can specify that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, that resource is created only after the creation of the resource specified in the DependsOn attribute. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html
upvoted 4 times
...
showmetheanswer
2 years, 6 months ago
D should be the answer as the key word here is that there is a custom script and need to get it finished before create ELB.
upvoted 2 times
...
waterzhong
2 years, 6 months ago
D is the answer. DependsOn is an attribute not a resource and AWS::CloudFormation::Init is used to include metadata on an EC2 for the cfn-init helper script. Although there are other options for this particular case, if we relate only to the questions the answer can be found here:
upvoted 2 times
...
orebaron
2 years, 6 months ago
D is correct
upvoted 1 times
...
KhatriRocks
2 years, 7 months ago
D: With full exp and example too: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-waitcondition.html
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago