Q39 — AWS DVA-C02 Ch.2
Question 39 of 100 | ← Chapter 2
A developer is using AWS CloudFormation to deploy an Amazon API Gateway API and an AWS Step Functions state machine. After deploying the CloudFormation template, the state machine must invoke the API Gateway API. The developer needs a solution to enable the state machine to invoke the API Gateway endpoint. Which solution will most cost-effectively meet these requirements?
- A. Configure the CloudFormation template to reference the API endpoint in the DefinitionSubstitutions property of the AWS::StepFunctions::StateMachine resource. ✓
- B. Configure the CloudFormation template to store the API endpoint in environment variables of the AWS::StepFunctions::StateMachine resource. Configure the state machine to reference the environment variable.
- C. Configure the CloudFormation template to store the API endpoint in a standard AWS::SecretsManager::Secret resource. Configure the state machine to reference the resource.
- D. Configure the CloudFormation template to store the API endpoint in a standard AWS::AppConfig::ConfigurationProfile resource. Configure the state machine to reference the resource.
Correct Answer: A. Configure the CloudFormation template to reference the API endpoint in the DefinitionSubstitutions property of the AWS::StepFunctions::StateMachine resource.
Explanation
Configuring the CloudFormation template to reference the API endpoint in the DefinitionSubstitutions property of the AWS::StepFunctions::StateMachine resource is the most cost-effective solution. The DefinitionSubstitutions property allows you to use template parameters within the state machine definition, enabling the state machine to reference the API Gateway endpoint without requiring additional resources. 【Lantern Certification provided by: swufelp1999】