Exam DVA-C02 All QuestionsBrowse all questions from this exam
Question 305

A developer uses AWS CloudFormation to deploy an Amazon API Gateway API and an AWS Step Functions state machine. The state machine must reference the API Gateway API after the CloudFormation template is deployed. The developer needs a solution that uses the state machine to reference the API Gateway endpoint.

Which solution will meet these requirements MOST cost-effectively?

    Correct Answer: A

    The most cost-effective solution involves configuring the CloudFormation template to reference the API endpoint in the DefinitionSubstitutions property for the AWS::StepFunctions::StateMachine resource. This approach leverages CloudFormation's native capabilities to dynamically substitute values within the definition of AWS resources, allowing the state machine to reference the API Gateway API without hard-coding values. This ensures flexibility and reusability of the CloudFormation template across different deployments and avoids additional costs associated with using other AWS services like Secrets Manager or AppConfig.

Discussion
KarBiswaOption: A

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html#:~:text=A%20map%20(string,key%2Dvalue%20map.

Abdullah22Option: A

going with A .

SerialiDrOption: A

This approach leverages CloudFormation's ability to dynamically substitute values within the definition of AWS resources. By using the DefinitionSubstitutions property for the AWS::StepFunctions::StateMachine resource, you can directly insert the API Gateway endpoint or other necessary parameters into the state machine's definition. This enables the state machine to reference the API Gateway API without hard-coding values, allowing for flexibility and reusability of the CloudFormation template across different deployments. It's also a cost-effective solution because it uses native CloudFormation capabilities without the need for additional resources or services.

CrescentSharedOption: A

The other options (B, C, and D) involve using additional resources or services that are not necessary for this requirement and would therefore be less cost-effective.

jyrajan69

Step Functions does not have a Definitions substitution property or feature, so that throws A out. The most cost effective has to be B

65703c1Option: A

A is the correct answer.