LoginSignup
2
1

More than 3 years have passed since last update.

SAMでAPIにIP制限をかける

Posted at

以下の構文でいけます。

この辺みながらコツコツいじりました
https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md

# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
  Function:
    Timeout: 3
  Api:
    Auth:
      ResourcePolicy:
        CustomStatements:
        - Effect: Allow
          Principal: "*"
          Action: execute-api:Invoke
          Resource: "*"
          Condition:
            IpAddress:
              aws:SourceIp: "221.250.87.66"
2
1
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
2
1