A developer is designing a REST API using Amazon API Gateway to ingest tracking events. To minimize latency and operating costs, the API must write incoming payloads directly to an Amazon SQS queue without using an intermediate AWS Lambda function. Which two configuration steps must the developer perform in API Gateway to successfully establish this integration? (Select TWO.)
- Configure the integration type as AWS Service, select Simple Queue Service (SQS) as the AWS Service, and set the integration HTTP method to POST.Answer
- Create an IAM role that grants sqs:SendMessage permissions and specify this role's ARN in the Execution Role field of the integration settings.Answer
- CEnable Lambda Proxy Integration on the integration settings and specify the target SQS queue ARN.
- DConfigure a Cognito User Pool authorizer on the API method to authorize API Gateway to publish to SQS.
- EConfigure the SQS queue policy to allow CORS requests originating from the API Gateway endpoint.
Answer
The correct configurations are setting the integration type to AWS Service targeting SQS with the POST method, and creating an IAM execution role with the sqs:SendMessage permission for API Gateway.
To integrate API Gateway directly with SQS, you must use the AWS Service integration type with the POST method. Additionally, API Gateway requires an IAM execution role to authorize the sqs:SendMessage action on the SQS queue.
Step-by-Step Solution
Key Concept
API Gateway direct integration with AWS Services bypassing Lambda