내용으로 건너뛰기

creating role for api to sqs integration

0

I'm trying to set up an integration between an API Gateway endpoint and an SQS queue. Doing so seems to require (please tell me if this is wrong) my API Gateway http to assume an IAM role that has permissions to send messages to my SQS queue.

When I go to create the required role in the AWS console, the console requires that the role be assign a "use case". The only use case for API Gateway offered in the console seems to be to "push logs to cloudwatch". In other words, a use case that involves API Gateway sending messages in an SQS queue is not offered.

Does this mean that I cannot create the required role using the AWS console?

2개 답변
1

Hi

Please try this solution.

To integrate an API Gateway endpoint with an SQS queue, you need to create an IAM role that allows API Gateway to send messages to the SQS queue. Start by navigating to the IAM Console, create a new role, and select API Gateway as the trusted entity. Attach the AmazonSQSFullAccess policy or create a custom policy that grants the sqs:SendMessage permission to your specific SQS queue. After creating the role, go to the API Gateway Console, configure your API's integration request to use AWS Service, select Simple Queue Service (SQS), and provide the necessary details such as the queue URL. Finally, in the integration settings, specify the ARN of the IAM role you created, and deploy your API. This setup allows API Gateway to assume the role and send messages to the SQS queue.

please look at Repost link

https://repost.aws/knowledge-center/api-gateway-rest-api-sqs-errors

전문가
답변함 2년 전
전문가
검토됨 2년 전
전문가
검토됨 2년 전
0

Hi, Please follow below document very helpful to you

https://repost.aws/knowledge-center/api-gateway-rest-api-sqs-errors

전문가
답변함 2년 전
전문가
검토됨 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠