Which CloudFormation resource will coordinate the Elastic Load Balancer creation in the CloudFormation stack template?
CustomResource
DependsOn
Init
WaitCondition
Explanations:
A CustomResource is used to run custom logic or actions outside the CloudFormation scope. It requires custom Lambda functions, but it does not directly manage EC2 instance creation completion.
DependsOn specifies the order of resource creation, but it does not coordinate the completion of initialization scripts. It would only ensure that resources are created in a certain sequence.
Init is not a valid CloudFormation resource type. Initialization scripts are often handled by EC2 instance configurations but not directly coordinated by an Init resource.
WaitCondition is the correct resource to handle waiting for an event to signal that EC2 instances have completed initialization. It can be used to pause the creation of the Elastic Load Balancer until the script runs successfully on all EC2 instances.