0
0

More than 3 years have passed since last update.

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

Posted at

特定の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