Last active
September 23, 2020 22:51
-
-
Save ctala/24b53b49584cba0c097132aff8ff89e5 to your computer and use it in GitHub Desktop.
AWS Sample Resource Policy VPC Whitelist and Resulted Policy from Serverless
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Deny", | |
"Principal": "*", | |
"Action": "execute-api:Invoke", | |
"Resource": "arn:aws:execute-api:us-west-2:607613765343:80nyvq2u70/*/*/*", | |
"Condition": { | |
"StringNotEquals": { | |
"aws:sourceVpc": "vpc-03602a6783bdefb87" | |
} | |
} | |
}, | |
{ | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "execute-api:Invoke", | |
"Resource": "arn:aws:execute-api:us-west-2:607613765343:80nyvq2u70/*/*/*" | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Deny", | |
"Principal": "*", | |
"Action": "execute-api:Invoke", | |
"Resource": "execute-api:/{{stageNameOrWildcard}}/{{httpVerbOrWildcard}}/{{resourcePathOrWildcard}}", | |
"Condition": { | |
"StringNotEquals": { | |
"aws:sourceVpc": "{{vpcID}}" | |
} | |
} | |
}, | |
{ | |
"Effect": "Allow", | |
"Principal": "*", | |
"Action": "execute-api:Invoke", | |
"Resource": "execute-api:/{{stageNameOrWildcard}}/{{httpVerbOrWildcard}}/{{resourcePathOrWildcard}}" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment