exam questions

Exam AWS Certified SysOps Administrator - Associate All Questions

View all questions & answers for the AWS Certified SysOps Administrator - Associate exam

Exam AWS Certified SysOps Administrator - Associate topic 1 question 466 discussion

A company has created an AWS CloudFormation template that consists of the AWS::EC2::Instance resource and a custom CloudFormation resource. The custom CloudFormation resource is an AWS Lambda function that attempts to run automation on the Amazon EC2 instance.

During testing, the Lambda function fails because the Lambda function tries to run before the EC2 instance is launched.

Which solution will resolve this issue?

  • A. Add a DependsOn attribute to the custom resource. Specify the EC2 instance in the DependsOn attribute.
  • B. Update the custom resource's service token to point to a valid Lambda function.
  • C. Update the Lambda function to use the cfn-response module to send a response to the custom resource.
  • D. Use the Fn::If intrinsic function to check for the EC2 instance before the custom resource runs.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
numark
2 months, 1 week ago
Selected Answer: A
The DependsOn attribute in an AWS CloudFormation template specifies that the creation of a specific resource follows another. When you add a DependsOn attribute to a resource, CloudFormation ensures that the resource specified in the DependsOn attribute is created before the resource that declares the DependsOn. Therefore, by adding a DependsOn attribute to the custom CloudFormation resource and specifying the EC2 instance in it, CloudFormation will not attempt to create the custom resource until the EC2 instance has been successfully created and launched.
upvoted 1 times
...
numark
3 months ago
ChatGPT states Depends On>>answer is A
upvoted 1 times
...
Aamee
3 months, 3 weeks ago
Selected Answer: A
option A for sure..
upvoted 2 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