IAM Auth on API Gateway endpoint behind custom domain

0

I have an API Gateway endpoint that I want to use IAM auth to secure. All the examples I see seem to directly hit the API gateway URL. This API Gateway also has a custom domain that I would prefer to use instead of the API gateway one.

Is it possible to use IAM auth to hit an API Gateway endpoint using that API GW's custom domain? If so, what are the steps to accomplish that?

1 個回答
2

Yes, it's possible to use IAM authorization with a custom domain in AWS API Gateway. You can set up a custom domain name for your API using API Gateway and then configure IAM authorization for your HTTP API routes. The custom domain will act as a front-end to your API Gateway endpoint, and the IAM authorization will still be enforced before requests reach the underlying API.

To activate AWS Identity and Access Management (IAM) authentication for access to my Amazon API Gateway (API Gateway) REST API, Turn on IAM authentication for an API method in the API Gateway console. Then, use IAM policies and resource policies to designate permissions for your API's users. Please refer to this link for more details on how to set it up.

To know how to setup custom domain names for REST APIs, refer to this link.

Now, when a request hits your custom domain, API Gateway will first check IAM permissions before allowing access to the underlying API. It will use custom domain name as host for signing the request. This setup ensures secure access to your HTTP API with IAM authentication through the custom domain.

AWS
Mihir G
已回答 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南