特定IPと、API Gatewayからのアクセスを許可するS3バケットのポリシーの書き方を教えてください

0

以下を満たすS3バケットのアクセス許可のポリシーの書き方を教えてください。

  1. Pythonでupload_file() を使いアップロード: 特定のIPアドレスを持つPCからのみ許可
  2. API Gateway REST APIでPOST: 全て許可

以下のような書き方では、API Gatewayからのアクセスが不可能でした。

{ "Version": "2012-10-17", "Statement": { "Effect": "Deny", "Action": "", "Resource": "", "Condition": { "NotIpAddress": { "aws:SourceIp": [ "x.x.x.x/xx" ] }, "Bool": {"aws:ViaAWSService": "false"} } } }

otashi
asked 6 months ago301 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions