A developer is designing a REST API in Amazon API Gateway that must start an AWS Step Functions state machine execution whenever a client sends a POST request. To minimize latency and avoid cold starts, the developer wants to configure a direct AWS service integration between API Gateway and Step Functions, without using an intermediate AWS Lambda function.
Which two configuration steps must the developer perform to successfully set up this integration? (Select TWO.)
- Configure the integration type as AWS Service, select Step Functions as the AWS service, and set the Action to StartExecution.Cevap
- Create an IAM role that permits the states:StartExecution action, and specify this role's ARN in the Execution Role field of the integration.Cevap
- CConfigure the method to use Lambda Proxy integration and set the target integration URI directly to the Step Functions state machine ARN.
- DConfigure a Cognito User Pool authorizer on the API method and select the Step Functions action permissions within the authorizer settings.
- EPackage the AWS SDK within the client application and configure the API Gateway method to pass client-side IAM access keys to Step Functions using request header mapping.
Cevap
Configuring the integration type as AWS Service with Step Functions as the service and StartExecution as the action, and creating an IAM role that permits the states:StartExecution action and specifying its ARN in the integration settings.
To create a direct integration between Amazon API Gateway and AWS Step Functions, the developer must configure the integration type as an AWS Service. The target service is set to Step Functions, and the Action is set to StartExecution to invoke the state machine. Additionally, an IAM execution role containing permissions for states:StartExecution must be created and its ARN provided in the execution role field of the integration. This allows API Gateway to securely trigger the state machine on behalf of the client.
Adım Adım Çözüm
Anahtar Kavram
Direct AWS Service Integrations in Amazon API Gateway