A developer is designing an integration for an Amazon API Gateway REST API. The API needs to receive incoming JSON payloads from clients and write them directly into an Amazon SQS queue without using an intermediate AWS Lambda function. Which two configurations must the developer perform in API Gateway to implement this integration? (Select TWO.)
- Configure the integration type as 'AWS Service', select Amazon SQS as the target service, and define an integration request mapping template to format the client's JSON payload.Cevap
- Create an IAM role that allows the API Gateway service principal to assume it, grant the role `sqs:SendMessage` permission, and specify the role's ARN as the integration's execution role.Cevap
- CConfigure a custom Lambda authorizer that validates incoming client credentials, assumes an IAM role with SQS permissions, and attaches the resulting AWS credentials to the API Gateway integration request header.
- DConfigure the integration type as 'Lambda Proxy' and write a custom mapping template under the integration request settings to structure the JSON payload for Amazon SQS.
- ECreate an IAM execution role with `sqs:SendMessage` permissions and configure its trust policy to trust the Amazon SQS service principal (`sqs.amazonaws.com`) as the identity provider.
Cevap
To integrate Amazon API Gateway directly with Amazon SQS, configure the integration type as 'AWS Service', select Amazon SQS as the target service, and define an integration request mapping template. Additionally, create an IAM role that allows the API Gateway service principal to assume it, grant the role `sqs:SendMessage` permission, and specify the role's ARN as the integration's execution role.
To integrate Amazon API Gateway directly with Amazon SQS without using an intermediate AWS Lambda function, you must configure an 'AWS Service' integration type, select Amazon SQS, and use a mapping template to format the client's payload. Additionally, API Gateway requires an IAM execution role with permissions to perform the `sqs:SendMessage` action on the destination queue, and the role's trust policy must allow the API Gateway service principal to assume it.
Adım Adım Çözüm
Anahtar Kavram
API Gateway AWS Service Integrations