0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

API Gatewayのリソースポリシーでホワイトリスト設定を行う

Last updated at Posted at 2020-11-19

特定のIPアドレスからのみ接続を許可する設定をしたく、API Gatewayのリソースポリシーを利用して、ホワイトリスト設定を試したのでその際のメモを残しました。

設定手順

1.API Gateway > APIを選択 > リソースポリシーを選択
2.リソースポリシー欄に以下を記載

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": "*",
            "Action": "execute-api:Invoke",
            "Resource": "< リソース>リソースを選択>メソッドリクエストに記載のARNをコピーして貼り付ける>",
            "Condition": {
                "IpAddress": {
                    "aws:SourceIp": "<ここに許可したいIPアドレスを記載>"
                }
            }
        }
    ]
}

3.保存ボタンをクリック
4. リソース > アクション > APIのデプロイ > デプロイされるステージを選択 > デプロイ

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?