nerdexam
Amazon

SOA-C03 · Question #19

A company has an AWS CloudFormation template that includes an AWS::EC2::Instance resource and a custom resource (Lambda function). The Lambda function fails because it runs before the EC2 instance is

Sign in or unlock SOA-C03 to reveal the answer and full explanation for question #19. The question stem and answer options stay visible for context.

Submitted by rania.sa· Mar 5, 2026Deployment, provisioning, and automation

Question

A company has an AWS CloudFormation template that includes an AWS::EC2::Instance resource and a custom resource (Lambda function). The Lambda function fails because it runs before the EC2 instance is launched. Which solution will resolve this issue?

Options

  • AAdd a DependsOn attribute to the custom resource. Specify the EC2 instance in the DependsOn
  • BUpdate the custom resource's service token to point to a valid Lambda function.
  • CUpdate the Lambda function to use the cfn-response module to send a response to the custom
  • DUse the Fn::If intrinsic function to check for the EC2 instance before the custom resource runs.

Unlock SOA-C03 to see the answer

You've previewed enough free SOA-C03 questions. Unlock SOA-C03 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#CloudFormation DependsOn#custom resource#resource ordering#Lambda
Full SOA-C03 Practice