Created
May 24, 2019 20:37
-
-
Save mearns/c6a3e004451b8c56f4dc33f8c670b922 to your computer and use it in GitHub Desktop.
Resource Policy for Private API Gateway
This file contains 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": "Allow", | |
"Principal": "*", | |
"Action": "execute-api:Invoke", | |
"Resource": "arn:aws:execute-api:${REGION}:${ACCOUNT_ID}:*/*", | |
"Condition": { | |
"StringEquals": { | |
"aws:sourceVpce": [ | |
"vpce-${VPCE_ID_1}", | |
"vpce-${VPCE_ID_2}", | |
/* ... */ | |
] | |
} | |
} | |
}, | |
{ | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": [ | |
"arn:aws:iam::${ALLOWED_ACCOUNT_ID_1}:${ALLOWED_ROLE_ID_1}", | |
"arn:aws:iam::${ALLOWED_ACCOUNT_ID_2}:${ALLOWED_ROLE_ID_2}" | |
/* ... */ | |
] | |
}, | |
"Action": "execute-api:Invoke", | |
"Resource": "arn:aws:execute-api:${REGION}:${ACCOUNT_ID}:*/*", | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment